Listing 113 srccomcookbookadvanceShowMyButtonjava

package com.cookbook.advance.customComponent;

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

public class ShowMyButton extends Activity{ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

setContentView(R.layout.main);

MyButton myb = (MyButton)findViewByld(R.id.mybuttonl);

myb.setText("Hello Students"); myb.setTextSize(40);

This shows the custom button is used the same as a normal Button widget. The resulting custom button is shown in Figure 11.1.

Figure 11.1 An example of a custom button.
Character Building Thought Power

Character Building Thought Power

Character-Building Thought Power by Ralph Waldo Trine. Ralph draws a distinct line between bad and good habits. In this book, every effort is made by the writer to explain what comprises good habits and why every one needs it early in life. It draws the conclusion that habits nurtured in early life concretize into impulses in future for the good or bad of the subject.

Get My Free Ebook


Post a comment