Percentage width in a RelativeLayout

后端 未结 14 1981
遥遥无期
遥遥无期 2020-11-22 13:54

I am working on a form layout for a Login Activity in my Android App. The image below is how I want it to look like:

14条回答
  •  执笔经年
    2020-11-22 14:29

    Update

    As pointed by @EmJiHash PercentRelativeLayout and PercentFrameLayout is deprecated in API level 26.0.0

    Consider Using ConstraintLayout

    Google introduced new API called android.support.percent

    1)PercentRelativeLayout

    2)PercentFrameLayout

    Add compile dependency like

    compile 'com.android.support:percent:23.1.1'
    

    You can specify dimension in percentage so get both benefit of RelativeLayout and percentage

     
         
     
    

提交回复
热议问题