【问题标题】:Layout_weight does not work properlyLayout_weight 无法正常工作
【发布时间】:2016-09-05 18:32:47
【问题描述】:

我有以下xml,我想要imageview,然后是两个textview,然后又是imageview,但它不能正常工作。

这是我计划的:

这是我得到的:

<LinearLayout
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:layout_gravity="center_horizontal"
     android:orientation="horizontal"
     android:clickable="true"
     android:onClick="userProfileDetailAction"
     android:id="@+id/userProfileDetail"
     android:paddingTop="5dp"
     android:paddingBottom="5dp">

            <com.example.eyeniaras.satdostum.CircleImageView
                xmlns:app="http://schemas.android.com/apk/res-auto"
                android:layout_weight="0.3"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:background="@drawable/circle_shape"
                app:civ_border_width="0.2dp"
                app:civ_border_color="@color/dark"
                android:id="@+id/userImage"
                android:scaleType="centerCrop"/>

            <LinearLayout
                android:orientation="vertical"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="0.6">

                <TextView
                    android:id="@+id/userName"
                    android:layout_width="wrap_content"
                    android:layout_height="0dp"
                    android:layout_gravity="center"
                    android:textColor="@android:color/black"
                    android:background="#ffffff"
                    android:textSize="18sp"
                    android:layout_weight="1"/>

                <TextView
                    android:id="@+id/userRegistrationDate"
                    android:layout_width="wrap_content"
                    android:layout_height="0dp"
                    android:layout_gravity="center"
                    android:textColor="@android:color/black"
                    android:background="#ffffff"
                    android:textSize="18sp"
                    android:text = "45 days ago"
                    android:layout_weight="1"/>
            </LinearLayout>

            <ImageView
                android:id="@+id/userClick"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:layout_weight="0.1"
                android:background="@drawable/list_arrow" />

 </LinearLayout>

【问题讨论】:

  • 好吧,这行不通——它有什么作用?如果我们知道它是如何失败的,那么最容易修复它
  • 将图像视图放在LinearLayout 中并在LinearLayout 上施加权重
  • 将线性布局高度更改为 0

标签: android xml android-layout android-studio android-layout-weight


【解决方案1】:

内部线性布局必须有 0 宽度

        <LinearLayout
                android:orientation="vertical"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:weightSum="100"
                android:layout_weight="60">

【讨论】:

  • 是的,宽度必须为 0dp 才能应用 weight 属性。
  • no 当您添加权重并将宽度设置为 0 时,它会根据父布局宽度和其他元素的权重更改其宽度。它的方向改变了里面的元素
  • 请检查我更新的问题。空间很大。
  • 你能解释一下你指的是哪个空间吗? @德州
【解决方案2】:

在linearlayout内第二次机会跟随代码。

            <LinearLayout
            android:orientation="vertical"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="60">

【讨论】:

  • 请检查我更新的问题。空间很大。
【解决方案3】:

我已更改您的代码检查它

根据需要更改图像视图并用此替换您的代码

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal"
android:clickable="true"
android:weightSum="100"
android:onClick="userProfileDetailAction"
android:id="@+id/userProfileDetail"
android:paddingTop="5dp"
android:paddingBottom="5dp">
<ImageView
    android:layout_weight="20"
    android:layout_width="0dp"
    android:layout_height="match_parent"
    android:id="@+id/userImage"
    android:src="@android:drawable/btn_star_big_on"
    android:scaleType="centerCrop"/>

<LinearLayout
    android:orientation="vertical"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:weightSum="100"
    android:gravity="center_vertical"
    android:layout_weight="60">

    <TextView
        android:id="@+id/userName"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_gravity="center" android:text="hey hi"
        android:textColor="@android:color/black"
        android:background="#ffffff"
        android:textSize="18sp"
        android:textStyle="bold"
        android:layout_weight="50"/>

    <TextView
        android:id="@+id/userRegistrationDate"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_gravity="center"
        android:textColor="@android:color/black"
        android:background="#ffffff"
        android:textSize="18sp"
        android:text = "45 days ago"
        android:textStyle="bold"
        android:layout_weight="50"/>
</LinearLayout>

<ImageView
    android:id="@+id/userClick"
    android:layout_width="0dp"
    android:layout_height="match_parent"
    android:src="@android:drawable/btn_star"
    android:layout_weight="20"  /></LinearLayout>

【讨论】:

    【解决方案4】:

    这是因为宽度使它成为 0dp..复制下面的代码它可以完美地工作

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center_horizontal"
            android:orientation="horizontal"
            android:clickable="true"
            android:weightSum="100"
            android:onClick="userProfileDetailAction"
            android:id="@+id/userProfileDetail"
            android:paddingTop="5dp"
            android:paddingBottom="5dp">
    
                          <com.example.eyeniaras.satdostum.CircleImageView
                            xmlns:app="http://schemas.android.com/apk/res-auto"
                            android:layout_weight="20"
                            android:layout_width="0dp"
                            android:layout_height="10dp"
                            android:background="@drawable/circle_shape"
                            app:civ_border_width="0.2dp"
                            app:civ_border_color="@color/dark"
                            android:id="@+id/userImage"
                            android:scaleType="centerCrop"/>
    
                           <LinearLayout
                            android:orientation="vertical"
                            android:layout_width="0dp"
    android:orientation="vertical"
                            android:layout_height="match_parent"
                            android:weightSum="100"
                            android:layout_weight="60">
    
                               <TextView
                                   android:id="@+id/userName"
                                   android:layout_width="wrap_content"
                                   android:layout_height="0dp"
                                   android:layout_gravity="center"
                                   android:textColor="@android:color/black"
                                   android:background="#ffffff"
                                   android:textSize="18sp"
                                   android:textStyle="bold"
                                   android:layout_weight="50"/>
    
                               <TextView
                                   android:id="@+id/userRegistrationDate"
                                   android:layout_width="wrap_content"
                                   android:layout_height="0dp"
                                   android:layout_gravity="center"
                                   android:textColor="@android:color/black"
                                   android:background="#ffffff"
                                   android:textSize="18sp"
                                   android:text = "45 days ago"
                                   android:textStyle="bold"
                                   android:layout_weight="50"/>
                            </LinearLayout>
    
                          <ImageView
                            android:id="@+id/userClick"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_gravity="center"
                            android:textColor="@android:color/black"
                            android:textSize="18sp"
                            android:textStyle="bold"
                            android:layout_weight="20"
                            android:background="@drawable/list_arrow" />
    
         </LinearLayout>
    

    【讨论】:

    • 向他解释他犯了什么错误,教一个人如何钓鱼而不是只给他鱼
    • 请检查我更新的问题。空间很大。
    • 在 textview 的中心属性中使用重力,并为您的主布局提供硬编码的高度
    【解决方案5】:

    您可以使用以下代码:-

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:weightSum="10" >
    
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:orientation="horizontal"
        android:weightSum="4" >
    
        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:orientation="vertical" >
    
            <ImageView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:src="@drawable/ic_launcher" />
        </LinearLayout>
    
        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="2"
            android:orientation="vertical"
            android:weightSum="1" >
    
            <TextView
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight=".5"
                android:gravity="center"
                android:text="hello" />
    
            <TextView
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight=".5"
                android:gravity="center"
                android:text="hello" />
        </LinearLayout>
    
        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:orientation="vertical" >
    
            <ImageView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:src="@drawable/ic_launcher" />
        </LinearLayout>
    </LinearLayout>
    

    【讨论】:

    • 请检查我更新的问题。空间很大。
    【解决方案6】:

    这是使用PercentageRelativeLayout 的完美场景。这种布局的最大优点是您可以使用基于百分比的尺寸,这非常简单。

    这是一个简单的例子,

    <android.support.percent.PercentRelativeLayout
             xmlns:android="http://schemas.android.com/apk/res/android"
             xmlns:app="http://schemas.android.com/apk/res-auto"
             android:layout_width="match_parent"
             android:layout_height="match_parent">
         <ImageView
             app:layout_widthPercent="50%"
             app:layout_heightPercent="50%"
             app:layout_marginTopPercent="25%"
             app:layout_marginLeftPercent="25%"/>
     </android.support.percent.PercentFrameLayout>
    

    这使用起来非常简单直观,并且还针对各种用例进行了优化。

    【讨论】:

    • 请检查我更新的问题。空间很大。
    • @texas 在支持库中,向后兼容 API 7。
    • 能否请您说明我基于 PercentRelativeLayout 的示例以便查看更大的图景?
    • 你可以自己试试。使用起来超级简单。如果您遇到任何问题,请发布您的代码,我一定会帮助您。
    【解决方案7】:

    我已获取您的代码并将其删除。以下,至少在工作室设计中,具有您所描述的布局。也许逐渐改变/适应这一点;在进行过程中检查它是否保持所需的布局。

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        xmlns:android="http://schemas.android.com/apk/res-auto"
        android:layout_gravity="center_horizontal"
        android:orientation="horizontal"
        android:clickable="true"
        android:weightSum="100"
        android:onClick="userProfileDetailAction"
        android:id="@+id/userProfileDetail"
        android:paddingTop="5dp"
        android:paddingBottom="5dp"
        xmlns:android="http://schemas.android.com/apk/res/android">
    
      <ImageView
          android:layout_width="100dp"
          android:layout_height="100dp" />
    
        <LinearLayout
            android:orientation="vertical"
            android:layout_width="500dp"
            android:layout_height="100dp"
            android:weightSum="100"
            android:layout_weight="60">
    
            <TextView
                android:id="@+id/userName"
                android:layout_width="500dp"
                android:layout_height="50dp"
                android:layout_gravity="center"
                android:textColor="@android:color/black"
                android:background="#ffffff"
                android:textSize="18sp"
                android:textStyle="bold"
                android:layout_weight="50"/>
    
            <TextView
                android:id="@+id/userRegistrationDate"
                android:layout_width="500dp"
                android:layout_height="50dp"
                android:layout_gravity="center"
                android:textColor="@android:color/black"
                android:background="#ffffff"
                android:textSize="18sp"
                android:text = "45 days ago"
                android:textStyle="bold"
                android:layout_weight="50"/>
        </LinearLayout>
    
        <ImageView
            android:id="@+id/userClick"
            android:layout_width="100dp"
            android:layout_height="100dp" />
    
    </LinearLayout>
    

    请注意,我已经取消了 width="match_parent" 之类的内容,例如,这可能是一个问题。

    【讨论】:

    • 请检查我更新的问题。空间很大。
    【解决方案8】:

    根据图片。


    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/userProfileDetail"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:clickable="true"
        android:onClick="userProfileDetailAction"
        android:orientation="horizontal"
        android:padding="5dp"
        android:paddingBottom="5dp"
        android:paddingTop="5dp"
        android:weightSum="5">
    
        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1">
    
            <com.example.eyeniaras.satdostum.CircleImageView xmlns:app="http://schemas.android.com/apk/res-auto"
                android:id="@+id/userImage"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/circle_shape"
                android:scaleType="centerCrop"
                app:civ_border_color="@color/dark"
                app:civ_border_width="0.2dp" />
    
        </LinearLayout>
    
        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="3"
            android:orientation="vertical"
            android:weightSum="2">
    
            <TextView
                android:id="@+id/userName"
                android:layout_width="match_parent"
                android:gravity="center"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_weight="1"
                android:background="#ffffff"
                android:text="45 days ago"
                android:textColor="@android:color/black"
                android:textSize="18sp"
                android:textStyle="bold" />
    
            <TextView
                android:id="@+id/userRegistrationDate"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_weight="1"
                android:background="#ffffff"
                android:gravity="center"
                android:text="45 days ago"
                android:textColor="@android:color/black"
                android:textSize="18sp"
                android:textStyle="bold" />
        </LinearLayout>
    
        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1">
    
            <ImageView
                android:id="@+id/userClick"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_weight="20"
                android:background="@drawable/list_arrow"
                android:textColor="@android:color/black"
                android:textSize="18sp"
                android:textStyle="bold" />
        </LinearLayout>
    
    </LinearLayout>
    

    【讨论】:

    • 请检查我更新的问题。空间很大。
    【解决方案9】:

    根本不要使用weightsum,然后根据要求为所有主要视图分配权重。它肯定会起作用。为什么要让事情变得复杂。我已经为你做了。在下面查看。

      <LinearLayout
        android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center_horizontal"
    android:orientation="horizontal"
    android:clickable="true"
      android:onClick="userProfileDetailAction"
    android:id="@+id/userProfileDetail"
    android:paddingTop="5dp"
    android:paddingBottom="5dp">
    
                  <com.example.eyeniaras.satdostum.CircleImageView
                    xmlns:app="http://schemas.android.com/apk/res-auto"
                    android:layout_weight="0.2"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:background="@drawable/circle_shape"
                    app:civ_border_width="0.2dp"
                    app:civ_border_color="@color/dark"
                    android:id="@+id/userImage"
                    android:scaleType="centerCrop"/>
    
                   <LinearLayout
                    android:orientation="vertical"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
    
                    android:layout_weight="0.6">
    
                       <TextView
                           android:id="@+id/userName"
                           android:layout_width="wrap_content"
                           android:layout_height="0dp"
                           android:layout_gravity="center"
                           android:textColor="@android:color/black"
                           android:background="#ffffff"
                           android:textSize="18sp"
                           android:textStyle="bold"
                           android:layout_weight="1"/>
    
                       <TextView
                           android:id="@+id/userRegistrationDate"
                           android:layout_width="wrap_content"
                           android:layout_height="0dp"
                           android:layout_gravity="center"
                           android:textColor="@android:color/black"
                           android:background="#ffffff"
                           android:textSize="18sp"
                           android:text = "45 days ago"
                           android:textStyle="bold"
                           android:layout_weight="1"/>
                    </LinearLayout>
    
                  <ImageView
                    android:id="@+id/userClick"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_gravity="center"
                    android:textColor="@android:color/black"
                    android:textSize="18sp"
                    android:textStyle="bold"
                    android:layout_weight="0.2"
                    android:background="@drawable/list_arrow" />
    
          </LinearLayout>
    

    【讨论】:

    • 请检查我更新的问题。空间很大。
    • 没人知道里面写的是什么.. com.example.eyeniaras.satdostum.CircleImageView...也不要使用android:background="@drawable/circle_shape" 使用android:src=" @drawable/circle_shape"...背景使图像模糊。
    【解决方案10】:

    您需要为图像和文本视图使用 android:layout_weight 所以这里是解决方案,

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/userProfileDetail"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:layout_margin="5dp"
        android:clickable="true"
        android:onClick="userProfileDetailAction"
        android:orientation="horizontal"
        android:paddingBottom="5dp"
        android:paddingTop="5dp"
        android:weightSum="5">
    
        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1.4">
    
            <com.example.eyeniaras.satdostum.CircleImageView xmlns:app="http://schemas.android.com/apk/res-auto"
                android:id="@+id/userImage"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/circle_shape"
                android:scaleType="centerCrop"
                app:civ_border_color="@color/dark"
                app:civ_border_width="0.2dp" />
    
        </LinearLayout>
    
        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="3"
            android:orientation="vertical"
            android:weightSum="2">
    
            <TextView
                android:id="@+id/userName"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_weight="1"
                android:background="#ffffff"
                android:gravity="center"
                android:text="Hi"
                android:textColor="@android:color/black"
                android:textSize="18sp"
                android:textStyle="bold" />
    
            <TextView
                android:id="@+id/userRegistrationDate"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_weight="1"
                android:background="#ffffff"
                android:gravity="center"
                android:text="45 days ago"
                android:textColor="@android:color/black"
                android:textSize="18sp"
                android:textStyle="bold" />
        </LinearLayout>
    
        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="0.6">
    
            <ImageView
                android:id="@+id/userClick"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_weight="20"
                android:background="@drawable/list_arrow"
                android:textColor="@android:color/black"
                android:textSize="18sp"
                android:textStyle="bold" />
        </LinearLayout>
    
    </LinearLayout>
    

    【讨论】:

    • 请检查我更新的问题。空间很大。
    • 你需要根据你的图像大小来设置它,只需 chage layout_weight
    • 这是针对单个设备还是您想支持不同分辨率的所有设备?
    • 我希望所有设备都支持不同的分辨率
    • 好的。那么你必须创建不同的布局文件和不同大小的图像,而不是复制我的答案代码并尝试。
    【解决方案11】:
    <LinearLayout
                    android:orientation="vertical"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:weightSum="100"
                    android:layout_weight="60">
    

    android:layout_width="match_parent",这个布局的宽度是match_parent,所以把其他的都填满了,改成wrap_content,就像

    <?xml version="1.0" encoding="utf-8"?> 
    <LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/userProfileDetail"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center_horizontal"
    android:clickable="true"
    android:onClick="userProfileDetailAction"
    android:orientation="horizontal"
    android:paddingBottom="5dp"
    android:paddingTop="5dp"
    android:weightSum="100" >
    
    <ImageView  
        android:id="@+id/userImage"
        android:layout_width="0dp"
        android:layout_height="40dp"
        android:layout_weight="20"
        android:background="@drawable/ic_launcher"
        android:scaleType="centerCrop"
        />
    
    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:weightSum="100"
        android:layout_weight="60"
        android:orientation="vertical"
        >
    
        <TextView
            android:id="@+id/userName"
            android:layout_width="wrap_content"
            android:layout_height="0dp"
            android:layout_gravity="center"
            android:layout_weight="50"
            android:background="#ffffff"
            android:text="46 days ago"
            android:textColor="@android:color/black"
            android:textSize="18sp"
            android:textStyle="bold" />
    
        <TextView
            android:id="@+id/userRegistrationDate"
            android:layout_width="wrap_content"
            android:layout_height="0dp"
            android:layout_gravity="center"
            android:layout_weight="50"
            android:background="#ffffff"
            android:text="45 days ago"
            android:textColor="@android:color/black"
            android:textSize="18sp"
            android:textStyle="bold" />
    </LinearLayout>
    
    <ImageView  
        android:id="@+id/userImage"
        android:layout_width="0dp"
        android:layout_height="40dp"
        android:layout_weight="20"
        android:background="@drawable/ic_launcher"
        android:scaleType="centerCrop"
        />
    
    </LinearLayout>
    

    【讨论】:

      【解决方案12】:

      使用可以关注体重的东西..我认为这个答案对你有帮助.. 这个xml

          <LinearLayout
              android:layout_width="0dp"
              android:layout_height="match_parent"
              android:layout_weight="30"
              android:background="@drawable/background"
              android:gravity="center" >
      
              <ImageView
                  android:layout_width="80dp"
                  android:layout_height="80dp"
                  android:src="@drawable/images" />
          </LinearLayout>
          <LinearLayout
              android:layout_width="0dp"
              android:layout_height="match_parent"
              android:layout_weight="40" >
              <LinearLayout
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:orientation="vertical"
                  android:weightSum="10" >
                  <LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="0dp"
                      android:layout_weight="5"
                      android:background="@drawable/background"
                      android:gravity="center" >
      
                      <TextView
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:text="Firstname" />
                  </LinearLayout>
      
                  <LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="0dp"
                      android:layout_weight="5"
                      android:background="@drawable/background"
                      android:gravity="center" >
                      <TextView
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:text="Lastname" />
                  </LinearLayout>
              </LinearLayout>
          </LinearLayout>
      
          <LinearLayout
              android:layout_width="0dp"
              android:layout_height="match_parent"
              android:layout_weight="30"
              android:background="@drawable/background"
              android:gravity="center" >
      
              <ImageView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:src="@drawable/download" />
          </LinearLayout>
      </LinearLayout>
      
      and this code for background past in drawable/background
      <?xml version="1.0" encoding="UTF-8"?>
      
      <!-- res/drawable/rounded_edittext.xml -->
      
      <shape xmlns:android="http://schemas.android.com/apk/res/android"
          android:padding="12dp"
          android:shape="rectangle" >
          <solid android:color="#FFFFFF" />
          <stroke
              android:width="0.3dp"
              android:color="#797979" />`enter code here`
      </shape>
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2023-03-26
        • 2015-08-31
        • 2016-12-01
        • 1970-01-01
        • 2016-09-01
        • 2012-07-11
        • 2018-04-08
        • 2017-04-20
        相关资源
        最近更新 更多