init
This commit is contained in:
commit
18f15741a7
5 changed files with 81 additions and 0 deletions
27
java/classes/com/example/shadowing/MainActivity.java
Normal file
27
java/classes/com/example/shadowing/MainActivity.java
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue