• 寒假学习day15


    margin可以设置为负数

    下面写个简单的程序演示下吧,模拟进入软件后,弹出广告 页面的,右上角的cancle按钮的margin则是使用负数的!

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"  
        xmlns:tools="http://schemas.android.com/tools"  
        android:layout_width="match_parent"  
        android:layout_height="match_parent"  
        tools:context="com.jay.example.relativelayoutdemo.MainActivity"   
        android:background="#00CCCCFF">  
      
        <ImageView  
            android:id="@+id/imgBack"  
            android:layout_width="200dp"  
            android:layout_height="200dp"  
            android:layout_centerInParent="true"  
            android:background="@drawable/myicon" />  
      
        <ImageView  
            android:id="@+id/imgCancle"  
            android:layout_width="28dp"  
            android:layout_height="28dp"  
            android:layout_alignRight="@id/imgBack"  
            android:layout_alignTop="@id/imgBack"  
            android:background="@drawable/cancel"  
            android:layout_marginTop="-15dp"  
            android:layout_marginRight="-10dp" />  
      
    </RelativeLayout>
  • 相关阅读:
    CentOS系统更换软件安装源aliyun的
    判断手机电脑微信 js
    MFC HTTP
    阿里云 镜像 源 debian
    debian root 可以远程登陆
    java-dispose方法
    深入理解JAVA序列化
    Junit单元测试--01
    算法期末考试
    矩阵连乘 动态规划
  • 原文地址:https://www.cnblogs.com/lxywsx/p/14905611.html
Copyright © 2020-2023  润新知