title: Change text size of listview in android
body: <p>I am trying to change the listview text size (it seems to be pretty large by default) and am running into an error.  I think the idea is to assign a textview to the listview and change the properties of that textview, but I am beginning to think I am going about this the wrong way.  It would be greatly appreciated if somebody wouldn't mind glancing over what I am doing wrong.  Thanks in advance!</p>
  
  <p>Here is the error:</p>
  
  <pre><code>12-03 21:59:26.894  24751-24751/my.obd2connector E/AndroidRuntime﹕ FATAL EXCEPTION: main
      Process: my.obd2connector, PID: 24751
      java.lang.RuntimeException: Unable to start activity ComponentInfo{my.obd2connector/my.obd2connector.MyCar}: java.lang.ClassCastException: android.widget.ArrayAdapter cannot be cast to android.widget.TextView
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2305)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2363)
              at android.app.ActivityThread.access$900(ActivityThread.java:161)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
              at android.os.Handler.dispatchMessage(Handler.java:102)
              at android.os.Looper.loop(Looper.java:157)
              at android.app.ActivityThread.main(ActivityThread.java:5356)
              at java.lang.reflect.Method.invokeNative(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:515)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
              at dalvik.system.NativeStart.main(Native Method)
       Caused by: java.lang.ClassCastException: android.widget.ArrayAdapter cannot be cast to android.widget.TextView
              at my.obd2connector.MyCar.fillList(MyCar.java:120)
              at my.obd2connector.MyCar.onStart(MyCar.java:92)
              at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1189)
              at android.app.Activity.performStart(Activity.java:5436)
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2363)
              at android.app.ActivityThread.access$900(ActivityThread.java:161)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
              at android.os.Handler.dispatchMessage(Handler.java:102)
              at android.os.Looper.loop(Looper.java:157)
              at android.app.ActivityThread.main(ActivityThread.java:5356)
              at java.lang.reflect.Method.invokeNative(Native Method)
              at java.lang.reflect.Method.invoke(Method.java:515)
              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
              at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p>Here is the code to populate the listview where I am trying to change the size and color:</p>
  
  <pre><code>public void fillList() {   
          carList.add(make + " " + model + "\n" + vin);
  
          mylistAdapter = new ArrayAdapter&lt;String&gt;(MyCar.this, android.R.layout.simple_list_item_single_choice, carList);
  
          mylistView.setAdapter(mylistAdapter);
          TextView tv = (TextView)mylistView.getAdapter();
          tv.setTextColor(Color.RED);
          tv.setTextSize(12);
          mylistAdapter.notifyDataSetChanged();
      }
  </code></pre>