top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Android view design

+3 votes
273 views

I am new to android. I have designed a view layout in android and looks correct in portrait. If I change to landscape the position of view is not centered and half the screen below is hidden. How to fix this?

posted Aug 25, 2016 by Shwetha

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes

Hi Shwetha, it will be easier for me to resolve your issue if you share code else I can guess some solutions only. try these methods or if tried and skip to next .
1.You will have to create two versions of xml files and put in layout-port and layout-land folder inside res folder.

res/layout-land [Landscape Mode]
main.xml 
res/layout-port [Portrait Mode ]
main.xml

Link : https://developer.android.com/training/basics/supporting-devices/screens.html
2.Use gravity while creating layouts for both orientation.
Link : https://developer.android.com/reference/android/view/Gravity.html

answer Aug 28, 2016 by Shivam Kumar Pandey
Similar Questions
+3 votes

I have an app developed with normal design. How do I change it to material design? Do I have to change all the Views to get material design?

0 votes

Hi everyone, I have been working on android application and want to know your views on creating radar view in android with example code. I am also very curious about various other programming questions and answers because I also got stuck in some android issues, that is why I am looking for some mobile development blogs where the evolving community can help me to resolve my queries.

+2 votes

I want to know the UID(System UID or User UID) of the application running in my Emulator. How can I see that information in DDMS ?

+5 votes

Isn't there a Package on Fedora repo that you can install so as to view files on Android Phones by USB.

+1 vote

Is there any option to set the limit on the number of RemoteViews widgets that user can put in the Homescreen.

...