私はAndroidで初心者です。私には小さな問題が1つあります。私のアラートの幅が短すぎます。私のアラートサイズがAndroidに正しく表示されていませんか?
スクリーンショット:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:orientation="vertical">
<android.support.v7.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text="@string/name"
/>
<android.support.v7.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:text="Hari"
android:textColor="@color/colorPrimaryBlack"
/>
<android.support.v7.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:text="@string/customer_id1"
/>
<android.support.v7.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:text="96"
android:textColor="@color/colorPrimaryBlack"
/>
<android.support.v7.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:text="@string/mobile"
/>
<android.support.v7.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:text="7826963223"
android:textColor="@color/colorPrimaryBlack"
/>
<android.support.v7.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:text="@string/pickup_address"
/>
<android.support.v7.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="15dp"
android:text="ponmeni Muniyandi kovil main road"
android:textColor="@color/colorPrimaryBlack"
/>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingBottom="1.0dip"
android:paddingLeft="4.0dip"
android:paddingRight="4.0dip"
android:layout_marginTop="15dp"
android:paddingTop="5.0dip">
<Button
android:id="@+id/Accept"
android:layout_width="0.0dip"
android:layout_height="fill_parent"
android:layout_marginLeft="15dp"
android:layout_weight="1.0"
android:background="@drawable/btn_rounded_primary"
android:textColor="@color/colorPrimarywhite"
android:text="@string/btn_accept" />
<Button
android:id="@+id/Decline"
android:layout_width="0.0dip"
android:layout_height="fill_parent"
android:layout_marginLeft="10dp"
android:layout_marginRight="15dp"
android:layout_weight="1.0"
android:background="@drawable/btn_rounded_black"
android:text="@string/btn_decline"
android:textColor="@color/colorPrimarywhite" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
fill_parentは廃止のでmatch_parentでfill_parentを置き換える最初 –
警告ダイアログのためのあなたのコードを共有する(https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#FILL_PARENT)[参照]とあなたにこのダイアログを膨らませるJavaコードを表示してください。 – UltimateDevil
をメモとして、私は拒否ボタンが常に戻るボタンの横にあるべきだと思います。これはデバイスごとに異なることにも注意してください。 – Doomsknight