make example simpler, remove uneeded code

This commit is contained in:
Alexander Mahr 2024-10-08 11:26:17 +02:00
parent 5b20785703
commit 488f0da7e8

View file

@ -29,51 +29,5 @@ public class ExampleApp extends Activity {
tv.setText("SUPERVIEalexW"); tv.setText("SUPERVIEalexW");
tv.setLayoutParams(lpView); tv.setLayoutParams(lpView);
linLayout.addView(tv); 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);
// }
//
// }
//
//
//}