0
所有的屏幕我做它采用动态表的应用程序,我的XML代码:Android的23和更小的不用填横向模式
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:scrollbars="none">
<include
android:id="@id/action_bar"
layout="@layout/actionbar_toolbar" />
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/action_bar">
<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TableLayout
android:id="@+id/table"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:stretchColumns="*">
</TableLayout>
</ScrollView>
</HorizontalScrollView>
表采取一切值在代码。我的问题是,在Android的23少,当你把屏幕方向在横向模式下,屏幕看起来像:
但在Android版本24及以上,屏幕看起来不错:
PD:match_parent
属性不起作用。