title: How to change the background color in android app/ for large screen?
body: <p>I have a problem. I want to set the background color of my listview to white, but only the background color of the rows changes. How can I make the background fill the entire screen? Here is my code:</p>
  
  <pre><code>public class MyAdapter extends ArrayAdapter&lt;String&gt; {
  private final Context context;
  private final String[] values;
  
  public MyAdapter(Context context, String[] values) {
      super(context, R.layout.list_view, values);
      this.context = context;
      this.values = values;
  }
  
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
      LayoutInflater inflater = (LayoutInflater) context
          .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  
      View rowView = inflater.inflate(R.layout.list_view, parent, false);
      TextView textView = (TextView) rowView.findViewById(R.id.label);
      Typeface tf = Typeface.createFromAsset(context.getAssets(), "fonts/chalkboardse.ttc");
      textView.setTypeface(tf);
      textView.setTextColor(Color.BLACK);
      textView.setText(values[position]);
  
      LinearLayout layout = (LinearLayout)rowView.findViewById(R.id.background);
      layout.setBackgroundColor(Color.WHITE);
  
      return rowView;
  }
  }
  </code></pre>
  
  <p>Here is my xml file for the 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="match_parent"
      android:layout_height="match_parent"
      android:id="@+id/background" &gt;
  
  &lt;TextView 
      android:id="@+id/label"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:padding="10dp"
      android:textSize="20sp" &gt;
  &lt;/TextView&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Here is the corresponding activity:</p>
  
  <pre><code>public class AreaChooser extends ListActivity {
  
  static final String [] FRUIT = new String [] { "Apple", "Pear"};
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      setListAdapter(new MyAdapter(this, FRUIT));
  
  }
  }
  </code></pre>