zoukankan      html  css  js  c++  java
  • android 实现2张图片层叠效果

    如图:

    代码:

    <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="130dp"
                android:orientation="vertical" >
    
                
    
                <ImageView
    android:id="@+id/iv_1"
    android:layout_width="match_parent" android:layout_height="70dp" android:layout_alignParentTop="true" android:background="@drawable/bg_account_header" /> <LinearLayout
    android:id="@+id/ll_center"
    android:layout_width="130dp" android:layout_height="match_parent" android:layout_alignParentTop="true" android:layout_alignParentBottom="true" android:layout_centerInParent="true" android:background="@drawable/bg_account_head_mid" android:gravity="center_horizontal|top" android:orientation="vertical" > <TextView android:layout_width="wrap_content" android:layout_height="20dp" android:text="当前余额" android:layout_marginTop="30dp" android:textColor="#fff" /> <TextView android:id="@+id/tv_account" android:layout_width="wrap_content" android:layout_height="20dp" android:text="¥0.0" android:textColor="#f8573a" /> </LinearLayout> </RelativeLayout>

    这里注意:

    iv_1  与 ll_center 是同一相邻兄弟元素,,还有最重要的一个:他们的代码先后顺序

  • 相关阅读:
    SqlLikeAttribute 特性增加 左、右Like实现
    MySql高效分页SQL
    ConcurrentQueue对列的基本使用方式
    第一次
    kubeadm搭建高可用k8s平台(多master)
    prometheus监控
    pyecharts地图中显示地名
    anaconda安装及使用
    Python的pyecharts安装
    安装MY SQL详细步骤
  • 原文地址:https://www.cnblogs.com/feijian/p/4613714.html
Copyright © 2011-2022 走看看