30 lines
803 B
Java
30 lines
803 B
Java
package com.example.shadowing;
|
|
|
|
import android.app.Activity;
|
|
import android.os.Bundle;
|
|
|
|
import android.widget.LinearLayout;
|
|
import android.widget.TextView;
|
|
|
|
import android.util.Log;
|
|
|
|
public class MainActivity extends Activity {
|
|
@Override
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
super.onCreate(savedInstanceState);
|
|
|
|
String txt = Main.getValue();
|
|
String pkg_name = getApplicationContext().getPackageName();
|
|
|
|
LinearLayout ll = new LinearLayout(this);
|
|
ll.setOrientation(LinearLayout.VERTICAL);
|
|
ll.generateViewId();
|
|
setContentView(ll);
|
|
TextView tw = new TextView(this);
|
|
tw.setText(txt);
|
|
tw.generateViewId();
|
|
ll.addView(tw);
|
|
|
|
Log.i("SHADOWING", "App: " + pkg_name + ", txt: " + txt);
|
|
}
|
|
}
|