ボタンの配置に問題があります。アプリの起動時にカメラが開く (カスタマイズされた) アプリを開発しています。レイアウトに 2 つのボタンを追加しました。問題は、ボタンを調整できないことです。キャプチャ ボタンが中央の下部に、アップロード ボタンが右下に配置されるようにボタンを配置します。次のコードを使用しています。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<FrameLayout
android:id="@+id/camera_preview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
>
</FrameLayout>
<Button
android:id="@+id/button_upload"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="0dp"
android:text="Upload"
/>
<Button
android:id="@+id/button_capture"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="0dp"
android:text="Capture" />
</RelativeLayout>
LinearLayout も試しました。誰が私がどこで間違いを犯しているのか教えてもらえますか? 前もって感謝します。