Android: Zmień własne tło AlertDialog
układ okna dialogowego xml:
<code><?xml version="1.0" encoding="utf-8"?> <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/root_view" android:padding="3dp" android:background="@android:color/white" android:layout_width="wrap_content" android:layout_height="wrap_content" > //...content... </TableLayout> </code>
implementacja okna dialogowego w nakładce mapy po stuknięciu w pinezkę:
<code>AlertDialog.Builder builder; LayoutInflater inflater = (LayoutInflater) context.getSystemService(Service.LAYOUT_INFLATER_SERVICE); View layout = inflater.inflate(R.layout.map_kap_dialog, (ViewGroup) mapView.findViewById(R.id.root_view)); //prepare info to show... //info prepared //other preparations stuff builder = new AlertDialog.Builder(context); builder.setView(layout); dialog = builder.create(); dialog.setInverseBackgroundForced(true); dialog.setCanceledOnTouchOutside(true); //show it dialog.show(); </code>
i co widzę podczas testowania:
Chcę więc, aby jasnoszare tło wokół okna dialogowego (wokół kwadratowej białej przestrzeni) zmieniło się na białe, aby nie wyglądało to tak brzydko. Czy ktoś może mi pomóc?