im trying to populate my listview beneath my tab function but for some reason its not appearing in my app. I Sampled the code in a external project and it worked so Im not sure why it is not appearing. Have I implemented the activity wrong in the manifest or do I have contrary codes. No errors or logcat issues when the button is selected. Its just a blank page beneath the tab. The page loads but with no list. Thanks
XML File
<?xml version="1.0" encoding="utf-8"?>
<!-- Single List Item Design -->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/label"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dip"
android:textSize="16dip"
android:textStyle="bold" >
</TextView>
ListmoreActivity
package workout.fitty;
import android.app.ListActivity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
public class ListmoreActivity extends ListActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// storing string resources into Array
String[] adobe_products = getResources().getStringArray(R.array.adobe_products);
// Binding resources Array to ListAdapter
this.setListAdapter(new ArrayAdapter<String>(this, R.layout.main, R.id.label, adobe_products));
}
}
The Activity in the manifest is added like;
<activity android:name=".ListmoreActivity" />
Just in case its wrong
You are wrong from the inception of the code refer the link below to learn listview in android…
http://www.vogella.de/articles/AndroidListView/article.html