zoukankan      html  css  js  c++  java
  • 寒假学习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>
  • 相关阅读:
    go module配置
    beego conf配置文件
    go string类型的特性
    go语言简单介绍,增强了解
    beego项目和go项目 打包部署到linux
    第一个go程序
    linux下vim编辑器查找 关键字
    配置ngnix下的虚拟主机
    PHP中文无乱码截取
    #1040
  • 原文地址:https://www.cnblogs.com/lxywsx/p/14905611.html
Copyright © 2011-2022 走看看