Q
安卓:搜索框设计
0
A
回答
0
你有没有试过移动JQuery的实用程序?实现这一点应该不难。
1
你应该使用RelativeLayout
&集的ImageView align_parent_top & align_parent_right 或者如果你使用LinearLayout
那么你可以这样试试:---
<LinearLayout
android:id="@+id/ll_my_profile"
android:layout_width="fill_parent"
android:layout_height="45dp"
android:layout_marginLeft="10dp"
android:clickable="true"
android:layout_marginRight="10dp"
android:background="@drawable/txt_box_bg"
android:orientation="horizontal" >
<TextView
android:id="@+id/my_profile"
android:layout_width="0dip"
android:layout_height="45dp"
android:layout_weight="1"
android:gravity="left"
android:hint="My Profile"
android:padding="10dp"
android:textColor="#000000"
android:textSize="18dp" />
<ImageView
android:id="@+id/img_for_setting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|center_vertical"
android:background="@drawable/arrow" />
</LinearLayout>
0
根据搜索框是如何在你的应用中使用,它可能最适合使用Action Views in the ActionBar。这是Google建议的在活动中添加可扩展的响应式搜索框的方式。
对于SDK 11之前的Android版本,您可以使用兼容性库ActionBarSherlock实现所有相同的功能。虽然我自己并没有在ActionBarSherlock中使用可扩展的搜索栏,但它看起来可能在这里使用SearchView。
希望有帮助!
0
创建线性布局。将其背景设置为完整的编辑框图像。在线性布局内添加一个编辑框和按钮。将按钮的背景设置为android:background =“@ drawable/searchbtn”。 将编辑框的背景设置为无图像(透明图像)。完成。
+1
不是我正在寻找的答案。请再次阅读我的查询。 – Nitish
相关问题
- 1. 安卓搜索对话框定制
- 2. 搜索通过安卓
- 3. 安卓:SQLite的搜索
- 4. 安卓搜索与建议
- 5. 搜索通过安卓
- 6. 安卓:为搜索栏
- 7. 安卓搜索在ActionBar
- 8. 安卓类的设计
- 9. 安卓操作栏的搜索按钮
- 10. 安卓:Wifi和蓝牙搜索一起
- 11. 安卓:视频搜索+手势
- 12. 安卓在ListFragment中实现搜索
- 13. 安卓:创建搜索,从不同actvities
- 14. 附加搜索功能按钮(安卓)
- 15. 从数据库安卓搜索siggestions
- 16. 安卓:多重搜索模式
- 17. 谷歌安卓市场搜索结果
- 18. 安卓在网站上搜索信息
- 19. 安卓谷歌和雅虎搜索EditText
- 20. 安卓搜索栏划分行业
- 21. 安卓菜单搜索按钮
- 22. 安卓:搜索意图不工作
- 23. 使搜索“块”,在文本框,像Pinterest的SEACH安卓
- 24. 安卓搜索对话框不起作用
- 25. Mysql搜索设计
- 26. 为搜索设计
- 27. 安卓搜索历史记录快速搜索
- 28. 安卓搜索按钮和搜索字段在行动吧
- 29. 安卓:设置maxHeight参数编程的进度/搜索栏
- 30. 建议多插槽设计(安卓)
我的要求是,最初edittext应该显示为上面张贴的第一张图片,当我点击它时,它应该展开,如我在第二张图片中所示。 – Nitish
这只是使用RelativeLayout&使RelativeLayout方向水平&采取edittext&imageview&在图像视图放在这种方式: - –