私は Android に TabHost を数日間実装しようとしましたが、1 つのエラーで立ち往生しています。コアのタブホスト コードを削除しましたが、まだ同じエラーが発生しています。それは私のmanifest.xmlだと思います。エラー メッセージに基づいて、ソース マニフェストを検索しましたが、見つかりませんでした。
エラー
E/AndroidRuntime(32386): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.FragmentLayout" on path: /system/framework/com.google.android.maps.jar:/data/app/com.sysdisc.mobile.hangmessage-1.apk
コード
public class AA extends FragmentActivity{
private ListView inboxList;
private ListView outboxList;
private ListView listView1;
private ListView listView2;
ProgressDialog dialog;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
dialog = new ProgressDialog(this);
dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
dialog.setMessage(getString(R.string.pleaseWait));
dialog.setTitle(R.string.loading);
setContentView(R.layout.message_history_entire_layout);
}
}
これは私のxmlです
<?xml version="1.0" encoding="utf-8"?>
<TabHost
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tabHost"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="5dp" >
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<FragmentLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp">
<ListView android:id="@+id/list1" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_weight="1">
</ListView>
<ListView android:id="@+id/list2" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_weight="1">
</ListView>
</FragmentLayout>
</LinearLayout>