Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/355.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 安卓textview添加几个过滤器,并找到最佳匹配_Java_Android_Filter_Set - Fatal编程技术网

Java 安卓textview添加几个过滤器,并找到最佳匹配

Java 安卓textview添加几个过滤器,并找到最佳匹配,java,android,filter,set,Java,Android,Filter,Set,我想创建一个应用程序,它从用户那里获得一些文本输入,然后在集合中找到最佳匹配。 举例说明 first = x ,y , z, t second = a , b ,c ,d third= = h , i , j, k , a , b 如果用户写a,那么写b;第二个和第三个只出现 我想创建一个-不确定的词-数据库,有信息或关键字的东西 istanbul will have some info about it. like galata tower and , süleymaniye mosque

我想创建一个应用程序,它从用户那里获得一些文本输入,然后在集合中找到最佳匹配。 举例说明

first = x ,y , z, t
second = a , b ,c ,d
third=  = h , i , j, k , a , b
如果用户写a,那么写b;第二个和第三个只出现

我想创建一个-不确定的词-数据库,有信息或关键字的东西

istanbul will have some info about it. like galata tower and , süleymaniye mosque
paris has eiffel tower
what i want to do is when user write tower , list istanbul and paris and then if user writes suleymaniye , show istanbul

我是一个刚接触安卓系统的人,所以我需要知道我应该使用哪种方法。谢谢。

谢谢你的评论,我理解你的观点。但我现在正在更新我的问题,如果我认为还有其他问题的话,使用它会有点复杂。
Edittext et=(Edittext)findviewByid(R.id.edittext1);
 String str=et.gettext().toString();
    Textview tx=(Textview)findviewByid(R.id.textview);
    if(str.equal("x") or str.equal("y") orstr.equal("z"))
    {
    tx.settext("first");
    }
    elseif("check your condition")
    {
    tx.settext("Second");
    }
    else("check condition")
    {
    tx.settext("third");
    }