zoukankan      html  css  js  c++  java
  • 3.01

    一、今日学习内容

    FrameLayout:帧布局管理器

    1、特点:显示层叠的内容,显示拖动的动画效果

    2、<FrameLayout>标记

    常用属性:

    android:foreground:设置前景图像

    android:foregroundGravity:设置前景图像的位置(前景图像——位于最上层)

    3、实例

    复制代码
    复制代码
     1 <?xml version="1.0" encoding="utf-8"?>
     2 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     3     xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_main"
     4     android:layout_width="match_parent" android:layout_height="match_parent"
     5     android:paddingBottom="@dimen/activity_vertical_margin"
     6     android:paddingLeft="@dimen/activity_horizontal_margin"
     7     android:paddingRight="@dimen/activity_horizontal_margin"
     8     android:paddingTop="@dimen/activity_vertical_margin"
     9     android:foreground="@mipmap/mla"
    10     android:foregroundGravity="left|bottom"
    11     tools:context="com.example.action.MainActivity">
    12 
    13     <TextView
    14         android:layout_width="280dp"
    15         android:layout_height="280dp"
    16         android:layout_gravity="center"
    17         android:background="#FF0000FF"
    18         android:text="蓝色背景的TextView"
    19         android:textColor="#FFFFFF"/>
    20     <TextView
    21         android:layout_width="230dp"
    22         android:layout_height="230dp"
    23         android:layout_gravity="center"
    24         android:background="#FF0077FF"
    25         android:text="天蓝色背景的TextView"
    26         android:textColor="#FFFFFF"/>
    27     <TextView
    28         android:layout_width="180dp"
    29         android:layout_height="180dp"
    30         android:layout_gravity="center"
    31         android:background="#FF00B4FF"
    32         android:text="水蓝色背景的TextView"
    33         android:textColor="#FFFFFF"/>
    34 </FrameLayout>
    复制代码
    复制代码

    二、遇到的问题

       暂无

    三、明日计划

       明天学习表格布局

  • 相关阅读:
    位运算 & 网络序字节序
    TFTP & commons-net-3.3.jar
    存储过程
    poj1185-炮兵阵地(状态压缩dp)
    hdu4570-区间dp
    codevs1026-dp(记忆化搜索)
    hdu1494 跑跑卡丁车(动态规划)
    hdu5094-Maze
    hdu4403- A very hard Aoshu problem(搜索)
    hdu2510-符号三角形(dfs+打表)
  • 原文地址:https://www.cnblogs.com/zyljal/p/14905637.html
Copyright © 2011-2022 走看看