title: Changing object's text color in an array list
body: <p>I'm been trying to add a color parameter in the Array List:</p>
  <p>MainActivity.java:</p>
  <pre><code>package com.example.ofir.myapplication;
  
  import android.content.Intent;
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.AdapterView;
  import android.widget.ArrayAdapter;
  import android.widget.ListView;
  
  import java.util.ArrayList;
  
  public class MainActivity extends AppCompatActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          final ArrayList&lt;Brands&gt; brands = new ArrayList&lt;&gt;();
          brands.add(new Brands(&quot;KTM&quot;));
          brands.add(new Brands(&quot;BMW&quot;));
          brands.add(new Brands(&quot;Suzuki&quot;));
          brands.add(new Brands(&quot;Yamaha&quot;));
          brands.add(new Brands(&quot;HONDA&quot;));
  
          BrandAdapter itemsAdapter = new BrandAdapter(this, brands);
  
          ListView listView = (ListView) findViewById(R.id.brandlist);
  
          listView.setAdapter(itemsAdapter);
  
          listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
              @Override
              public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
                  brands.get(position);
                  Intent intent = new Intent(MainActivity.this, infoPage.class );
                  startActivity(intent);
              }
          });
      }
  }
  </code></pre>
  <p>BrandAdapter.java</p>
  <pre><code> package com.example.ofir.myapplication;
      import android.app.Activity;
      import android.support.annotation.NonNull;
      import android.support.annotation.Nullable;
      import android.view.LayoutInflater;
      import android.view.View;
      import android.view.ViewGroup;
      import android.widget.ArrayAdapter;
      import android.widget.ImageView;
      import android.widget.TextView;
      
      import java.util.ArrayList;
      
      /**
       * Created by Ofir on 21-Mar-17.
       */
      public class BrandAdapter extends ArrayAdapter&lt;Brands&gt;{
      
          private int mColorResourceId;
      
          //Resource id for background color of list
      
          public BrandAdapter(Activity context, ArrayList&lt;Brands&gt; brands) {
              super(context, 0, brands);
             // mColorResourceId = ColorId;
      
          }
      
          @Override
          public View getView(int position,  View convertView, ViewGroup parent) {
              // check if the current view is reused else inflate the view
              View listItemView = convertView;
              if(listItemView == null){
                  listItemView = LayoutInflater.from(getContext()).inflate(R.layout.activity_main, parent, false);
              }
      
              Brands brand_item = getItem(position);
      
              TextView brandName = (TextView) listItemView.findViewById(R.id.brandtextview);
              brandName.setText(brand_item.getBrand());
      
              return listItemView;
          }
      }
  </code></pre>
  <p>Brands.java</p>
  <pre><code>package com.example.ofir.myapplication;
  import android.os.Bundle;
  import android.support.v7.app.AppCompatActivity;
  
  /**
   * Created by Ofir on 20-Mar-17.
   */
  
  public class Brands extends AppCompatActivity {
  
      private String mBrandName;
    
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
      }
  
      public Brands(String brandName){
          mBrandName = brandName;
        
  }
  
      public String getBrand(){
          return mBrandName;
      }
          }
      }
  </code></pre>
  <p>I'm trying to add a colour to the <code>Arraylist</code> so instead of</p>
  <pre><code>brands.add(new Brands(&quot;KTM&quot;));
  </code></pre>
  <p>I'll have this line of code:</p>
  <pre><code>brands.add(new Brands(&quot;KTM&quot;, Orange));
  </code></pre>
  <p>and the text colour will change accordingly to the colour orange.</p>