pawan nimje wrote: > Hi all, > > I am adding listview programmatically. > My code is as follow. > > <------- start > > LinearLayout llIn2 = new LinearLayout(this); > llIn2.setOrientation(LinearLayout.VERTICAL); > > llIn2.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, > LayoutParams.FILL_PARENT)); > > ListView lv = new ListView(this); > > lv.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, > LayoutParams.FILL_PARENT)); > lv.setAdapter(new ArrayAdapter<String>(getApplicationContext(), > android.R.layout.simple_list_item_1, alPlaces)); > > llIn2.addView(lv); > > this.setContentView(llIn2); > > <------end > > now i want to change the size and color of text. > > [there is know method like lv.settextsize / lv.settextcolor ]
You need to change the rows, not the ListView. Instead of using android.R.layout.simple_list_item_1, create your own row layout that is styled the way you want it to be. Here is an excerpt from one of my books that covers this process: http://commonsware.com/Android/excerpt.pdf -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

