Hi
I am totally newbie for android.
Today I wrote one example code.
I would put them 3X3. but buttons won't be in same row.
What I want is here...
button1 button2 button3
button4 button5 button6
button7 button8 button9
Here's my example code...
=================
public class butt_test1 extends Activity {
private TextView displayView;
private Button AddMenu1;
private Button AddMenu2;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
AddMenu1 = (Button)findViewById(R.id.btn1);
AddMenu2 = (Button)findViewById(R.id.btn2);
}
}
=================
here's xml file
=================
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Button android:id="@+id/btn1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="booooooton1"/>
<Button android:id="@+id/btn2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="boooooooton2"/>
</LinearLayout>
=================
Thanks in advance
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---