我有一个定义我的对话框的xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView android:text="test"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
这是我的对话框:
OverlayItem item = mapOverlays.get(index);
Dialog dialog = new Dialog(context);
dialog.setContentView(R.layout.map_menu);
dialog.setCanceledOnTouchOutside(true);
dialog.show();
由于某些原因,我的对话框比我的“测试”文本视图要大(高得多)。我希望我的对话框与我的文本完全一致。我该怎么做?