1. Download our Official Android App: Forums for Android!

Apps Layout Issues - Newbie Question

Discussion in 'Android Development' started by Loopback, Jun 6, 2016.

  1. Loopback

    Loopback Lurker
    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    4
    Joined:
    Jun 6, 2016

    Jun 6, 2016
    4
    1
    16
    Male
    Hi all,

    Wondering if someone could point me in the right direction. I'm pretty new to Android Studio so i've been following the guides on the android site. I've created the 'start' of an app, but come across an issue with my layout and I can't work it out (code attached).

    I've created the initial layout as relative, and just added some buttons in a sort of list fashion. My virtual device is a 4.7" screen and everything looks great, but checking on other devices with different resolutions, the buttons don't 'scale' as I thought/hoped they would, so some of my buttons end up missing (at the bottom) or I get tiny buttons with large amount of whitespace at the bottom.

    I understand that in order to support different screen sizes i need to do other things, but considering i'm just using the things that are built in to android at this stage I wouldn't have to?

    Thanks.

     

    Attached Files:


    Advertisement

  2. Thom

    Thom  
    VIP Member
    Rank:
     #21
    Points:
    1,318
    Posts:
    12,016
    Joined:
    Feb 16, 2011

    Feb 16, 2011
    12,016
    4,978
    1,318
    Male
    Software Developer
    Keene, NH USA
    Welcome to Android Forums.

    This thread was moved to this forum where development is discussed.

    ... Thom
     
  3. HeavensSentSword

    HeavensSentSword Well-Known Member
    Rank:
    None
    Points:
    93
    Posts:
    134
    Joined:
    Jan 19, 2016

    Jan 19, 2016
    134
    36
    93
    Male
    Loopback and LV426 like this.
  4. Loopback

    Loopback Lurker
    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    4
    Joined:
    Jun 6, 2016

    Jun 6, 2016
    4
    1
    16
    Male
    Thanks for the reply mate. I found android layout weight which seemed to do the trick! Not sure if this is good practice though..
     
    HeavensSentSword likes this.
  5. HeavensSentSword

    HeavensSentSword Well-Known Member
    Rank:
    None
    Points:
    93
    Posts:
    134
    Joined:
    Jan 19, 2016

    Jan 19, 2016
    134
    36
    93
    Male
    It is ok, I just use the OS to do all my bidding. It works ok. But saves a lot of time in development
    and building of the app. There is only a bit of deformation here and there but for my apps that are not too heavy on buttons and input it is negligible.
     
    Loopback likes this.

Share This Page

Loading...