搜索框代码

  1. <LinearLayout
  2. android:background="#eb4f38"
  3. android:layout_width="match_parent"
  4. android:layout_height="wrap_content"
  5. android:orientation="horizontal">
  6. <FrameLayout
  7. android:layout_weight="1"
  8. android:layout_width="0dp"
  9. android:layout_height="wrap_content">
  10. <EditText
  11. android:id="@+id/search_et_input"
  12. android:layout_gravity="center_vertical"
  13. android:layout_margin="10dp"
  14. android:drawableLeft="@drawable/search_icon"
  15. android:drawablePadding="5dp"
  16. android:layout_width="match_parent"
  17. android:layout_height="wrap_content"
  18. android:background="@drawable/search_edittext_shape"
  19. android:textSize="16sp"
  20. android:imeOptions="actionSearch"
  21. android:inputType="text"
  22. android:hint="请输入关键字"/>
  23. <ImageView
  24. android:visibility="gone"
  25. android:layout_marginRight="20dp"
  26. android:src="@drawable/iv_delete_bg"
  27. android:id="@+id/search_iv_delete"
  28. android:layout_gravity="right|center_vertical"
  29. android:layout_width="wrap_content"
  30. android:layout_height="wrap_content"/>
  31. </FrameLayout>
  32. <Button
  33. android:id="@+id/search_btn_back"
  34. android:layout_marginRight="10dp"
  35. android:layout_marginTop="10dp"
  36. android:layout_marginBottom="10dp"
  37. android:layout_gravity="center_vertical"
  38. android:background="@drawable/btn_search_bg"
  39. android:layout_width="@dimen/btn_width"
  40. android:layout_height="@dimen/btn_height"
  41. android:text="返回"
  42. android:textColor="@color/color_white"/>
  43. </LinearLayout>
时间: 2024-07-28 15:22:16

搜索框代码的相关文章

各大搜索引擎之搜索框代码

      关于各大网站的搜索引擎搜索框代码,Arison已亲自尝试,确实很强大耶.在此和大家分享下.新人呆ben.欢迎吐槽交流~~!! 百度baidu搜索站内免费搜索代码:--------------------------------------------------------------------------------·百度向网友开放免费下载百度搜索代码.·只需将以下代码之一加入到您的网页中,您的网站即可获得百度搜索引擎一样强大的搜索功能!使用本段代码时,您只需要用您的网站地址替换

搜索框代码块

#pragma mark UISearchBarDelegate 中可选实现的方法 //执行searchBar代理方法(开始编辑) -(void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText { //如果文本框的内容为nil的时候,返回searchMyTeams,teams以及teamName均为初始阶段的内容 if ([searchText length]==0) { return; } NSMu

微信小程序搜索框代码组件

search.wxml <view class="header"> <view class="search"> <icon type="search" size="18" color=""> </icon> <input type="text" confirm-type="search" bindconfirm=&

站长工具|百度搜索框提示功能

百度向站长开放免费“百度搜索框”代码和“百度搜索框提示”代码.只需进行简单的设置, 即可将“ 百度搜索框( 带提示功能)”功能快速加入到您的网页中.提升用户在网站中的搜索体验. 根据不同类型的网站需求,站长工具一共提供三种引入方式供您选择: 简单方式——方便的将“百度搜索框(带提示功能)”直接加入到您的网页中.将以下代码加入到您的网页中,即可获得带有“搜索框提示”功能的百度搜索框 HTML代码: <form action=”http://www.baidu.com/baidu” target=”

3种精美Web前端搜索框展示(附源码)

1.  jQuery按栏目搜索框代码 赶紧来体验一下. 源码下载/  在线演示 2.  CSS3带凹槽搜索框 这个插件集成了一些非常好的 JavaScript 库,提供一个方便使用的文本动画插件. 源码下载/  在线演示 3.jQuery视频侧边隐藏搜索框 jquery实现的,会在当鼠标光标移动到接近(或通过)视口(viewport)的顶部的时候触发. 源码下载 /   在线演示 3种精美Web前端搜索框展示(附源码)

“百度搜索框提示”代码

使用方法: 百度提供了2种自定义调用的方法方法一: 第一步为需要添加“百度搜索框提示”功能的<input>标签添加baiduSug属性.例如:<input type=”text” name=”word” baiduSug=”1|2″>当设置baiduSug=1时,用户选中sug词条时默认执行表单提交动作:当设置baiduSug=2时,用户选中sug词条时不执行表单提交动作.       第二步      在网页中引入Javascript文件: <script charset=

搜索框关键字智能匹配实例代码实例

搜索框关键字智能匹配实例代码实例:只要使用搜索引擎的朋友应该都有这样的体会,就是当在搜索框输入关键字的时候,会出现自能匹配现象,这绝对是非常好的用户体验,下面就是一段类似的代码,当然这里只是掩饰,所以只能匹配的数据都是本地固定好的,在实际应用中可以才能够数据库读取数据.代码实例如下: <!DOCTYPE html> <html> <head> <meta charset=" utf-8"> <meta name="auth

有道搜索框的代码--题解

[Youdao2010] 有道搜索框 ★☆ 输入文件:youdao.in 输出文件:youdao.out 简单对比 时间限制:1 s 内存限制:128 MB [问题描述] 在有道搜索框中,当输入一个或者多个字符时,搜索框会出现一定数量的提示,如下图所示: 现在给你 N 个单词和一些查询,请输出提示结果,为了简这个问题,只需要输出以查询词为前缀的并且按字典序排列的最前面的 8 个单词,如果符合要求的单词一个也没有请只输出当前查询词. [输入文件] 第一行是一个正整数 N ,表示词表中有 N 个单词

搜索框带有搜索提示点击消失代码实例

搜索框带有搜索提示点击消失代码实例: 搜索框大家一定都不陌生,因为随时都可以用到,比较人性化的搜索框都有这样的效果,默认情况有搜索提示,点击搜索框,提示内容消失,下面就通过代码实例介绍一下如何实现此功能. 代码如下: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="author" content="http://www.5