我已經在我的應用程序中實現了搜索對話框,文本框在頂部可見,放大圖標在光標旁邊可見,即使它具有完整的文本框。理想情況下,放大或搜索圖標(默認)應該在文本框的末尾。搜索對話框不完全可見 - android
此外,當我開始輸入時,我沒有看到軟鍵,只要我開始使用電腦鍵盤輸入,放大圖標就會消失。
您能否讓我知道是否有任何對齊問題?
感謝
主要活動:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="Hello" />
</RelativeLayout>
searchconfig.xml
<?xml version="1.0" encoding="utf-8"?>
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:label="@string/app_name"
android:hint="true"
>
</searchable>
哦!我注意到一個奇怪的事情,做了一個小的POC,甚至在我的Windows 8筆記本電腦上也有同樣的問題。但是,當我將它放在Windows 7筆記本電腦上時,搜索欄與放大圖標(默認搜索圖標)一起正常可見。 它是特定於機器還是特定於仿真器(兩者都是相同的仿真器 - Nexus) – Cavish