ListPopupWindow - Orientation change - android

Okay so I have a simple ListPopupWindow assigned with String[] and in portrait works great.
If I open the List and then change the orinentation it messes everything up.
When I show the Popup for first time in portrait:
When I change orientation while the Popup is opened:
When I open it while in landscape mode:
I want while is opened and I change orientation to go to the button view, and when I open it in landscape mode to be wrapped because if I want to choose about or help and feedback I am not able because its not scrollable. How can I achieve that?

Related

Need Help in Android Studio layout

I was putting in an email text in my design window and now, it looks like this
The design layout is in landscape mode how to change it back to normal mode?
Change the orientation of the screen from side menu as shown in image

How FaceBook is managing and removing the margins in landscape and keyboard open mode

I wonder and not getting how facebook manages to fit the layout on all screen sizes by removing the padding or margins as shown below in landscape mode and open keyboard mode.
If anyone has implemented the same or getting the logic behind it please let me know.
If you place the elements inside a ScrollView, they will automatically move up when the keyboard is open. You must also have android:windowSoftInputMode="adjustResize" in your AndroidManifest.xml file for the appropriate Activity.

Auto screen orientation is not working one user ser screen orientation android

I have create a custom media player.In which there is a button for landscape and portrait mode. When player opens media player,its all feature works fine.But on click fullscreen button, i set media player to landscape mode. After this button click auto screen orientation is not working, only user can change orientation by clicking button(button to change landscape/portrait). Is there any method to work both auto screen orientation with button(button to change landscape/portrait)?
Thanks.
In your manifest file, you have given permisssion for potrait and landscape, So you have avoid that, instead of that do it in your activity.

Spinner popup dialog not adjusting its width on screen rotation

I am using a Spinner with android:spinnerMode="dropdown". I have also set android:configChanges="orientation|keyboardHidden|screenSize" to prevent my Activity to get recreated. when I am in Landscape mode and click on Spinner it pops below the Spinner and have the width same as Spinner button, now when I rotate the screen to portrait mode the Spinner button width get reduced according to the screen size but the pop up dialog does not reduce its width accordingly.
Portrait mode screen:
LAndscape Mode Screen
I thought of closing the pop up and reopen it on screen orientation but I didn't found any way to close the pop up dialog.
On the onConfigurationChanged() method call to spinner.invalidate();
I had this issue as well. I ended up calling notifyDatasetChanged() on the spinnerAdapter in onConfigurationChanged() and it worked.

Unproportional keyboard on landscape layout Android

I am having EditText in my LinearLayout. When i am typing text in portrait mode keyboard displays fine but when i changed to landscape mode , only i can editext box and a button on right side of it, that looking really bad.
Just i want to look the keyboard same in both modes.
How i achieve that??
Problem is: Keyboard is filling the entire screen am not able to see other views in the screen in landscape when i want to type text..
Thanks
In layout at landscape, you can set android:imeOptions="actionDone|flagNoExtractUi" for edittext

Categories

Resources