对话框布局XML:
<?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>
在地图覆盖对话框执行上图钉挖掘时:
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();
而我所看到的,当测试:
所以我想,大约对话框(约方空格)变化浅灰色的背景为白色,所以它不会显得难看。 谁能帮我?