Layout problems: AbsoluteLayout deprecated, how to do it now?

by Arron » Sat, 30 Jan 2010 18:10:19 GMT


Sponsored Links
 Well that's exactly the reason why absoluteLayout was deprecated.  It
works for only one screen size.

I will say use various layouts with sp margins to space out the
buttons correctly.




--



Layout problems: AbsoluteLayout deprecated, how to do it now?

by theSmith » Sun, 31 Jan 2010 03:28:44 GMT


 


You should be able to use a relativelayout or a linearlayout and just
add padding in dip (density independent pixels) to the sides of the
buttons.  For small screen devices you probably want to create a new
layout with smaller buttons so it displays properly.

-theSmith



--


Sponsored Links


Layout problems: AbsoluteLayout deprecated, how to do it now?

by kaasinees » Tue, 02 Feb 2010 02:07:56 GMT


 try making a new view that is centered in the layout than use the
margin attributes like mentioned before to position the buttons inside
that  view.

this way it could work on all screen sizes.




--



Layout problems: AbsoluteLayout deprecated, how to do it now?

by James Wang » Sat, 27 Feb 2010 12:30:43 GMT


 I think you can do anything with Framelayout like absolutelayout.

--



Other Threads

1. custom EditText that executes callback function

I have a user input box that I want to execute a function every time I
press enter.  I can't call super.onKey(...) to do the standard text
input.

I have two ways to solve this problems, but I'm having trouble looking
for places to find out how to do this.
1. Convert the keycode to a character that I can append to (theText)
2. Find a standard onKeyListener that I can call

---------------------------------------------------------------------------------------------------------------------------
final EditText userInputBox = (EditText) findViewById
(R.id.editTextItems);
        userInputBox.setOnKeyListener(new OnKeyListener()
        {
                public boolean onKey(View v, int keyCode, KeyEvent event)
                {
                    // code
                        Editable theText = userInputBox.getText();
                        int pressedKey = event.getUnicodeChar();
                        if (pressedKey == '\n')
                        {
                                addUserInput();
                        }

                        return true;
                }
        });
---------------------------------------------------------------------------------------------------------------------------

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

2. Querying in Sqlite

Is it possible to pass a query directly and check the values that has
been inserted for a particular table in a database using the SQlite3
UI (like what we do in SQLSERVER) or should i write a program to
display the values inserted for a particular table??
--~--~---------~--~----~------------~-------~--~----~

3. how to set RESULT_OK when activity exit?

4. how to get list of email?

5. packet reordering

6. Some suggestions for Google

7. How to programmically add a new contact in android