• Android学习——day12


    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>

  • 相关阅读:
    算法提高---概率计算
    全排列
    算法提高 最小方差生成树
    【洛谷】P1040 加分二叉树
    SPAF模板
    Bellman-Ford算法(有向图)
    Floyd算法
    Dijkstra算法
    蓝桥杯算法提高 递推求值 【矩阵快速幂】
    【动态规划】数字分组I
  • 原文地址:https://www.cnblogs.com/znjy/p/14413360.html
Copyright © 2020-2023  润新知