title: How to add condition in Android View getView (int position, View convertView, ViewGroup parent)
body: <p>I have a <code>Arraylist</code> that contain a <code>hashmap</code>. hashmap contain a Topic name, Name and value. For example <code>hashmap</code> object like this.(I did not add the key for the example.)</p>
  
  <pre><code>{"Topic A", "Name 1" , "100"}  
  {"Topic A", "Name 2" , "100"}  
  {"Topic A", "Name 3" , "100"}  
  {"Topic A", "Name 4" , "100"}  
  {"Topic B", "Name 1" , "100"}  
  {"Topic B", "Name 2" , "100"}  
  {"Topic B", "Name 3" , "100"}  
  {"Topic B", "Name 4" , "100"}  
  {"Topic C", "Name 1" , "100"}  
  {"Topic C", "Name 2" , "100"}  
  {"Topic C", "Name 3" , "100"}  
  {"Topic C", "Name 4" , "100"}  
  {"Topic D", "Name 1" , "100"}  
  {"Topic D", "Name 2" , "100"}  
  </code></pre>
  
  <p>I want to make a list view like this </p>
  
  <pre><code>Topic A
  =========================
  name 1                100
  name 2                100
  name 3                100
  name 4                100
  
  Topic B
  ==========================
  name 1                100
  name 2                100
  name 3                100
  name 4                100
  
  
  Topic C
  ==========================
  name 1                100
  name 2                100
  name 3                100
  name 4                100
  
  Topic D
  ==========================
  name 1                100
  name 2                100
  name 3                100
  name 4                100
  </code></pre>
  
  <p>Here is my <code>getView(int position, View convertView, ViewGroup parent)</code> method................</p>
  
  <pre><code>public View getView(int position, View convertView, ViewGroup parent) {
  
      View v = convertView;
      if (v == null)
          v = inflater.inflate(R.layout.list_view_card_type, null);
  
      mTopic = (TextView) v.findViewById(R.id.topic);
      mItemname = (TextView) v.findViewById(R.id.name_of_item);
      mValue = (TextView)v.findViewById(R.id.value_of_item); 
  
      mTopic.setText(myArrayList.get(position).get("Topic"));
  
      mItemname.setText(myArrayList.get(position).get(
              "Name"));
      mValue.setText(myArrayList.get(position).get("Value"));
      return v;
  
  }
  </code></pre>
  
  <p>Here is my list view.</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:layout_alignParentBottom="true"
      android:background="#ffffff"
      android:orientation="vertical" &gt;
  
  
  
      &lt;TextView
          android:id="@+id/topic"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:gravity="left"
          android:paddingLeft="10dp"
          android:textSize="28dp" /&gt;
  
      &lt;TextView
          android:id="@+id/name_of_item"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:gravity="left"
          android:paddingLeft="10dp"
          android:textSize="28dp" /&gt;
  
      &lt;TextView
          android:id="@+id/value_of_item"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:gravity="left"
          android:paddingLeft="10dp"
          android:textSize="28dp" /&gt;
  
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>I try to do that with add a condition inside of the <code>getView</code> method using <code>position</code> value. But it confused me. 
  Can please someone suggest me what to do..............</p>