开发者

android - imeOptions have search button say "Search" instead of magnifying glass

开发者 https://www.devze.com 2023-04-06 03:19 出处:网络
I was wondering if its possible to change magnifying glass on the Search button to text \"Search\". We want to preserve the imeOptions setting to android:imeOptions=\"actionSearch\" because we respond

I was wondering if its possible to change magnifying glass on the Search button to text "Search". We want to preserve the imeOptions setting to android:imeOptions="actionSearch" because we respond to a certain event.

Here is what I have:

<EditText 
        android:id="@+id/txtSearch" 
        android:textSize="14px" 
        android:textColor="@color/main_text_black" 
        android:layout_width="189px" 
        android:layout_height="fill_parent" 
        android:imeOptions="actionSearch" 
        android:gravity="center_vertical" 
        android:singleLine="true"
        android:background="@null" 
        andr开发者_如何学Pythonoid:layout_alignParentLeft="true" 
        android:layout_marginLeft="24px"/>

android - imeOptions have search button say "Search" instead of magnifying glass

Tried this:

<EditText 
    android:id="@+id/txtSearch" 
    android:textSize="18dp" 
    android:textColor="@color/main_text_black" 
    android:layout_width="247dp" 
    android:layout_height="fill_parent" 
    android:imeOptions="actionSearch" 
    android:imeActionLabel="Search"
    android:gravity="center_vertical" 
    android:singleLine="true"
    android:background="@null" 
    android:layout_alignParentLeft="true" 
    android:layout_marginLeft="38dp"/>

android - imeOptions have search button say "Search" instead of magnifying glass

This only works in landscape mode which our app does not support and the word Search shows up in the wrong place.


You can try it!

<EditText
        android:id="@+id/edt_search_1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:imeOptions="actionSearch"
        android:inputType="text"/>


No, this is impossible unless you implement your own Keyboard for that EditText. The Text (or icons) on the keys of a keyboard is controlled by the person who wrote the keyboard.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号