Problem mit Scrollbars

D

delicious2000

Neues Mitglied
0
Hallo zusammen,

ich schon wieder ein Problem.. :)

und zwar habe ich ein Tab-Layout mit 3 Tabs, eins davon enthält nur buttons und die anderen beiden jeweils ein TextView.

ich brauche eine Scrollbar für eins der beiden TextViews...
..soweit so gut, das ist gelöst..

..ABER sobald ich das Tab mit der Scrollbar öffne, haben ab diesem Moment alle 3 Tabs Scrollbars, die auch nicht mehr weggehen :(

hat jemand ne idee?

ich habs bis jetzt (mit halt dem Problem) so gelöst:
Code:
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" />
        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">
			<RelativeLayout
				android:id="@+id/calc_tab"
				android:scrollbars="none"
				android:layout_width="fill_parent"
				android:layout_height="fill_parent"
				xmlns:android="http://schemas.android.com/apk/res/android" >
				<EditText
					android:id="@+id/calc_textfield"
					android:layout_width="fill_parent"
					android:layout_height="wrap_content"
					android:text="(2+6)*(4-1)"
					android:textSize="18sp"
					android:layout_x="0px"
					android:layout_y="0px" >
				</EditText>
				<Button
					android:id="@+id/calc_button_1x1"
					android:layout_width="64px"
					android:layout_height="wrap_content"
					android:textSize="20sp"
					android:text="@string/calc_button_1x1"
					android:layout_below="@+id/calc_textfield"
					android:layout_alignParentLeft="true" />

...

		</RelativeLayout>
            <ScrollView 
                android:id="@+id/scroller"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent">
	            <TextView 
	                android:id="@+id/text_func"
	                android:orientation="vertical"
	                android:layout_width="fill_parent"
	                android:layout_height="fill_parent" 
	                android:text="Funktionen:\n\nsin(x)\ncos(x)\ndave(x)=x*22" /> 
	        </ScrollView>
	        
	            <TextView 
	                android:id="@+id/text_var"
	                android:layout_width="fill_parent"
	                android:layout_height="fill_parent" 
	                android:text="Variablen:\n\npi=3.41\ng=9.81" />
    	</FrameLayout>
    </LinearLayout>
</TabHost>

Danke und Gruß
D2k
 
So ich habs selbst raus bekommen...

..es muss
android:layout_height="wrap_content"
sein im ScrollView. Dann gehts!

Gruß D2k
 

Ähnliche Themen

S
Antworten
4
Aufrufe
956
Sempervivum
S
B
Antworten
4
Aufrufe
430
bb321
B
R
Antworten
3
Aufrufe
1.571
Ritartet
R
Zurück
Oben Unten