package com.example.tutorial;
import android.content.Context;
import android.widget.RelativeLayout;
import android.widget.TextView;
/**
* Created by Shiburagi on 26-Jan-15.
*/
public class MainLayout extends RelativeLayout{
/**
* Constructor
* @param context
*/
public MainLayout(Context context) {
super(context);
//call init function
init(context);
}
/**
* to initialize component been used in the application
* @param context
*/
private void init(Context context){
// declare textview component
TextView textView=new TextView(context);
// set value of the textview.
textView.setText("Hello World!");
// add textview into this layout
addView(textView);
}
}