机器人全屏用户界面与scretched中心
答
是。你可以使用这个s.a.的许多布局。 RelativeLayout,LinearLayout或ConstraintLayout。我建议使用RelativeLayout,在其中您将页眉和页脚的视图设置为固定。下面是如何在XML做到这一点的例子:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/tv_top"
android:background="@android:color/holo_orange_light"
android:layout_alignParentTop="true"
android:layout_width="match_parent"
android:layout_height="20dp" />
<TextView
android:id="@+id/tv_bottom"
android:background="@android:color/holo_red_light"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="15dp" />
<LinearLayout
android:layout_below="@id/tv_top"
android:layout_above="@id/tv_bottom"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</RelativeLayout>
,这是它怎么会看在设备上:
谢谢,Serj!优秀的解决 – osolodkin