###前提・実現したいこと
FrameLayout内に、toolbar、LinerLayoutを入れると重ねて表示したい。
※LinerLayoutの上部がtoolbarの下に隠れて表示されるようにしたい。
###発生している問題・エラーメッセージ
xmlのDesignでは、FrameLayout内に、toolbar、LinerLayoutを入れると重なって表示されるのですが、実際に動作させるとtoolbar、LinerLayoutが重ならず、LinerLayoutの上部含めて表示されます。
###該当のソースコード
<?xml version="1.0" encoding="utf-8"?> <layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> <FrameLayout android:id="@+id/frame" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <jp.tama.newsreader.presentation.view.view.DetailToolBar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/colorPrimary" app:popupTheme="@style/Theme.AppCompat.Light.DarkActionBar"> <TextView android:id="@+id/toolbar_text" android:layout_width="match_parent" android:layout_height="wrap_content" android:textColor="#ffffff" /> </jp.tama.newsreader.presentation.view.view.DetailToolBar> <LinearLayout android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent"></LinearLayout> </FrameLayout> </layout>
###補足情報(言語/FW/ツール等のバージョンなど)
android studio 2.3.3
JDK 1.8
minSdkVersion="15"
targetSdkVersion="19"
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。