0
我爲alertdialog以下佈局(我想用它只有圖像警告對話框)的Android警告對話框不適合於圖像
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageImageViewId"
android:src="@drawable/stub" />
</LinearLayout>
結果我得到的是: http://img14.imageshack.us/img14/3333/imagenp.png
你可以看到警告對話框比圖像本身大...
什麼可以做,所以它會適合?
您可以嘗試'LinearLayout'上的'android:background'並移除圖像視圖。它可能會或可能不會工作。它可能會導致圖像大小的問題,但它可能值得嘗試 – Jakar 2012-02-15 23:50:34