【发布时间】:2016-08-14 13:21:02
【问题描述】:
所以,我正在尝试构建这个具有 2 个列表视图和一个网格视图的屏幕,我想要的是,一旦我开始在底部列表视图上滚动,它应该向上移动所有元素并滚动,而不是单独滚动。 Screenshot of Layout
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ListView
android:id="@+id/listview1"
android:layout_width="fill_parent"
android:layout_height="200sp" />
<GridView
android:numColumns="auto_fit"
android:gravity="center"
android:columnWidth="100dp"
android:stretchMode="columnWidth"
android:layout_width="fill_parent"
android:layout_height="110sp"
android:id="@+id/grid"
android:horizontalSpacing="5dp"
android:verticalSpacing="-27dp"
android:layout_below="@+id/listview1"
android:layout_weight="0.37" />
<ListView
android:layout_width="wrap_content"
android:layout_height="500dp"
android:id="@+id/lvScribe"
android:layout_below="@+id/grid" />
<com.ashokvarma.bottomnavigation.BottomNavigationBar
android:layout_gravity="bottom"
android:id="@+id/bottom_navigation_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
</RelativeLayout>
【问题讨论】:
标签: android xml android-layout listview