ScrollView not working - relative layout

I am trying to wrap a real view in scrollview according to the code below. However, the problem is that the view does not scroll, although part of the view is disconnected from the screen. I am testing this on an emulator.

<?xml version="1.0" encoding="UTF-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scroller"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
 >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background"
android:orientation="vertical"
> 
<TextView 
android:id="@+id/namedetail"
android:background="@drawable/backgroundstate"
android:layout_width="fill_parent"
android:gravity="center_vertical|center_horizontal" 
android:layout_height="50dip"
android:textColor="#FF000000"
android:textStyle="bold"
android:textSize="15sp"
android:typeface="sans" 
  />      
<ImageView android:id="@+id/picturedetail"
android:layout_width="175dip"
android:layout_height="175dip"
android:layout_below="@id/namedetail"
android:layout_marginLeft="75dip"
android:layout_marginTop="10dip"
/>
<ImageView android:id="@+id/infoboxdetail"
android:layout_width="225dip"
android:layout_height="100dip"
android:layout_marginLeft="50dip"
android:layout_marginTop="10dip"
android:layout_below="@id/picturedetail"
android:background="@drawable/backgroundstate"
/>
<TextView 
android:id="@+id/descriptiondetail"
android:background="@drawable/backgroundstate"
android:layout_width="fill_parent"
android:gravity="center_vertical|center_horizontal" 
android:layout_height="50dip"
android:textColor="#FF000000"
android:textStyle="bold"
android:textSize="15sp"
android:typeface="sans" 
android:layout_below="@id/infoboxdetail"
android:layout_marginTop ="10dip"
/>  
</RelativeLayout>
</ScrollView>

EDIT

OK decided - the stupidity of the user - the lower text field was disconnected from the screen on my monitor, but not in the emulator. Do it longer, now it scrolls.

+1
source share
2 answers

Yours RelativeLayout- horizontaland you use ScrollView, try instead HorizontalScrollView.

0
source

, , RelativeLayout . ScrollView , RelativeLayout ScrollView. RelativeLayout , .

- , TableLayout og LinearLayout.

- , RelativeLayout?

-1

All Articles