Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/220.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/mongodb/11.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中,在页脚处对齐3个水平图像_Android_Html_Css - Fatal编程技术网

在Android中,在页脚处对齐3个水平图像

在Android中,在页脚处对齐3个水平图像,android,html,css,Android,Html,Css,我在安卓上工作。我想在页脚水平对齐3个图像。 下面是我的代码。先谢谢你 <RelativeLayout android:id="@+id/footer" android:layout_width="match_parent" android:layout_height="40dp" android:layout_alignParentBottom="true" android:background="#ccc"

我在安卓上工作。我想在页脚水平对齐3个图像。 下面是我的代码。先谢谢你

      <RelativeLayout
      android:id="@+id/footer"
      android:layout_width="match_parent"
      android:layout_height="40dp"
      android:layout_alignParentBottom="true"
      android:background="#ccc"
      android:gravity="center"
      android:layout_padding="-30dp">

    <ImageView 
    android:id="@+id/imgView6"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:src="@drawable/plus"/>
<ImageView 
    android:id="@+id/imgView6"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:src="@drawable/plus"/>
<ImageView 
    android:id="@+id/imgView6"
    android:layout_width="60dp"
    android:layout_height="60dp"
    android:src="@drawable/plus"/>

  </RelativeLayout>


假设您希望所有3个图像视图的大小相同?我会使用线性布局,方向为水平,每个图像视图的权重为1

?其他人现在应该做什么?对你的
imageview
做点什么,就像对第一张图片添加
android:alignParentLeft=“true”
,对中心图片添加
android:layouttoLeftof=“@id/fisrt_image”
,对最后一张图片添加这个
android:layouttorightoof=“@id/second_image”
。请将图像的ID更改为不同的名称,因为您已为所有三张图像设置了相同的名称。@米兰·马哈拉詹,我无法将其水平对齐@user3294039,谢谢,将应用相同的@anirudha,您什么也不做,我认为您向其他人提出此类问题并不明智。如果你至少不知道答案,不要评论