Android的警告对话框不适合于图像 [英] Android alert dialog does not fit to image

查看:195
本文介绍了Android的警告对话框不适合于图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有alertdialog布局如下(我想用它只是图像警告对话框)

I have the following layout for alertdialog (I want alert dialog with only image in it)

<?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

您可以看到警告对话框比图像本身...

You can see that the alert dialog is larger than the image itself...

有什么可以做,因此适合?

What can be done so it will fit?

推荐答案

我想警告对话框有默认填充尝试定制,而不是对话框。

i think alert dialog has default padding try custom dialog instead.

这篇关于Android的警告对话框不适合于图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆