android笔记三---FrameLayout

strings.xml

    FrameTest
    Hello world!
    Settings
    MainActivity
 big
 small
 middle

colors.xml



   
    #6400FF00
    #64FF0000
    #640000FF
    #FFFFFF
    #000000

activity_main.xml

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

            android:id="@+id/FrameLayout01"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        >
            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"
        />
            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"
        >


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;
    }
}

你可能感兴趣的:(android笔记三---FrameLayout)