在我的應用程序中,我想繪製背景圖像的頂部。我有以下xml:如何android Z命令?
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg2"
>
<com.myapp.drawings.DrawingSurface
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/drawingSurface"
/>
<LinearLayout
android:orientation="horizontal"
android:background="@drawable/bg2"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="OK"
android:onClick="onClick"
android:id="@+id/colorBlueBtn"
/>
<Button
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Save"
android:onClick="onClick"
android:id="@+id/saveBtn"
/>
</LinearLayout>
</FrameLayout>
不,問題是,當我嘗試在繪圖表面上繪圖時未顯示繪圖。顯示背景圖像和按鈕。一旦我保存了它,就會顯示我的應用程序生成的圖像文件。我認爲問題在於我的佈局的Z順序。
任何想法?謝謝你的幫助! :)