zoukankan      html  css  js  c++  java
  • Android RelativeLayout 布局android:layout_centerHorizontal="true"注意

    特别注意,如果要是

    android:layout_alignTop="@id/bind_decode_item_layout"

    android:layout_centerHorizontal="true" 生效
    必须要设置兄弟元素android:layout_centerInParent="true"



    <?xml version="1.0" encoding="utf-8"?>
    <com.whoop.mobile.trace.view.BindDecodeItemLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >
    
        <RelativeLayout
            android:id="@+id/bind_decode_item_layout"
            android:layout_width="180dp"
            android:layout_height="220dp"
            android:layout_centerInParent="true"
            android:gravity="center" >
    
            <ImageView
                android:id="@+id/bind_decode_item_layout_diagram"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:scaleType="centerCrop"
                android:src="@drawable/bind_decode_item" />
    
            <TextView
                android:id="@+id/bind_decode_item_layout_qrcode"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true"
                android:layout_marginBottom="10dp"
                android:ellipsize="end"
                android:gravity="center_horizontal"
                android:singleLine="true"
                android:textColor="@color/black"
                android:textSize="15sp" />
        </RelativeLayout>
    
        <ImageButton
            android:id="@+id/bind_decode_item_layout_btnDelete"
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:layout_marginTop="-25dp"
            android:layout_alignTop="@id/bind_decode_item_layout"
            android:layout_centerHorizontal="true"
            android:scaleType="centerCrop"
            android:src="@drawable/activity_sale_duplicate_icon" />
    
    </com.whoop.mobile.trace.view.BindDecodeItemLayout>
  • 相关阅读:
    too many open files linux服务器 golang java
    fasthttp 文档手册
    syncer.go
    grpc.go
    stm.go
    session.go
    mutex.go
    [HTML5]label标签使用以及建议
    禁止使用finalize方法
    [支付宝]手机网站支付快速接入
  • 原文地址:https://www.cnblogs.com/exmyth/p/4875657.html
Copyright © 2011-2022 走看看