In this post, we want to discuss, how to divide the activity screen (android) by percentage properly. Before we get started, if you want to know about how to programmatically change the default font in android studio, please go through the following article: How to use custom font in Android Studio.

I can’t use RelativeLayout if I want to use relative size in Android Studio. Instead, use LinearLayout and android:layout_weight to adjust the percentage. I should use LinearLayout with android:weightSum and android:layout_weight.

Code for divide activity by percentage horizontally

Code for divide activity by percentage vertically

You may like How to install Kali Linux on your Android device.

Properly divide activity screen as percentage

The article was published on October 22, 2016 @ 4:57 PM

Leave a Comment