我正在使用android.support.v7.widget.SearchView并且提示图标位于图像所示的光标左侧。Android SearchView在提示图标后更改光标位置
,但我想做出提示搜索图标后,光标开始。
XML:
<android.support.v7.widget.SearchView
android:id="@+id/airlines_searchView"
android:iconifiedByDefault="false"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:onClick="EnableSearchView"
android:background="#fbf7f7"
/>
我得到的搜索视图的EditText上如下:
EditText search_text=(EditText) searchView.findViewById(android.support.v7.appcompat.R.id.search_src_text);
,我不知道什么是所需的属性来设置它。
我查了That但没有找到解决办法,请帮忙吗?
所以你想光标左侧的搜索图标正确? – himanshu1496
正是我想要的 –
请检查我的答案,让我知道如果它不是你想要的。 – himanshu1496