3
我有以下佈局文件。如何在我的下面的佈局中在工具欄的Imageview子項上添加後退按鈕(箭頭)(或覆蓋在z-index上)?在工具欄的子元素頂部添加回扣
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android">
<Toolbar
android:layout_width="fill_parent"
android:layout_height="600dp"
android:id="@+id/toolbar"
android:background="#313B45"
android:weightSum="1"
android:contentInsetLeft="0dp"
android:contentInsetStart="0dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/headerimage"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="fitXY"
android:layout_gravity="left|top"
android:layout_weight="1" />
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="New Text"
android:id="@+id/textView"
android:scaleType="fitXY"
android:layout_gravity="left|top"
android:layout_weight="1" />
</LinearLayout>
</Toolbar>
你想後退按鈕,將帶你到以前的活動。 – 2015-04-04 16:03:39
在工具欄的左端? – 2015-04-04 16:03:54
我想要一個出現在ImageView上的按鈕(它本身位於工具欄的左上角)。在印刷機上,它應該退出應用程序。 – stackoverflowN 2015-04-04 16:22:56