PowenKo, Android, Tutorial 010, UI, TextView


Tutorial_UI_TextView.java

package com.powenko.Tutorial_UI_TextView;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class Tutorial_UI_TextViewActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        TextView t_textView_title = (TextView)findViewById(R.id.textView1);
	    t_textView_title.setText("Food");

    }
}

res\layout\main.xml


<!--?xml version="1.0" encoding="utf-8"?-->







Information:

android:textSize=”20dip”               //  font size

android:textColor=”#000000″     // font color

sample code:

Tutorial_UI_TextView


Leave a Reply