All Projects → YangsBryant → Bsearchedit

YangsBryant / Bsearchedit

EditText搜索结果下拉框、自动or回调模式、可diy、使用超简便 (EditText search results drop-down box, auto or callback mode, diy, easy to use)

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Bsearchedit

Alfred Learn Anything
Alfred workflow to search Learn Anything
Stars: ✭ 115 (-5.74%)
Mutual labels:  search
Haystack
🔍 Haystack is an open source NLP framework that leverages Transformer models. It enables developers to implement production-ready neural search, question answering, semantic document search and summarization for a wide range of applications.
Stars: ✭ 3,409 (+2694.26%)
Mutual labels:  search
Jstarcraft Example
基于JStarCraft RNS引擎,Spring Boot框架和公共数据集搭建的千人千面演示项目. 系统会根据用户的行为记录,自动调整用户的推荐内容和搜索内容.使用者可以通过该项目了解*推荐系统*与*搜索系统*的运作流程. 涵盖了个性化推荐与个性化搜索2个部分.
Stars: ✭ 119 (-2.46%)
Mutual labels:  search
Mapboxgeocoder.swift
Address search and reverse geocoding in Swift or Objective-C on iOS, macOS, tvOS, and watchOS
Stars: ✭ 115 (-5.74%)
Mutual labels:  search
Validator
A tool to validate text inside TextInputLayout
Stars: ✭ 117 (-4.1%)
Mutual labels:  edittext
Regular
🔍The convenient paste of regular expression🔎
Stars: ✭ 118 (-3.28%)
Mutual labels:  search
Faltu
Search sort, filter, limit an array of objects in Mongo-style.
Stars: ✭ 112 (-8.2%)
Mutual labels:  search
Searcher
Searcher core
Stars: ✭ 121 (-0.82%)
Mutual labels:  search
Instant Username Search
⚡ Instantly search for the availability of your username on more than 100 social media sites.
Stars: ✭ 118 (-3.28%)
Mutual labels:  search
Sscustomedittextoutlineborder
Same as an Outlined text fields presented in Material Design page but with some dynamic changes
Stars: ✭ 119 (-2.46%)
Mutual labels:  edittext
Hypertag
Knowledge Management for Humans using Machine Learning & Tags
Stars: ✭ 116 (-4.92%)
Mutual labels:  search
Googleimageshell
Google image search extension for Windows Explorer.
Stars: ✭ 116 (-4.92%)
Mutual labels:  search
Dfi
Peer-to-peer torrent indexing
Stars: ✭ 118 (-3.28%)
Mutual labels:  search
Search Online
🔍A simple extension for VSCode to search online easily using search engine.
Stars: ✭ 115 (-5.74%)
Mutual labels:  search
Ext Solr
A TYPO3 extension that integrates the Apache Solr search server with TYPO3 CMS. dkd Internet Service GmbH is developing the extension. Community contributions are welcome. See CONTRIBUTING.md for details.
Stars: ✭ 118 (-3.28%)
Mutual labels:  search
Searchable
Search/filter functionality for Laravel's Eloquent models
Stars: ✭ 113 (-7.38%)
Mutual labels:  search
Searchobjectgraphql
GraphQL plugin for SearchObject gem
Stars: ✭ 118 (-3.28%)
Mutual labels:  search
Whoogle Search
A self-hosted, ad-free, privacy-respecting metasearch engine
Stars: ✭ 4,645 (+3707.38%)
Mutual labels:  search
Elassandra
Elassandra = Elasticsearch + Apache Cassandra
Stars: ✭ 1,610 (+1219.67%)
Mutual labels:  search
Distancepicker
Custom UIKit control to select a distance with a pan gesture, written in Swift
Stars: ✭ 118 (-3.28%)
Mutual labels:  search

BSearchEdit

这是一张图片

引入module

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://www.jitpack.io' }
    }
}
implementation 'com.github.YangsBryant:BSearchEdit:1.0.8'

#支持自动展示搜索条目

#支持手动展示搜索条目(可自己记录历史数据,可等请求回调后弹出搜索条目)

#背景支持颜色,selector,图片等资源属性

BSearchEdit动态属性

方法名 属性
build() 参数设置完毕,一定要build一下
setTimely(boolean timely) 是否自动展示搜索条目,默认true
showPopup() 手动弹出搜索条目,当setTimely为true时失效
setTextClickListener(TextClickListener textClickListener) 点击监听器
setTextWidth(int textWidth) 设置文本宽度,单位dp
setTextHeight(int textHeight) 设置文本高度,单位dp
setTextSize(int textSize) 设置文本字体大小
setTextColor(int textColor) 设置文本颜色
setLine_height(int line_height) 设置线条高度,单位dp
setLine_width(int line_width) 设置线条宽度,单位dp
setIsLine(boolean isLine) 是否显示分割线
setPopup_bg(int popup_bg) 设置窗体背景,可以是图片,颜色,selector等资源

关键代码

        EditText editText = findViewById(R.id.edit_text);//获取一个EditText
        bSearchEdit = new BSearchEdit(this,editText,200);//第三个必须要设置窗体的宽度,单位dp
        bSearchEdit.build();
        //更新数据
        bSearchEdit.setSearchList(list);

#Tips:遇到is your activity running? 那是因为activity还未创建,showPopup()调用的太早了

演示代码

public class MainActivity extends AppCompatActivity {

    private ArrayList<String> list;
    private BSearchEdit bSearchEdit;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        list = new ArrayList<>();
        list.add("江西省赣州市");
        list.add("广东省深圳市");
        list.add("广东省珠海市");

        EditText editText = findViewById(R.id.edit_text);
        bSearchEdit = new BSearchEdit(this,editText,200);
        bSearchEdit.build();
        bSearchEdit.setSearchList(list);

        bSearchEdit.setTextClickListener(new BSearchEdit.TextClickListener() {
            @Override
            public void onTextClick(int position, String text) {
                Toast.makeText(MainActivity.this,text,Toast.LENGTH_SHORT).show();
            }
        });

        Button button01 = findViewById(R.id.button01);
        button01.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                list.clear();
                list.add("小米 9pro");
                list.add("华为 mate30");
                list.add("vivo nex3");
                list.add("iPhone 11");
                bSearchEdit.setSearchList(list);
                Toast.makeText(MainActivity.this,"更新数据成功",Toast.LENGTH_SHORT).show();
            }
        });

        Button button02 = findViewById(R.id.button02);
        button02.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                list.clear();
                list.add("瑞士民众抵制5G");
                list.add("威马汽车起火");
                list.add("王者荣耀新英雄西施");
                list.add("黄渤出演姜子牙");
                list.add("北京天空飞机刷屏");
                list.add("Kimi名字由来");
                bSearchEdit.setSearchList(list);
                Toast.makeText(MainActivity.this,"更新数据成功",Toast.LENGTH_SHORT).show();
            }
        });
    }
}

#演示代码工程里有

联系QQ:961606042

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].