title: Change background of first item in ListView to red
body: <p>I have a listView called listv and I'm populating the listView with an array. I want the background of the first item in my listView to be colored red. I can populate the list however I can't get the backgrounds first item in the list to turn red.</p>
  
  <p>This is what I tried. My code is as fallows</p>
  
  <p>My Class</p>
  
  <pre><code>private ArrayList&lt;String&gt; arrayList;
  private ArrayAdapter&lt;String&gt; adapter;
  private EditText txtInput;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_list_deadlines);
      final ListView listView = (ListView)findViewById(R.id.listv);
      String[] items= {"HCI","ITM","Presentation"};
      arrayList=new ArrayList&lt;&gt;(Arrays.asList(items));
      adapter=new ArrayAdapter&lt;String&gt;(this,R.layout.list_item,R.id.txtitem,arrayList);
      listView.setAdapter(adapter);
  
      txtInput=(EditText)findViewById(R.id.txtinputs);
  
  
              if(R.id.listv == 0)
                  listView.setBackgroundColor(Color.parseColor("#fffff"));
  
  
      });
  
  }
  </code></pre>
  
  <p>xml</p>
  
  <pre><code>&lt;ListView
      android:id="@+id/listv"
      android:layout_marginTop="100dp"
      android:layout_width="wrap_content"
      android:layout_height="200dp"&gt;
  
  &lt;/ListView&gt;
  </code></pre>