27 lines
715 B
Java
27 lines
715 B
Java
package com.example.shadowing;
|
|
|
|
import android.app.Activity;
|
|
import android.os.Bundle;
|
|
|
|
import android.widget.LinearLayout;
|
|
import android.widget.TextView;
|
|
|
|
//import android.widget.RelativeLayout;
|
|
//import android.view.ViewGroup;
|
|
//import android.view.View;
|
|
|
|
public class MainActivity extends Activity {
|
|
@Override
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
super.onCreate(savedInstanceState);
|
|
|
|
LinearLayout ll = new LinearLayout(this);
|
|
ll.setOrientation(LinearLayout.VERTICAL);
|
|
ll.generateViewId();
|
|
setContentView(ll);
|
|
TextView tw = new TextView(this);
|
|
tw.setText("Hello Void!");
|
|
tw.generateViewId();
|
|
ll.addView(tw);
|
|
}
|
|
}
|