0
点赞
收藏
分享

微信扫一扫

帧布局基础

萧萧雨潇潇 2022-04-18 阅读 31
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".FrameActivity"
    android:foreground="@mipmap/naruto"
    android:foregroundGravity="center">

    <TextView
        android:layout_width="400dp"
        android:layout_height="400dp"
        android:background="#ff0000"
        android:layout_gravity="center"
        >

    </TextView>

    <TextView
        android:layout_width="300dp"
        android:layout_height="300dp"
        android:background="#00ff00"
        android:layout_gravity="center"
        >

    </TextView>

    <TextView
        android:layout_width="200dp"
        android:layout_height="200dp"
        android:background="#0000ff"
        android:layout_gravity="center">

    </TextView>

    <TextView
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:background="#ff00ff"
        android:layout_gravity="center">

    </TextView>
</FrameLayout>

 

 

举报

相关推荐

0 条评论