小编Len*_*ene的帖子

SQLite查询,'LIKE'

我正在尝试从我的数据库中检索信息.
我有像Lim Won Mong和的话Limited.

如果我做我的查询,SELECT name FROM memberdb WHERE name LIKE '%LIM%'时,会显示这两个Lim Won MongLimited我只希望从数据中Lim Won Mong.

我应该如何重写我的查询?

sql sqlite sql-like

16
推荐指数
1
解决办法
5万
查看次数

android上的密码提示

我正在尝试输入密码,当用户输入错误的密码时,会显示一个要求"取消"或"重试"的对话框,当用户点击"重试"时,它会再次显示密码提示.

下面的图片来说明我的意思

在此输入图像描述

在此输入图像描述

这就是我做到的

 /** RETRIEVE VIEW FROM DIALOGPROMPT.XML AND SET VIEW AS AN ALERTDIALOG BUILDER **/
                LayoutInflater li = LayoutInflater.from(context);
                View promptsView = li.inflate(R.layout.searchprompt, null);
                AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);
                alertDialogBuilder.setView(promptsView);

                final EditText userInput = (EditText) promptsView
                        .findViewById(R.id.user_input);


                // set dialog message
                alertDialogBuilder
                    .setCancelable(false)
                    .setNegativeButton("Go",
                      new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog,int id) {
                            /** DO THE METHOD HERE WHEN PROCEED IS CLICKED*/
                            String user_text = (userInput.getText()).toString();

                            /** CHECK FOR USER'S INPUT **/
                            if (user_text.equals("oeg"))
                            {
                                Log.d(user_text, "HELLO THIS IS …
Run Code Online (Sandbox Code Playgroud)

android android-alertdialog

12
推荐指数
1
解决办法
2万
查看次数

标签 统计

android ×1

android-alertdialog ×1

sql ×1

sql-like ×1

sqlite ×1