0

So, first of all I'm very new to Android so this may be a very dumb question, but..

I have in my mainActivity layout a viewPager which calls some fragments of different type (I have made 4-5 xml layout displaying different informations)

Despite I created all the layout basing on weighed LinearLayout to maximize compatibility, in the preview the visibility seems perfect in each device I selected, but once I load the application on my phone, the layout has bizarre behavior.

Here an example (preview vs. screenshot from my device)

enter image description here

I'm not sure about where I made the mistake, I would like to know:

1) What happened

2) What cause this behaviour

3) How to fix it (a link with a guide would be very welcome)

Thanks very much!

  • do you have same dimensions for the preview and your real device? – hehe Mar 26 '16 at 16:18
  • from what I see in your screen shots, the dimensions of the preview and device are not the same. Thus, I suggest you study "supporting multiple dimensions of devices", try this question http://stackoverflow.com/questions/35713695/how-do-native-apps-pull-off-being-responsive/35713838#35713838 – hehe Mar 26 '16 at 16:22
  • Post your `layout xml` file. – dieter_h Mar 26 '16 at 16:24
  • both preview and my device are 1080x1920! – Alessandro D'Armiento Mar 28 '16 at 21:35

0 Answers0