すべてのまあ最初は、次の画像Androidの浮動レイアウトのEditText(赤線)に何かを書こうとイムは、その後、緑色のレイアウトはもう表示されていないとき
を見て、緑色のレイアウトを浮かべて、タイトルバーのように(青色のレイアウトはRecyclerviewで、一部が隠れていても気にしない)、常に緑色のものが表示されます。 LinearLayout、どうすればそのようなことをすることができますか?ここ
はXMLです:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.me.something.lolz">
<LinearLayout
android:weightSum="100"
android:orientation="vertical"
android:id="@+id/llBanner"
android:background="@color/colorVika"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ImageButton
android:id="@+id/back_one"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:src="@drawable/back"/>
<ImageButton
android:id="@+id/something_menu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:src="@drawable/nBUtc"
android:layout_gravity="center"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
<ImageButton
android:id="@+id/btnOpti"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:src="@drawable/optie"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
</RelativeLayout>
<TextView
android:id="@+id/tvholy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="lala"
android:layout_gravity="center_horizontal" />
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:layout_below="@+id/llBanner"
android:id="@+id/rvME"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbars="vertical"
android:layout_above="@+id/linearLayout" />
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:orientation="vertical">
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:orientation="horizontal">
<EditText
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:id="@+id/etText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1" />
<ImageButton
android:id="@+id/btnSave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@drawable/savetton"
android:text="d"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
青レイアウトのサイズを変更する場合は、私は
マニフェストファイルのアクティビティに 'adjustPan'を使用します。 – Piyush
@Piyush dosent work ... – secret
xmlファイルを表示... – Piyush