Place two buttons side by side

by Droid » Mon, 06 Sep 2010 00:10:03 GMT


Sponsored Links
 OK, my buttons go one under the other, but I want them side by side.

How do I place two buttons side by side?

--



Place two buttons side by side

by Filip Havlicek » Mon, 06 Sep 2010 00:13:00 GMT


 All you want is here
 http://developer.android.com/reference/android/widget/LinearLayout.html 

2010/9/5 Droid <rod...@gmail.com>

>


Sponsored Links


Place two buttons side by side

by Droid » Mon, 06 Sep 2010 02:03:30 GMT


 Thanks, but cannot follow that page without a migraine.
Who can give me a snippet for two buttons side by side?



> >



Place two buttons side by side

by Frank Weiss » Mon, 06 Sep 2010 02:12:06 GMT


 Try the hello views page:
 http://developer.android.com/intl/de/resources/tutorials/views/index.html 

And please do use the resources before asking questions :-)

--



Place two buttons side by side

by Filip Havlicek » Mon, 06 Sep 2010 02:15:24 GMT


 Did you actually tried to read it? Everything you need to know is said in a
first few lines.

Best regards,
Filip Havlicek

2010/9/5 Droid <rod...@gmail.com>


> > >



Place two buttons side by side

by Droid » Mon, 06 Sep 2010 04:07:29 GMT


 I am coding continuously but have hit a brain fade time. So cannot
easily
read all that at this point. Later.




> > > >



Place two buttons side by side

by Droid » Mon, 06 Sep 2010 04:09:26 GMT


 Thanks for that easy reference, looks like its
android:layout_alignParentRight="true"
or something like that.




--



Place two buttons side by side

by Alex » Tue, 07 Sep 2010 21:16:42 GMT


Other Threads

1. Please tell me how to update firmware of HT-03A from Android 1.5 to 1.6.

My HT-03A firm ware is Android 1.5.  But my computer's Android SDK is
1.6. So I 'd like to update firmware of HT-03A. But I don't know where
is a update package of HT-03A. please tell me for them.

Thanks.


--~--~---------~--~----~------------~-------~--~----~

2. Modifying text for ListView with SimpleCursorAdapter

I have a ListView displaying rows from the database with a
SimpleCursorAdapter (like in the NotePad tutorials).  Instead of
displaying raw database values, I needed to "format" the text in the
row to be human readable.  I wasn't sure how to achieve this, but I
managed to find SimpleCursorAdapter.ViewBinder and made it work with
that.

Is this the best way to do this?

I only ask because I've only got a single TextView per row, but I'm
pulling data from multiple columns.  Also, the From and To parameters
for constructing the SimpleCursorAdapter are pretty pointless with
this approach.  So, I'm just ignoring the columnIndex passed to my
setViewValue() function and using cursor.getColumnIndexOrThrow to pull
the data from each column and build a string that I pass to the view.

Looking for any suggestions on how this might be improved.

        adapter.setViewBinder(new ViewBinder() {

            public boolean setViewValue(View view, Cursor cursor, int
columnIndex) {
                String rowDesc = "";

                int intValue = cursor.getInt(
                        cursor.getColumnIndexOrThrow("intColumn"));
                rowDesc = "$" + intValue + " ";

                switch (cursor.getInt(cursor.getColumnIndexOrThrow
("optionColumn")))
                {
                case 0:
                    rowDesc += "Option A";
                    break;
                case 1:
                    rowDesc += "Option B";
                    break;
                case 2:
                    rowDesc += "Option C";
                    break;
                }

                //etc etc

                ((TextView) view).setText(rowDesc);

                return true;
            }
        });

--~--~---------~--~----~------------~-------~--~----~

3. Nesting an ActivityGroup as atTab content

4. proposed Android rogramming course

5. Application compatibility between SDK 1.5 and 1.6

6. Application compatibility between SDK 1.5 and 1.6

7. HTC Hero Have a 'with Google' Logo ?