Код лэйаута диалога:
Код: Выделить всё
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<ListView
android:id="@+id/lvMultiChoice"
android:divider="@color/backgr"
android:dividerHeight="1dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:drawSelectorOnTop="false"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>
Код: Выделить всё
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="horizontal">
<Button
android:id="@+id/btnDialogOk"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="OK"
android:layout_weight="1"
android:background="@drawable/button_grey"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
/>
</LinearLayout>
Код: Выделить всё
dialogMultiChoice = new Dialog(this,R.style.AppTheme_Dialog);
dialogMultiChoice.setContentView(R.layout.dialog_multichoice);
ListView lvMultiChoice = (ListView) (dialogMultiChoice.findViewById(R.id.lvMultiChoice));
View v = getLayoutInflater().inflate(R.layout.lv_footer_btn_ok, null);
lvMultiChoice.addFooterView(v,null,false);
dialogMultiChoice.getWindow().setTitleColor(getResources().getColor(R.color.backgr));
dialogMultiChoice.setTitle(Fragment_Filter.adapterFilter.names[id]);
adapMeal = new MultiChoiceAdapter(Samo_Data.MEAL);
lvMultiChoice.setAdapter(adapMeal);
dialogMultiChoice.getWindow().setLayout(lp.width, lp.height);
return dialogMultiChoice;
Код: Выделить всё
<style name="AppTheme.DialogTitle">
<item name="android:textSize">16pt</item>
<item name="android:textColor">@android:color/black</item>
<item name="android:gravity">center</item>
</style>
<style name="AppTheme.DialogWindowTitle">
<item name="android:maxLines">1</item>
<item name="android:textAppearance">@style/AppTheme.DialogTitle</item>
</style>
<style name="AppTheme.Dialog">
<item name="android:windowTitleStyle">@style/AppTheme.DialogWindowTitle</item>
</style>
Помогите, пожалуйста =(