Я хочу иметь выдвижной ящик, который отображается внизу моего представления, но в настоящее время он не отображается. Я также пытался использовать линейный макет, так как корень с представлением прокрутки имеет вес 1, но это привело к тому, что представление прокрутки и его содержимое не отображались. Любые идеи?
Мой взгляд:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ScrollView
android:id="@+id/scrollLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:context=".AddScheduleItemActivity" >
.
.
.
</LinearLayout>
</ScrollView>
<SlidingDrawer
android:id="@+id/slidingDrawer1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/scrollLayout"
android:content="@+id/content"
android:handle="@+id/handle" >
<Button
android:id="@+id/handle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Handle" />
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<Button
android:id="@+id/hadsfndle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="sdf" />
</LinearLayout>
</SlidingDrawer>
Thanks, Nathan
На картинке я хочу, чтобы синий был прокруткой и содержимым, а зеленый — ручкой для ползунка.
Пробовал следовать некоторым другим предложениям и пришел к этому, который все еще не работает. Содержимое прокрутки отображается нормально, но ползунок не отображается. Нужно еще несколько предложений! Спасибо!
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="bottom"
android:gravity="bottom"
android:orientation="vertical" >
<ScrollView
android:id="@+id/scrollLayout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
.
.
.
</RelativeLayout>
</ScrollView>
<SlidingDrawer
android:id="@+id/slidingDrawer1"
android:layout_width="match_parent"
android:layout_height="50dip"
android:layout_alignParentBottom="true"
android:layout_below="@+id/scrollLayout"
android:content="@+id/content"
android:handle="@+id/handle"
android:orientation="vertical" >
<Button
android:id="@+id/handle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Handle" />
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<Button
android:id="@+id/hadsfndle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="sdf" />
</LinearLayout>
</SlidingDrawer>
</RelativeLayout>
Что ж, похоже, выдвижной ящик больше не поддерживается, поэтому, думаю, я буду искать альтернативу :(