make example simpler, remove uneeded code
This commit is contained in:
parent
98eef38c7e
commit
fb5409ae83
1 changed files with 0 additions and 46 deletions
|
@ -29,51 +29,5 @@ public class ExampleApp extends Activity {
|
|||
tv.setText("SUPERVIEalexW");
|
||||
tv.setLayoutParams(lpView);
|
||||
linLayout.addView(tv);
|
||||
|
||||
Button btn = new Button(this);
|
||||
btn.setText("Button");
|
||||
linLayout.addView(btn, lpView);
|
||||
|
||||
|
||||
LinearLayout.LayoutParams leftMarginParams = new LinearLayout.LayoutParams(
|
||||
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
|
||||
leftMarginParams.leftMargin = 50;
|
||||
|
||||
Button btn1 = new Button(this);
|
||||
btn1.setText("Button1");
|
||||
linLayout.addView(btn1, leftMarginParams);
|
||||
|
||||
|
||||
LinearLayout.LayoutParams rightGravityParams = new LinearLayout.LayoutParams(
|
||||
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
|
||||
rightGravityParams.gravity = Gravity.RIGHT;
|
||||
|
||||
Button btn2 = new Button(this);
|
||||
btn2.setText("Button2");
|
||||
linLayout.addView(btn2, rightGravityParams);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
//public class ExampleApp extends Activity
|
||||
//{
|
||||
// @Override
|
||||
// public void onCreate(Bundle savedInstanceState)
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// super.onCreate(savedInstanceState);
|
||||
// //volatile String result = "initial";
|
||||
// String result = "initial";
|
||||
// TextView tv = new TextView(this);
|
||||
// tv.setMovementMethod(new ScrollingMovementMethod());
|
||||
// tv.setText( result);
|
||||
// setContentView(tv);
|
||||
// } catch (Exception e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
//
|
||||
//}
|
||||
|
|
Loading…
Add table
Reference in a new issue