• android笔记三FrameLayout


    strings.xml

    <resources>

        <string name="app_name">FrameTest</string>
        <string name="hello_world">Hello world!</string>
        <string name="menu_settings">Settings</string>
        <string name="title_activity_main">MainActivity</string>
     <string name="big">big</string>
     <string name="small">small</string>
     <string name="middle">middle</string>
    </resources>

    colors.xml

    <?xml version="1.0" encoding="utf-8" ?>
    <resources>
       
        <color name="red">#6400FF00</color>
        <color name="green">#64FF0000</color>
        <color name="blue">#640000FF</color>
        <color name="white">#FFFFFF</color>
        <color name="black">#000000</color>
    </resources>

    activity_main.xml

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:orientation="vertical"
        android:background="@color/white"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" >

        <FrameLayout
            android:id="@+id/FrameLayout01"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            >
        <TextView
            android:text="@string/small"
            android:id="@+id/TextView01"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="24dip"
            android:textStyle="bold"
            android:textColor="@color/red"
            />
        <TextView
            android:text="@string/big"
            android:id="@+id/TextView03"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@color/blue"
            android:textSize="60dip"
            android:textStyle="bold"
            ></TextView>

    </FrameLayout>
    </LinearLayout>

    MainActivity.java

    package com.example.frametest;

    import android.os.Bundle;
    import android.app.Activity;
    import android.view.Menu;

    public class MainActivity extends Activity {

        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
        }

        @Override
        public boolean onCreateOptionsMenu(Menu menu) {
            getMenuInflater().inflate(R.menu.activity_main, menu);
            return true;
        }
    }

  • 相关阅读:
    Exchange 2016与国内版O365混合部署(1):过程总览
    Office365与本地Exchange混合部署之邮件流介绍详情
    清理Exchange 2013和2016的Log文件(精华)
    Exchange2016日志路径
    C:/inetpub/logs/logfile/路径详解
    使用VMwareVCenterConverter迁移到虚拟机(p2v)
    WindowsServer安全基线
    利用WSUS部署更新程序
    Storefront与NetScaler的集成配置
    运维技巧(13):Exchange证书申请导入
  • 原文地址:https://www.cnblogs.com/newlist/p/2686829.html
Copyright © 2020-2023  润新知