title: The visibility of the items change when scrolled ListView
body: <p>I am using a list view and an adapter for loading a list,each list item has a TextView,EditText and Image..I set the visibility of the arrow and the Edit text according to the position of the list row,everything works fine when I load the list for the first time...
  But when I scroll through the list,visibility of the items keep changing...Kindly help me in this issue...The relevant codes has been attached...</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="fill_parent" android:layout_height="wrap_content"
          android:orientation="horizontal"  android:background="#FFFFFF"&gt;
      &lt;TextView android:layout_height="wrap_content"  android:layout_width="0dip"
              android:textSize="20dip" android:layout_weight="1"
              android:id="@+id/textview_add_lot_list" android:textColor="@android:color/black"
              android:paddingTop="10dip" android:paddingBottom="10dip"
              android:paddingLeft="10dip"/&gt;
      &lt;EditText android:layout_height="fill_parent" android:layout_width="0dip"
              android:layout_weight="1" android:id="@+id/et_add_lot_list"
              android:layout_gravity="center_vertical"/&gt;
      &lt;ImageView android:layout_height="wrap_content" android:layout_width="wrap_content"
              android:id="@+id/imageview_arrow_add_lot_list" android:layout_gravity="center_vertical"
              android:visibility="invisible" android:src="@drawable/more_reviews_arrow"
              android:paddingRight="10dip"/&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Java code activity...</p>
  
  <pre><code>final ArrayList&lt;String&gt; listItems       =   new ArrayList&lt;String&gt;();
          listItems.add("Parking name");
          listItems.add("Address");
          listItems.add("City");
          listItems.add("State");
          listItems.add("Zip");
          listItems.add("Phone");
          listItems.add("Web Address");
          listItems.add(" ");
          listItems.add("Parking Image");
          listItems.add(" ");
          listItems.add("Open Hours");
          listItems.add(" ");
          listItems.add("Web Reviews");
  
          final AddParkingLotAdapter adapter  =   new AddParkingLotAdapter(mAppContext,0,listItems);
          lv.setAdapter(adapter);
  </code></pre>
  
  <p>Java code...adapter</p>
  
  <pre><code>public class AddParkingLotAdapter extends ArrayAdapter&lt;String&gt; {
      private ArrayList&lt;String&gt; mStrings;
      private LayoutInflater mInflater;
      private AppContext mContext;
  
      private static int NON_EMPTY_ROW    =   1;                                                                                                          
      private static int EMPTY_ROW       =    0;
  
      public AddParkingLotAdapter(Context context, int resId, List&lt;String&gt; strings) {
          super(context, resId,strings);
          mStrings        =   (ArrayList&lt;String&gt;) strings;
          mContext        =   (AppContext) context;
          mInflater       =   LayoutInflater.from(context);
      }
      @Override
      public int getViewTypeCount() {
          return 2;                               
      }
      @Override
      public int getCount() {
          return mStrings.size();     
      }
      @Override
      public String getItem(int position) {
          return mStrings.get(position);
      }
      @Override
      public int getItemViewType(int position) {
          if(position==7||position==9||position==11){
              return EMPTY_ROW;
          }else{
              return NON_EMPTY_ROW;
          }
      }
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          TextView itemTextView   =   null;
  
          //different inflations for different type rows..
          if(getItemViewType(position) == EMPTY_ROW){
              if (convertView == null) {
                  convertView         =   mInflater.inflate(R.layout.review_empty_row, null);
              }
          }else if(getItemViewType(position) == NON_EMPTY_ROW){
              if (convertView == null) {
                  convertView     =   mInflater.inflate(R.layout.add_parkinglist_item, null);
              }
              itemTextView        =   (TextView) convertView.findViewById(R.id.textview_add_lot_list);
              itemTextView.setText(mStrings.get(position));
              if (position==3||position==8||position==10||position==12){
                  ImageView itemImageView       =   (ImageView)convertView.findViewById(R.id.imageview_arrow_add_lot_list);
                  itemImageView.setVisibility(View.VISIBLE);
                  EditText editText             =   (EditText)convertView.findViewById(R.id.et_add_lot_list);
                  editText.setVisibility(View.INVISIBLE);
              }
          }
          return convertView;
      }
  }
  </code></pre>