有沒有在Android的谷歌搜索的代碼? xml佈局對我來說已經足夠了。或者也許有可能在EditText的右側添加一個按鈕,就像在角落中添加一個圖標一樣?謝謝。 Android EditText像谷歌搜索EditText
1
A
回答
1
你有一個水平方向的LinearLayout,你可以有一個EditText,一個帶有搜索圖像的ImageView和一個用於麥克風圖像的ImageView。他們都應該有這樣的方式切割所需的背景圖像,以便看起來像一個。這是一般概念。
關於源代碼,我幫不了你!
希望這會有所幫助!
+0
管理它嗎?需要幫助嗎? – 2011-12-19 15:26:59
2
<LinearLayout
android:id="@+id/mainLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bar"//set back ground for total look
android:orientation="horizontal" >
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="Your hint"
android:drawableRight="@drawable/search"//give your search icon
android:id="@+id/editBox"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageSpeak"
android:background="@drawable/iconSpeak"//icon for speak
/>
</LinearLayout>
相關問題
- 1. 安卓谷歌和雅虎搜索EditText
- 2. 如何在包括像谷歌搜索小工具appwidget的EditText
- 3. Android Listview從edittext搜索
- 4. 谷歌像搜索
- 5. 谷歌搜索Android
- 6. 即時在xamarin中使用edittext搜索功能使用edittext android
- 7. 在Edittext中進行實時搜索Android
- 8. 將Google搜索集成到Android EditText
- 9. Android EditText與圖像
- 10. Robotium搜索edittext的setError
- 11. 搜索欄的StringIndexOutOfBoundsException與EDITTEXT
- 12. 用EditText在ListView中搜索
- 13. 搜索組合框像谷歌搜索
- 14. 谷歌搜索
- 15. Elasticsearch搜索像谷歌
- 16. 谷歌像搜索結果
- 17. 谷歌搜索欄Android
- 18. Android應用谷歌搜索
- 19. Android從EditText檢索數據
- 20. 谷歌搜索谷歌搜索谷歌API或r python
- 21. Android EditText
- 22. Android EditText
- 23. Android EditText字段像按鈕
- 24. EditText中的圖像 - Android
- 25. Android。 EditText中的圖像
- 26. 使用的EditText INSEAD搜索查看
- 27. 帶editText的搜索功能 - ListView
- 28. 像谷歌一樣的全文搜索
- 29. 如何獲得像谷歌圖片搜索「谷歌圖片搜索」
- 30. 可搜索應用中的edittext的ID
你可以看到[我的答案**這裏**](http://stackoverflow.com/a/11093987/1050058)。將圖標更改爲右側很容易。先試試自己。我稍後會在右邊添加另一個代碼段圖標 – 2013-04-05 01:37:18