check EditText value onto ListView android

i am using ListView in main activity and class adapter extends ArrayAdapter with login form only one row.

code adapter like this"

public class AdapterLogin extends ArrayAdapter<ListArrayItem> {

Context mContext;
int layoutResourceId;
ListArrayItem data[] = null;
  public AdapterLogin(Context mContext, int layoutResourceId, ListArrayItem[] data) {

    super(mContext, layoutResourceId, data);

    this.layoutResourceId = layoutResourceId;
    this.mContext = mContext; = data;
   public View getView(final int position, View convertView, ViewGroup parent) {


        LayoutInflater inflater = ((Activity) mContext).getLayoutInflater();
        convertView = inflater.inflate(layoutResourceId, parent, false);
//here i have for login like this
  lin_form = new LinearLayout(mContext);
  EditText email_input = new EditText(mContext);  
  Button  btn_sign = new Button(mContext);
  TextView login_status_message = new TextView(mContext);  
  rowitem = (RelativeLayout)convertView.findViewById(;
  return convertView;


 public OnClickListener login_btn_clicked = new OnClickListener() {
 String email_value = email_input.getText().toString();
  // i want to see email_value but doesnt show me any thing
  login_status_message.setText("email value:"+ email_value);


in main activity i have a code like this:

    FillFooter fillfooter= new FillFooter();

 public static void gotoLogin(Context context){
        Activity activity = (Activity)context;
        activity.setTitle("Broonza: Вход"); 
        list = new HashMap<String, String>();
        listarraymain[0] = new ListArrayItem(1, list);
        AdapterLogin adapter = new AdapterLogin(context, R.layout.row_item, listarraymain);

in the class fill footer

     public class FillFooter {
     public void setFooter(Context context,String typeactivity){
     this.context = context;    
     this.activity = (Activity) context;
     linaccount = new LinearLayout(context);

    public OnClickListener gotologin= new OnClickListener() {

    public void onClick(View v) {
        // TODO Auto-generated method stub


} row_item.xml

<RelativeLayout xmlns:android=""
android:id="@+id/rowitem" >

load form login with all fields from adapter to listview work fine, but when clicking button login if email field content text doesn't show that text. The problem is not in the printed error!, The problem in the printing field email value! OnCLickListener() doesnt work. it will work only if i will add text for email_field onto inside adapter like this! email_input.setText("")


I think that instead of

if(error !=""){

should be this:


This is basically a string comparsion. If you want to compare a string to a string, you should use equals() instead of !=.

Your problem is that the error value is always null and you can not see the value of email, it is not calling login_status_message.setText("email value:"+ email_value); Change this

 TextView login_status_message = new TextView(mContext);

by this:

 TextView login_status_message = new TextView(mContext);

Your is initializing under the getView method and is local to that block; How you are accessing this field outside the method? You have created the object local with the method as-

   EditText email_input = new EditText(mContext); 
   TextView login_status_message = new TextView(mContext);  

inside the getView method. You need to put your Listener inside the getView method as

    btn_sign.setOnClickListener(new OnClickListener() {
    String email_value = email_input.getText().toString();
    // i want to see email_value but doesnt show me any thing
    login_status_message.setText("email value:"+ email_value);

Re-examine the code if you are having another duplicate fields for that.

Thank you for all). after restart eclipse, it work fine.

Need Your Help

Retrieve Hibernate Search results directly from Lucene Index

hibernate lucene full-text-search hibernate-search

How can I execute a search using Hibernate Search that will NOT retrieve the actual entities from the database and will instead just return the Document cache records for these entities? I am makin...

ImportError: No module named goose

python virtualenv pycharm goose

Im trying to work with Python-Goose extractor. I Installed virtualenv, and followed the setup instructions. When running from PyCharm everything works great.