我希望在屏幕底部的回收器视图上方有一个布局(像一个框架),这样即使该布局可见,我仍然可以在其后面滚动回收器视图。所以我想对齐屏幕底部的框架布局,并根据需要使其可见和不可见。这是我的密码。
<?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"
tools:context="com.protossoft.root.aesencryption.MainActivity">
<ListView
android:layout_width="match_parent"
android:id="@+id/listView"
android:layout_height="match_parent">
</ListView>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="443dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:id="@+id/deviceNumberImage"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.2"
android:src="@android:drawable/btn_default" />
<TextView
android:id="@+id/deviceNumber"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:text="990000862471854" />
</LinearLayout>
</FrameLayout>
我对约束布局没有太多想法,但当我从编辑器中移动底部的视图时,它使用类似属性的
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="443dp"
我想用align\u parentBottom这样的属性实现同样的效果。但没有一个属性可供使用。我需要做什么才能使框架布局在回收器视图的底部和顶部同时可见?
谢谢:)