zoukankan      html  css  js  c++  java
  • android学习---FrameLayout

      框架布局是将控件组织在Android程序的用户界面中最简单的布局类型之一。

      框架布局中的子视图总是被绘制到相对于屏幕的左上角上。所有添加到这个布局中的视图都是以层叠的方式显示。第一个添加到框架布局中的视图显示在最底层,最后一个被放在最顶层,上一层的视图会覆盖下一层的视图,因此框架布局类似堆栈布局。

      在框架布局中,常用的属性有以下几项:

      android:top将视图放到屏幕的顶端

      android:Buttom将视图放到屏幕的低端

      android:Left将视图放到屏幕的左端

      android:Right将视图放到屏幕的右端

      android:Center_vertical将视图按照垂直方向居中显示

      android:Center_horizontal将视图按照水平方向居中显示

    <?xml version="1.0" encoding="utf-8"?>
    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical" >
    
        <ImageView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:background="@drawable/background" >
        </ImageView>
    
        <ImageView
            android:layout_width="63dp"
            android:layout_height="46dp"
            android:layout_gravity="center"
            android:layout_marginTop="80dp"
            android:background="@drawable/img1" >
        </ImageView>
    
        <ImageView
            android:layout_width="85dp"
            android:layout_height="85dp"
            android:layout_gravity="center"
            android:layout_marginBottom="80dp"
            android:background="@drawable/img2" >
        </ImageView>
    
    </FrameLayout>
    main.xml

     

  • 相关阅读:
    论文阅读 | Spatial Transformer Networks
    Latex的各种帽子
    SiamFC网络影响
    Faster RCNN Tensorflow在测试时得到的result.txt文件
    ubuntu16.04使用docker部署TFserving之安装docker
    ubuntu系统使用Faster RCNN训练自己的数据集
    pandas基础1数据结构介绍
    numpy基础4线性代数等
    numpy基础3通用函数等
    numpy基础2索引和切片
  • 原文地址:https://www.cnblogs.com/lea-fu/p/3289266.html
Copyright © 2011-2022 走看看