J
jaipur
Neues Mitglied
- 0
hallo zusammen,
ich möchte gerne ein programm erstellen welches mit registerkarten aufgebaut ist und in diesen möchte ich gerne listen anzeigen.
folgendes habe ich dabei heraus gefunden um ein programm mit tabs darstellen:
AndroidManifest.xml
ich möchte gerne ein programm erstellen welches mit registerkarten aufgebaut ist und in diesen möchte ich gerne listen anzeigen.
folgendes habe ich dabei heraus gefunden um ein programm mit tabs darstellen:
AndroidManifest.xml
Code:
[SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]<?[/COLOR][/SIZE]
[LEFT][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]xml[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]version[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"1.0"[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]encoding[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"utf-8"[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]?>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]<[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]manifest[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]xmlns:android[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"http://schemas.android.com/apk/res/android"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]package[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"com.meinzeug.playground"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:versionCode[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"1"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:versionName[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"1.0"[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[/LEFT]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]<[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]application[/COLOR][/SIZE][/COLOR][/SIZE]
[LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:icon[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"@drawable/icon"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:label[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"@string/app_name"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:theme[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"@android:style/Theme.NoTitleBar"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[/LEFT]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]<[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]activity[/COLOR][/SIZE][/COLOR][/SIZE]
[LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:name[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]".MyPlayGround"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:label[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"@string/app_name"[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[/LEFT]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]<[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]intent-filter[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]>[/COLOR][/SIZE][/COLOR][/SIZE]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]<[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]action[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:name[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"android.intent.action.MAIN"[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]/>[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]<[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]category[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:name[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"android.intent.category.LAUNCHER"[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]/>[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]</[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]intent-filter[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[/LEFT]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]</[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]activity[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]<[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]activity[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:name[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]".MyTab1"[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]/>[/COLOR][/SIZE][/COLOR][/SIZE]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]<[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]activity[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:name[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]".MyTab2"[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]/>[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]<[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]activity[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:name[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]".MyTab3"[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]/>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[/LEFT]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]</[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]application[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]<[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]uses-sdk[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:minSdkVersion[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"7"[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]/>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]</[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]manifest[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]>[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008080][/LEFT]
[/COLOR][/SIZE]
main.xml
Code:
[SIZE=2][COLOR=#008080][LEFT][SIZE=2][COLOR=#008080]<?[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[SIZE=2][COLOR=#008080]
[LEFT][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]xml[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]version[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"1.0"[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]encoding[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"utf-8"[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]?>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]<[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[SIZE=2][COLOR=#008080]
[LEFT][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]TabHost[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]xmlns:android[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"http://schemas.android.com/apk/res/android"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:id[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"@android:id/tabhost"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:layout_width[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"fill_parent"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:layout_height[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"fill_parent"[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[/LEFT]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]<[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]LinearLayout[/COLOR][/SIZE][/COLOR][/SIZE]
[LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:orientation[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"vertical"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:layout_width[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"fill_parent"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:layout_height[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"fill_parent"[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[/LEFT]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]<[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]TabWidget[/COLOR][/SIZE][/COLOR][/SIZE]
[LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:id[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"@android:id/tabs"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:layout_width[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"fill_parent"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:layout_height[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"wrap_content"[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]/>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[/LEFT]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]<[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]FrameLayout[/COLOR][/SIZE][/COLOR][/SIZE]
[LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:id[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"@android:id/tabcontent"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:layout_width[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"fill_parent"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:layout_height[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"fill_parent"[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[/LEFT]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]<[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]TextView[/COLOR][/SIZE][/COLOR][/SIZE]
[LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:id[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"@+id/textview1"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:layout_width[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"fill_parent"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:layout_height[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"fill_parent"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:text[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"this is a tab"[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]/>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[/LEFT]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]</[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]FrameLayout[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]</[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]LinearLayout[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]</[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]TabHost[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]>[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008080][/LEFT]
[/COLOR][/SIZE]
mytab1.xml
Code:
[SIZE=2][COLOR=#008080][LEFT][SIZE=2][COLOR=#008080]<?[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[SIZE=2][COLOR=#008080]
[LEFT][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]xml[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]version[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"1.0"[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]encoding[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"utf-8"[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]?>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]<[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[SIZE=2][COLOR=#008080]
[LEFT][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]LinearLayout[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]xmlns:android[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"http://schemas.android.com/apk/res/android"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:id[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"@+id/LinearLayout01"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:layout_width[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"fill_parent"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:layout_height[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"fill_parent"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[/LEFT]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]<[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]TextView[/COLOR][/SIZE][/COLOR][/SIZE]
[LEFT][SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:layout_width[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"fill_parent"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:layout_height[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"wrap_content"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#7f007f][SIZE=2][COLOR=#7f007f]android:text[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]=[/SIZE][I][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"erste"[/COLOR][/SIZE][/COLOR][/SIZE][/I]
[SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]/>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[/LEFT]
[LEFT][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]</[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
[SIZE=2][COLOR=#008080]
[LEFT][/COLOR][/SIZE][SIZE=2][COLOR=#3f7f7f][SIZE=2][COLOR=#3f7f7f]LinearLayout[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#008080][SIZE=2][COLOR=#008080]>[/COLOR][/SIZE][/COLOR][/SIZE][/LEFT]
main.java
Code:
[SIZE=2][COLOR=#7f0055][LEFT][B][SIZE=2][COLOR=#7f0055]public[/COLOR][/SIZE][/B][/COLOR][/SIZE][/LEFT]
[SIZE=2][COLOR=#7f0055]
[LEFT][/COLOR][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]class[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] MyPlayGround [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]extends[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] TabActivity[/SIZE]
[SIZE=2]{[/SIZE]
[LEFT][SIZE=2][COLOR=#3f5fbf][SIZE=2][COLOR=#3f5fbf]/** Called when the activity is first created. */[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#646464][SIZE=2][COLOR=#646464]@Override[/COLOR][/SIZE][/COLOR][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/COLOR][/SIZE][/COLOR][/SIZE][/B][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] onCreate(Bundle savedInstanceState)[/SIZE]
[SIZE=2]{[/SIZE]
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]super[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2].onCreate(savedInstanceState);[/SIZE][/LEFT]
[/LEFT]
[LEFT][SIZE=2]TabHost tabHost = getTabHost();[/SIZE]
[LEFT][SIZE=2]tabHost.addTab(tabHost.newTabSpec([/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"1"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]).setIndicator([/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"1"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]).setContent([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] Intent([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2], MyTab1.[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]class[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2])));[/SIZE]
[SIZE=2]tabHost.addTab(tabHost.newTabSpec([/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"2"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]).setIndicator([/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"2"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]).setContent([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] Intent([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2], MyTab2.[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]class[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2])));[/SIZE]
[SIZE=2]tabHost.addTab(tabHost.newTabSpec([/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"3"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]).setIndicator([/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"3"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]).setContent([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]new[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] Intent([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]this[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2], MyTab3.[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]class[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2])));[/SIZE][/LEFT]
[SIZE=2]}[/SIZE]
[SIZE=2]}[/SIZE][/LEFT]
mytab1.java
Code:
[SIZE=2][COLOR=#7f0055][LEFT][B][SIZE=2][COLOR=#7f0055]package [/COLOR][/SIZE][/B][/LEFT]
[/COLOR][/SIZE][LEFT][SIZE=2]com.meinzeug.playground;[/SIZE][/LEFT]
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]import [/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2]android.app.Activity;[/SIZE][/LEFT]
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]import [/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2]android.os.Bundle;[/SIZE][/LEFT]
[LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/COLOR][/SIZE][/COLOR][/SIZE][/B][/LEFT]
[SIZE=2][COLOR=#7f0055]
[LEFT][/COLOR][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]class[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] MyTab1 [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]extends[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] Activity[/SIZE]
[SIZE=2]{[/SIZE]
[LEFT][SIZE=2][COLOR=#646464][SIZE=2][COLOR=#646464]@Override[/COLOR][/SIZE][/COLOR][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]public[/COLOR][/SIZE][/COLOR][/SIZE][/B][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2] onCreate(Bundle savedInstanceState)[/SIZE]
[SIZE=2]{[/SIZE]
[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]super[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2].onCreate(savedInstanceState);[/SIZE]
[SIZE=2]setContentView(R.layout.[/SIZE][I][SIZE=2][COLOR=#0000c0][SIZE=2][COLOR=#0000c0]mytab1[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2]);[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2]}[/SIZE][/LEFT]
[/LEFT]
was mir jetzt aber leider nicht gelingt: ich schaffe es nicht in einem tab ein ListView darzustellen, egal was ich versuche, es gelingt mir einfach nicht, bekomme jedesmal von eclipse ein forece close ...
daher nun meine frage an euch ohne meine misslungenen versuche zu erläutern: wie stelle ich eine listview in einem tabhost (tabwidget?) dar?
diese listview wollte ich gerne von zeit zu zeit erweitern, man nennt das glaube ich complex item?