从数据库中获取数据,并设置它的EditText

问题描述:

我做一个注册页面我application.For这一点,我需要插入的注册信息中的SQLite DB.Once登记完成后,领域的EditText应显示这些细节,从数据库中获取并提交按钮和文本田应禁用从第二次停止registration.Can有人建议合适的方式?

I am doing a registration page for my application.For this I need to insert the registration details in to sqlite DB.Once the registration is done,the edittext fields should display those details fetching it from database and the submit button and text fields should be disabled to stop from a second time registration.Can anyone suggest the suitable way?

检查code在以下链接的 Android的SQLite的

Check code for database in the following link Android SQLite

您必须存储在ArrayList中的价值,这是从数据库reterived和值设置为编辑文本

you have to store the value in arraylist and which is reterived from database and set the value to the edit text as

 editText.setText(myarraylist.get(0)); //here myarraylist is the arraylist which contains data retrive from database

数据reterived

在你要检查车况是否editText.getText()。的toString()长度大于零不应该让他们通过编辑EDITTEXT在后面的文字

After the data is reterived you have to check the condition whether editText.getText().toString() length is greater then zero you should not allow them to edit the text in editText by using following

  editText.setFocusable(false);