即時通訊嘗試填充我的列表視圖下我的選項卡功能,但由於某種原因它沒有出現在我的應用程序。我在外部項目中採樣代碼,它的工作原理,我不知道爲什麼它不出現。我是否在清單中實施了錯誤的活動,或者是否有相反的代碼?選擇按鈕時不會出現錯誤或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