skip to main | skip to sidebar

Line-At-A-Time

Pages

  • Home

Aligning LinearLayout

I wanted to center the numeric keypad and remove the hardcoded "padding".
 
But using just

android:layout_centerHorizontal

="true"
wasn't sufficient because the width was set to "fill_parent". The width needs to be changed to "wrap_content" to give the parent enough horizontal room to do the alignment of the linearlayout.
 
 

Newer Post Older Post Home

Blog Archive

  • ▼  09 (28)
    • ▼  9 (28)
      • Checkboxes on Icon Menus
      • Leaking Services is scary easy
      • Focusable View inside ListView item won't be click...
      • NinePatch Images
      • Emulator Telnet
      • GPS GeoLocation Navigation Information
      • onLocationChanged event fires only one in the Emul...
      • Soft Numeric Keyboard
      • RelativeLayout
      • Removing hard coded dimensions
      • Aligning LinearLayout
      • Handy ListView attribute
      • Empty ListView
      • BitmapDrawable
      • Defining Sub-Menus in XML
      • AsyncTask
      • Simple Custom Control Template
      • G1 Upgrade to 1.5
      • Cursor Error
      • Landscape Values
      • Android Source Code
      • Service Permissions
      • Attaching the debugger
      • Defining and Using Menus in XML
      • List the InputMethods
      • Make a TextView look like an EditText
      • Minimum required to get started with Google Maps
      • Conversion to Dalvik format failed with error 1
  • ►  12 (1)
    • ►  4 (1)
  • ►  13 (29)
    • ►  4 (9)
    • ►  5 (6)
    • ►  6 (14)
  • ►  14 (1)
    • ►  12 (1)
  • ►  15 (2)
    • ►  1 (2)
  • ►  18 (7)
    • ►  2 (1)
    • ►  3 (1)
    • ►  4 (5)

My Blog List