2017-02-16 8 views
0

Ich habe ein Problem in meiner ScrollView. Ich möchte einen ListView-Eintrag anzeigen, der von unterhalb der Symbolleiste zu dem Button geht, der in meinem Layout an der Unterseite platziert wird. Dies funktioniert nicht, meine ScrollView zeigt jeweils ein Element an.ScrollView zeige ein Element auf einmal

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/ScrollView01" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" > 

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
     xmlns:tools="http://schemas.android.com/tools" 
     xmlns:app="http://schemas.android.com/apk/res-auto" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:paddingLeft="@dimen/activity_horizontal_margin" 
     android:paddingRight="@dimen/activity_horizontal_margin" 
     android:paddingTop="@dimen/activity_vertical_margin" 
     android:paddingBottom="@dimen/activity_vertical_margin" 
     app:layout_behavior="@string/appbar_scrolling_view_behavior" 
     tools:showIn="@layout/activity_wigeo_scan" 
     tools:context=".application.WiGeoScan"> 

     <TextView android:text="@string/wifi_scan" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:textColor="@color/colorPrimary" 
      android:id="@+id/content_wigeo_scan_textView_title" 
      android:textSize="35dp" 
      android:layout_alignParentTop="true" 
      android:layout_centerHorizontal="true" /> 

     <Space 
      android:layout_width="match_parent" 
      android:layout_height="10dp" 
      android:layout_below="@id/content_wigeo_scan_textView_title" 
      android:id="@+id/space0" /> 

     <ListView 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:layout_below="@id/space0" 
      android:id="@+id/content_wigeo_scan_listView" 
      android:layout_alignParentLeft="true" 
      android:layout_alignParentStart="true"/> 

    </RelativeLayout> 
</ScrollView> 

Antwort

0

ändern ScrollView mit diesem.

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/ScrollView01" 
    android:fillViewport="true" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" > 
+0

Vielen Dank, ich habe es versucht und es funktioniert! –

+0

dann bitte akzeptieren Sie diese Antwort, damit andere auch wissen können. –

Verwandte Themen