Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/186.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何解决XML中的imageview UI?(图像大小随Listview数据而变化。)_Android - Fatal编程技术网

Android 如何解决XML中的imageview UI?(图像大小随Listview数据而变化。)

Android 如何解决XML中的imageview UI?(图像大小随Listview数据而变化。),android,Android,我测试了许多解决图像视图UI问题的方法 (一) (二) (三) 很简单: 所以您不想更改图像的大小?图像视图UI的问题是什么。你面对的是什么?请在这里提一下。你到底有什么问题?请清楚提及。是的,我不想改变图片的大小。图像大小随数据库中的数据而变化,在ListView中绑定。我想在屏幕底部设置图像,不改变大小。@roitawng这是我的荣幸。 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/and

我测试了许多解决图像视图UI问题的方法

(一)


(二)


(三)


很简单:

所以您不想更改图像的大小?图像视图UI的问题是什么。你面对的是什么?请在这里提一下。你到底有什么问题?请清楚提及。是的,我不想改变图片的大小。图像大小随数据库中的数据而变化,在ListView中绑定。我想在屏幕底部设置图像,不改变大小。@roitawng这是我的荣幸。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:weightSum="1">              

            <ListView android:id="@android:id/list"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"                    
                    ></ListView>            

            <ImageView android:src="@drawable/adv"
                    android:layout_width="wrap_content" 
                    android:layout_height="wrap_content" 
                    android:layout_gravity="bottom"                                                     
                    ></ImageView>


</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:weightSum="1">              

            <ListView android:id="@android:id/list"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"                    
                    ></ListView>            

            <ImageView android:src="@drawable/adv"
                    android:layout_width="wrap_content" 
                    android:layout_height="wrap_content" 
                    android:scaleType="fitXY"
                    android:layout_gravity="bottom"                                                 
                    ></ImageView>


</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:weightSum="1">              

            <ListView android:id="@android:id/list"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"                    
                    ></ListView>            

            <ImageView android:src="@drawable/adv"
                    android:layout_width="wrap_content" 
                    android:layout_height="wrap_content"                        
                    android:layout_weight="1.0"                                                 
                    ></ImageView>


</LinearLayout>
Just Simple:




<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">

<ListView
    android:id="@android:id/list"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_weight="1"/>
<ImageView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" 
    android:layout_gravity="bottom"/>
</LinearLayout>