zoukankan      html  css  js  c++  java
  • 3. Layout -- 1

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Your total is 0"
    android:textColor="#005500"
    android:background="#FF00FF"
    android:textSize="45sp"
    android:layout_gravity="center"    // Text水平居中显示
    android:gravity="center"              //垂直居中显示
    android:id="@+id/tvDiaplay"/>
    <Button
    android:layout_width="250dp"                         //Button控件的大小单位dp
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:layout_marginBottom="22dp"
    android:textSize="20sp"                                //字体用sp
    android:text = "Add one"
    android:id="@+id/add"/>
    <Button
    android:layout_width="250dp"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:textSize="20sp"
    android:shadowColor="#cccccc"
    android:alpha="0.5"                                       //opciaty
    android:textColor="#000000"
    android:fitsSystemWindows="true"                 //fix screen, for example when action bar show up
    android:id="@+id/second"
    android:text = "Second"/>
    </LinearLayout>

  • 相关阅读:
    Properties读取资源文件的四种方法
    如何成为一个C++高级程序员
    Linux定时任务设定
    Mysql之复制选项与监控
    GTID复制之二
    Mysql之多源复制
    MysqlDumpslow
    用Mysqlbinlog备份BinLog文件
    Mysql之mysqlbinlog使用
    Mysql之取消主从复制
  • 原文地址:https://www.cnblogs.com/Answer1215/p/3432626.html
Copyright © 2011-2022 走看看