私はAndroidでこのような画面をデザインしようとしています:
すべてのボタン、背景、画像を別々のPNGファイルに入れていますが、それを実行できません。2つのボタンを背景の中に入れる方法がわからず、境界線からの距離にも問題があります。これが私がこれまでに持っているものです:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@drawable/fundo_tela">
<ImageView
android:id="@+id/imgtopo"
android:src="@drawable/topo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/telaInicio"
android:layout_gravity="center"
android:gravity="center"
android:textColor="#fff"
android:textSize="20dp" />
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:background="@drawable/fundoBotoes" >
<Button android:id="@+id/Camera"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/cameraBselector">
</Button>
<Button
android:id="@+id/Galeria"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/galleryBselector">
</Button>
</LinearLayout>
<Button
android:id="@+id/Pedidos"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/pedidosBselector"
android:layout_marginTop="15dp"
android:layout_marginBottom="15dp"
>
</Button>
</LinearLayout>