Android 划分布局
我得到了以下活动Android 划分布局,android,layout,divide,Android,Layout,Divide,我得到了以下活动 <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schem
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
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"
android:fillViewport="true"
android:background="@color/colorGray"
tools:context=".ProductsActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintBottom_toTopOf="@+id/navigation"
app:layout_constraintTop_toTopOf="parent"></LinearLayout>
<android.support.design.widget.BottomNavigationView
android:id="@+id/navigation"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="?android:attr/windowBackground"
app:itemIconTint="@drawable/btv_tab_item_foreground"
app:itemTextColor="@drawable/btv_tab_item_foreground"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:menu="@menu/navigation" />
</android.support.constraint.ConstraintLayout>
类似于上面的图像(这些线没有正确调整,因为它们是用MS Paint绘制的)。但我想你说得对。
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:text="Register"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:padding="10dp"
android:layout_weight="1" />
// same code as above textView 5 more times
</LinearLayout>
//与上述文本视图相同的代码再显示5次
将它们的高度完美地调整到其父约束高度
,这是否意味着您希望它们与父约束高度相等,与其他约束高度相等?是的。但要占据父母的所有可用高度