1
私はedittext listviewを持つXMLレイアウトを持っています。また、画面上で大きな部分を占めるリニアレイアウトに含まれているファブがあります。非常に小さなボタンまたはクロップド。私はここにこれらの三つの要素の最高のフィット感を持つことができますどのようにフローティングアクションボタンのカスタムビューをリストビューと合わせるには
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:ems="10"
android:id="@+id/inputSearch"
android:hint="Αναζητηση" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_margin="4dp">
<ListView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/listCustomers"
android:layout_margin="5dp"
android:dividerHeight="2dp" />
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="2"
android:layout_gravity="bottom|center"
android:gravity="right"
android:layout_margin="4dp">
<android.support.design.widget.FloatingActionButton
android:layout_width="56dp"
android:layout_height="56dp"
android:id="@+id/fab"
app:backgroundTint="@android:color/holo_orange_light"
android:layout_gravity="bottom|center"
android:layout_margin="10dp"
android:src="@drawable/ic_action_cross" />
</LinearLayout>
?
はいが良さそうに見えますが、工場のボタンはテキストとIMAGEBUTTON ListView項目の –
ちょうどアンドロイド追加カバー:FloatActionButtonにlayout_below =「@ + ID/listCustomersを」と、それは意志それらをカバーしないでください。 – Drv