Stefan A
- Forum-Beiträge: 18
10.05.2012, 11:59:07 via Website
10.05.2012 11:59:07 via Website
Hallo,
ich verwende HorizontalScrollView und Tabhost, um ein scrollendes Menü zu erzeugen.
Leider wird mir der der Tab nach 2/3 einfach abgeschnitten.
Hier mal meine XML:
Kann mir da jemand helfen bitte?
Danke.
Gruß
ich verwende HorizontalScrollView und Tabhost, um ein scrollendes Menü zu erzeugen.
Leider wird mir der der Tab nach 2/3 einfach abgeschnitten.
Hier mal meine XML:
1<?xml version="1.0" encoding="utf-8"?>
2<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:orientation="vertical"
4 android:layout_width="fill_parent"
5 android:layout_height="fill_parent">
6
7 <LinearLayout
8 android:layout_width="fill_parent"
9 android:layout_height="wrap_content"
10 android:orientation="horizontal">
11
12 <TabHost
13 android:id="@android:id/tabhost"
14 android:layout_width="match_parent"
15 android:layout_height="match_parent"
16 >
17
18 <HorizontalScrollView
19 android:layout_width="fill_parent"
20 android:layout_height="fill_parent">
21
22 <LinearLayout
23 android:id="@+id/linearLayout1"
24 android:layout_width="fill_parent"
25 android:layout_height="wrap_content"
26 android:orientation="vertical" >
27
28 <TabWidget
29 android:id="@android:id/tabs"
30 android:layout_width="fill_parent"
31 android:layout_height="wrap_content" >
32 </TabWidget>
33
34 <FrameLayout
35 android:id="@android:id/tabcontent"
36 android:layout_width="fill_parent"
37 android:layout_height="wrap_content"
38 android:visibility="gone">
39
40 <TextView
41 android:id="@+id/textview1"
42 android:layout_width="wrap_content"
43 android:layout_height="wrap_content"
44 android:visibility="gone"/>
45
46
47 </FrameLayout>
48 </LinearLayout>
49 </HorizontalScrollView>
50 </TabHost>
51
52 </LinearLayout>
53
54
55 <android.support.v4.view.ViewPager
56 android:layout_width="fill_parent"
57 android:layout_height="fill_parent"
58 android:id="@+id/viewPager" />
59</LinearLayout>
2<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:orientation="vertical"
4 android:layout_width="fill_parent"
5 android:layout_height="fill_parent">
6
7 <LinearLayout
8 android:layout_width="fill_parent"
9 android:layout_height="wrap_content"
10 android:orientation="horizontal">
11
12 <TabHost
13 android:id="@android:id/tabhost"
14 android:layout_width="match_parent"
15 android:layout_height="match_parent"
16 >
17
18 <HorizontalScrollView
19 android:layout_width="fill_parent"
20 android:layout_height="fill_parent">
21
22 <LinearLayout
23 android:id="@+id/linearLayout1"
24 android:layout_width="fill_parent"
25 android:layout_height="wrap_content"
26 android:orientation="vertical" >
27
28 <TabWidget
29 android:id="@android:id/tabs"
30 android:layout_width="fill_parent"
31 android:layout_height="wrap_content" >
32 </TabWidget>
33
34 <FrameLayout
35 android:id="@android:id/tabcontent"
36 android:layout_width="fill_parent"
37 android:layout_height="wrap_content"
38 android:visibility="gone">
39
40 <TextView
41 android:id="@+id/textview1"
42 android:layout_width="wrap_content"
43 android:layout_height="wrap_content"
44 android:visibility="gone"/>
45
46
47 </FrameLayout>
48 </LinearLayout>
49 </HorizontalScrollView>
50 </TabHost>
51
52 </LinearLayout>
53
54
55 <android.support.v4.view.ViewPager
56 android:layout_width="fill_parent"
57 android:layout_height="fill_parent"
58 android:id="@+id/viewPager" />
59</LinearLayout>
Kann mir da jemand helfen bitte?
Danke.
Gruß
Empfohlener redaktioneller Inhalt
Mit Deiner Zustimmung wird hier ein externer Inhalt geladen.
Mit Klick auf den oben stehenden Button erklärst Du Dich damit einverstanden, dass Dir externe Inhalte angezeigt werden dürfen. Dabei können personenbezogene Daten an Drittanbieter übermittelt werden. Mehr Infos dazu findest Du in unserer Datenschutzerklärung.