Ganga
Ganga

Reputation: 607

PercentRelativeLayout for same screen on Android phone and Tablet?

The screens in my app needs to be displayed in the same way on both type of devices, phones and tablets. Currently my app works fine on phones, but they behave weird when run on tablets. The problem occurs with the positioning and size of components in the screen.I have 9 patch images generated for all the images being used but still for some components that I use absolute size/margin values such as 30dp,50dp etc do not seem to be good measures that work well on a tablet. Some of my thoughts/questions are:

  1. PercentRelativeLayout - is it the best solution to overcome this problem?
  2. Is there a way that layouts can be defined so as to draw differently on phones and tablets. Please note that that I do not have any complex menus or behaviour that needs to work differently on different devices, they are same.
  3. Do I have to develop 2 different apps?

Upvotes: 0

Views: 106

Answers (1)

BOUTERBIAT Oualid
BOUTERBIAT Oualid

Reputation: 1544

you have to make different layouts for both android phone and tablet.

Look at this link

Upvotes: 1

Related Questions