即时通讯尝试填充我的列表视图下我的选项卡功能,但由于某种原因它没有出现在我的应用程序。我在外部项目中采样代码,它的工作原理,我不知道为什么它不出现。我是否在清单中实施了错误的活动,或者是否有相反的代码?选择按钮时不会出现错误或logcat问题。它只是在选项卡下面的一个空白页面。该页面加载但没有列表。感谢ListView没有出现在应用程序
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));
}
}
在清单中的活动被添加等;
<activity android:name=".ListmoreActivity" />
万一其错误
缺少活动 – goodm 2012-02-13 11:50:12