0
Как изменить цвет полей, отделяющих кнопки предупреждения (положительные и отрицательные)?Изменить цвет «полей» на кнопках оповещения
Это то, что я хочу изменить:
(Cant долбанные загружать изображения из-за репутации)
Спасибо!
EDIT
То, что я сейчас:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#80000000"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center|bottom"
android:layout_margin="10dp">
<ImageView
android:layout_width="100px"
android:layout_height="100px"
android:src="@drawable/more_info_icon"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:paddingLeft="20dp"
android:gravity="center_vertical"
android:text="More Information"
android:textColor="#000000"
android:textStyle="bold"
android:textSize="20dp"/>
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/alert_dialog_text_1"
android:layout_margin="@dimen/alert_margin"
android:textColor="#000000"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/alert_dialog_text_2"
android:layout_marginBottom="11dp"
android:textColor="#000000"/>
и
builder.setView(inflater.inflate(R.layout.custom_alert_dialog, null));
builder.setPositiveButton(...);
builder.setNegativeButton(...);
Button negB = ((AlertDialog) dialog).getButton(DialogInterface.BUTTON_NEGATIVE);
Button posB = ((AlertDialog) dialog).getButton(DialogInterface.BUTTON_POSITIVE);
negB.setBackgroundColor(Color.parseColor("#80000000"));
posB.setBackgroundColor(Color.parseColor("#80000000"));
Просто, чтобы быть уверенным, таким образом, я не могу использовать .setPositiveButton и .setNegativeButton, или я могу? Если смогу, как мне это сделать? Поля отображаются, потому что добавлены кнопки. Они не находятся в исходном файле Layout – GuiFGDeo
, вы измените цвет линейного макета –
Я обновлю свой вопрос, чтобы показать, что у меня уже есть ... Я считаю, что я не мог это объяснить. – GuiFGDeo