title: Issue in inflating a view dynamically
body: <p>I am adding a layout dynamically to current view. Even if but problem is that even if i had more then two values in cursor Only one view is inflated. </p>
  
  <p>It means old data is overridden. But i want to add new view per record in <code>phoneCrsr</code>.</p>
  
  <p>What I'm doing wrong  ???</p>
  
  <pre><code>            Cursor phoneCrsr = database.rawQuery(phoneSql, null);
              while(phoneCrsr.moveToNext()){
                  phone_number = new ArrayList&lt;String&gt;();                 
                  String number = phoneCrsr.getString(phoneCrsr.getColumnIndex(MySQLiteHelper.COLUMN_PHN_NUMBER));
  
                  if(!number.isEmpty()){
                      phone_number.add(number);                   
  
                      LayoutInflater inflator = (LayoutInflater) getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                      View view = inflator.inflate(R.layout.phone_number_textview, null);
  
                      // fill in any details dynamically here
                      TextView phoneTv = (TextView) view.findViewById(R.id.phone_number);
                      phoneTv.setText(number);
  
                      // insert into main view
                      LinearLayout phoneLayout = (LinearLayout) findViewById(R.id.phone_info);
                      phoneLayout.setVisibility(View.VISIBLE);
                      ((ViewGroup) phoneLayout).addView(view, 0, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT));
  
                      //phoneLayout.setPadding(20,0,0, 0);
                      //phoneLayout.setBackgroundColor(Color.WHITE);      
                  }                   
                  Log.e("PHONE DETAIL:",phone_number.toString());
              }
              phoneCrsr.close();
  </code></pre>