I am trying to change my font(color and size) and the back ground on my ListView. I want to change it with code lines not on xml. my list view looks like: the xml:
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dp"
android:textSize="18sp" android:text="@string/hello">
</TextView>
and my code is
public class NewsActivity extends ListActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// ArrayAdapter listItemAdapter = new ArrayAdapter( this,android.R.layout.simple_list_item_1, v_itemList );
setListAdapter(new ArrayAdapter<String>(this, R.layout.list_item,ynetList));
View v=getListView() ;
ListView lv = getListView();
what next? please give me an example base on my code