切换风格

默认Lavender Sky Flowers Wizard Snow Beige California City Dragon Black London Sunset glow Pink Cloud

谁能帮我 android xml 布局

查看数: 2552 | 评论数: 9 | 收藏 2
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2020-12-5 13:20

正文摘要:

回复

很方便 发表于 2024-10-23 13:32:45
........
小星星123456 发表于 2022-2-26 13:51:54
易如意中文编程学习交流论坛有你更精彩~
ftmovie 发表于 2020-12-6 07:12:29
RE: 谁能帮我 android xml 布局
eruyivip 发表于 2020-12-6 00:06:32
易如意中文编程学习交流论坛有你更精彩~
大飞工作室 发表于 2020-12-6 00:02:43
易如意中文编程学习交流论坛有你更精彩~
fyqd 发表于 2020-12-5 23:09:10
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout
  3.     xmlns:android="http://schemas.android.com/apk/res/android"
  4.     android:layout_width="match_parent"
  5.     android:layout_height="match_parent"
  6.     android:orientation="vertical">

  7.     <LinearLayout
  8.         android:layout_width="match_parent"
  9.         android:layout_height="wrap_content"
  10.         android:layout_weight="1">

  11.         <RelativeLayout
  12.             android:id="@+id/rlPhoto"
  13.             android:layout_width="0dp"
  14.             android:layout_height="match_parent"
  15.             android:layout_weight="1">

  16.             <ImageView
  17.                 android:id="@+id/ivPhoto"
  18.                 android:layout_width="50dp"
  19.                 android:layout_height="50dp"
  20.                 android:layout_marginTop="30dp"
  21.                 android:layout_centerHorizontal="true"
  22.                  android:background="@drawable/selector_ctype_image"
  23.                 />

  24.             <TextView
  25.                 android:layout_width="wrap_content"
  26.                 android:layout_height="wrap_content"
  27.                 android:layout_below="@id/ivPhoto"
  28.                 android:layout_centerHorizontal="true"
  29.                 android:layout_marginTop="15px"
  30.                 android:text="相册"
  31.                 android:textSize="12sp"/>
  32.         </RelativeLayout>
  33.         <RelativeLayout
  34.             android:id="@+id/rlFile"
  35.             android:layout_width="0dp"
  36.             android:layout_height="match_parent"
  37.             android:layout_weight="1">
  38.             <ImageView
  39.                 android:id="@+id/ivFile"
  40.                 android:layout_width="50dp"
  41.                 android:layout_height="50dp"
  42.                 android:layout_marginTop="30dp"
  43.                 android:layout_centerHorizontal="true"
  44.                 android:background="@drawable/selector_ctype_file"
  45.                 />
  46.             <TextView
  47.                 android:layout_width="wrap_content"
  48.                 android:layout_height="wrap_content"
  49.                 android:layout_below="@id/ivFile"
  50.                 android:layout_centerHorizontal="true"
  51.                 android:layout_marginTop="15px"
  52.                 android:text="拍摄"
  53.                 android:textSize="12sp"/>
  54.         </RelativeLayout>
  55.         <RelativeLayout
  56.             android:id="@+id/rlVideo"
  57.             android:layout_width="0dp"
  58.             android:layout_height="match_parent"
  59.             android:layout_weight="1">
  60.             <ImageView
  61.                 android:id="@+id/ivVideo"
  62.                 android:layout_width="50dp"
  63.                 android:layout_height="50dp"
  64.                 android:layout_marginTop="30dp"
  65.                 android:layout_centerHorizontal="true"
  66.                 android:background="@drawable/selector_ctype_video"
  67.                  />
  68.             <TextView
  69.                 android:layout_width="wrap_content"
  70.                 android:layout_height="wrap_content"
  71.                 android:layout_below="@id/ivVideo"
  72.                 android:layout_centerHorizontal="true"
  73.                 android:layout_marginTop="15px"
  74.                 android:text="视频通话"
  75.                 android:textSize="12sp"/>
  76.         </RelativeLayout>
  77.         <RelativeLayout
  78.             android:id="@+id/rlLocation"
  79.             android:layout_width="0dp"
  80.             android:layout_height="match_parent"
  81.             android:layout_weight="1">

  82.             <ImageView
  83.                 android:id="@+id/ivLocation"
  84.                 android:layout_width="50dp"
  85.                 android:layout_height="50dp"
  86.                 android:layout_marginTop="30dp"
  87.                 android:layout_centerHorizontal="true"
  88.                 android:background="@drawable/selector_ctype_location"
  89.                 />

  90.             <TextView
  91.                 android:layout_width="wrap_content"
  92.                 android:layout_height="wrap_content"
  93.                 android:layout_below="@id/ivLocation"
  94.                 android:layout_centerHorizontal="true"
  95.                 android:layout_marginTop="15px"
  96.                 android:text="位置"
  97.                 android:textSize="12sp"/>
  98.         </RelativeLayout>
  99.     </LinearLayout>
  100.             <LinearLayout
  101.         android:layout_width="match_parent"
  102.         android:layout_height="wrap_content"
  103.         android:layout_weight="1">

  104.         <RelativeLayout
  105.             android:id="@+id/rlPhoto"
  106.             android:layout_width="0dp"
  107.             android:layout_height="match_parent"
  108.             android:layout_weight="1">

  109.             <ImageView
  110.                 android:id="@+id/ivPhoto"
  111.                 android:layout_width="50dp"
  112.                 android:layout_height="50dp"
  113.                 android:layout_marginTop="30dp"
  114.                 android:layout_centerHorizontal="true"
  115.                  android:background="@drawable/selector_ctype_image"
  116.                 />

  117.             <TextView
  118.                 android:layout_width="wrap_content"
  119.                 android:layout_height="wrap_content"
  120.                 android:layout_below="@id/ivPhoto"
  121.                 android:layout_centerHorizontal="true"
  122.                 android:layout_marginTop="15px"
  123.                 android:text="相册"
  124.                 android:textSize="12sp"/>
  125.         </RelativeLayout>
  126.         <RelativeLayout
  127.             android:id="@+id/rlFile"
  128.             android:layout_width="0dp"
  129.             android:layout_height="match_parent"
  130.             android:layout_weight="1">
  131.             <ImageView
  132.                 android:id="@+id/ivFile"
  133.                 android:layout_width="50dp"
  134.                 android:layout_height="50dp"
  135.                 android:layout_marginTop="30dp"
  136.                 android:layout_centerHorizontal="true"
  137.                 android:background="@drawable/selector_ctype_file"
  138.                 />
  139.             <TextView
  140.                 android:layout_width="wrap_content"
  141.                 android:layout_height="wrap_content"
  142.                 android:layout_below="@id/ivFile"
  143.                 android:layout_centerHorizontal="true"
  144.                 android:layout_marginTop="15px"
  145.                 android:text="拍摄"
  146.                 android:textSize="12sp"/>
  147.         </RelativeLayout>
  148.         <RelativeLayout
  149.             android:id="@+id/rlVideo"
  150.             android:layout_width="0dp"
  151.             android:layout_height="match_parent"
  152.             android:layout_weight="1">
  153.             <ImageView
  154.                 android:id="@+id/ivVideo"
  155.                 android:layout_width="50dp"
  156.                 android:layout_height="50dp"
  157.                 android:layout_marginTop="30dp"
  158.                 android:layout_centerHorizontal="true"
  159.                 android:background="@drawable/selector_ctype_video"
  160.                  />
  161.             <TextView
  162.                 android:layout_width="wrap_content"
  163.                 android:layout_height="wrap_content"
  164.                 android:layout_below="@id/ivVideo"
  165.                 android:layout_centerHorizontal="true"
  166.                 android:layout_marginTop="15px"
  167.                 android:text="视频通话"
  168.                 android:textSize="12sp"/>
  169.         </RelativeLayout>
  170.         <RelativeLayout
  171.             android:id="@+id/rlLocation"
  172.             android:layout_width="0dp"
  173.             android:layout_height="match_parent"
  174.             android:layout_weight="1">

  175.             <ImageView
  176.                 android:id="@+id/ivLocation"
  177.                 android:layout_width="50dp"
  178.                 android:layout_height="50dp"
  179.                 android:layout_marginTop="30dp"
  180.                 android:layout_centerHorizontal="true"
  181.                 android:background="@drawable/selector_ctype_location"
  182.                 />

  183.             <TextView
  184.                 android:layout_width="wrap_content"
  185.                 android:layout_height="wrap_content"
  186.                 android:layout_below="@id/ivLocation"
  187.                 android:layout_centerHorizontal="true"
  188.                 android:layout_marginTop="15px"
  189.                 android:text="位置"
  190.                 android:textSize="12sp"/>
  191.         </RelativeLayout>
  192.     </LinearLayout>
  193. </LinearLayout>
复制代码
小小小易 发表于 2020-12-5 17:55:52
看的我似懂非懂
A2605552324 发表于 2020-12-5 13:49:34
沫兮豪 发表于 2020-12-5 13:44
再加一行不就行了?

这个布局不是我写的不会加
LZ龙豪 发表于 2020-12-5 13:20:41
再加一行不就行了?

点评

这个布局不是我写的不会加  详情 回复 发表于 2020-12-5 13:49

QQ|sitemap|免责声明|RGB颜色对照表|手机版|小黑屋| 易如意 - E4A中文编程学习交流论坛

GMT+8, 2025-5-1 22:17 , Processed in 0.077984 second(s), 40 queries .

Powered by Discuz! X3.4

© 2001-2018 eruyi.cn

返回顶部