Android Studio not saving Device for Preview layout on exit - android

Hey all I've been looking far and wide trying to figure out how to save my preview setting's in Android Studio version:
Electric Eel 2022.1.1 Canary 3
Build #AI-213.7172.25.2211.8624637, built on May 20, 2022
Every time I change the Device For Preview to what I am always using (Lenovo Tablet API 29 in the example here):
And also change the orientation to Landscape:
Which should always stay looking like this for not just this layout but all others I have as well:
Then close Android Studio and open it again its right back to what it seems to always default to even though I changed it....
Here is a demo of me opening the Android Studies once to set the settings I am wanting it to save, saving it then exiting. I then start Android Studio again to show that it does not have my saved Device for Preview nor the orientation.
My device is setup correctly to mirror what I have chosen in the Device for Preview:
So, what am I doing wrong?

I think that is just a preview option and it doesn't save your app's orientation. But try this code and I hope it will help you.
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
You need to add this code in each relevant java activity of its layout.

Related

Android Studio Bumblebee 2021.1.1 Patch 2 new Device Manager

Hey guys I just updated Android Studio, I am glad that they finally fixed the bug where you could not open up the Device Manager. However they changed the look of it and it now comes inside AS or as a much much larger window (see my screenshot).
Is there a way to make it look like it was before? So just the Device with its frame and not that huge window around it? Also Crtl+M doesnt work and Crtl+Upkey/Downkey do not change the size of the emulator like it used to.
Go to Preferences of Android Studio
Search for emulator, or navigate to tools -> Emulator
Uncheck the Launch in a tool window

How to enable device frame in android studio?

I am using Android Studio version 2.2.3 and since I have installed it There is no device frame included when we have a preview(as shown in the image). I have tried a lot but there seems to be no option to include a device frame.
Just lost the device skin after updating Android Emulator.
I fixed it by manually editing the AVD config.ini and adding:
skin.name=pixel_4
skin.path=D:\sdk\skins\pixel_4
Posting this so I can find the answer faster next time it happens and maybe help others, it seems it is still a valid bug even with Android Studio Chipmunk
There is no device frame included from the newer version by the Android Studio itself. But, you can still use a skin while using AVD.
DEVICE FRAME CAN BE VIEW BY
1- Click on designer preview window
2 - press F button from your keyboard
this will enable and disable the designer preview device frame every time you press F button from your keyboard.

Android Virtual Devices (AVD) resolution not correct after downloading Android 5.1.1 for SDK

The story is that I developed an Android program with Android 4.4.2. But some problems was found after installing the program to a device with Android 5.1.1. So I tried to download Android 5.1.1 for my SDK to debug the problem. Then the AVD I kept on using becomes like a mess no matter I changed to different configuration (see picture 1). My AVD configuration is as picture 2.
Hope someone could help... Thank you so much!
Picture 1
Picture 2
Got a temporary way to solve it and don't know if it is correct.
Set the skin to "no skin".
There is another problem happened now. The control bar of that window shows out of the screen. It makes the window cannot be moved. Anyway, I can continue my development job in this way...

Preview of widget not showing correct image after update

I have an app that has an widget preview image. I recently updated this image on the app, but in a device with Lollipop (5.0) version of android, the preview image of the widget shows the old image (the one I replaced). The same doesn't occur in devices without Lollipop.
I turned the resources folder upside down searching for the old image, but it is correctly updated in all the places (actually, it is only in one folder, as I have only one image of the preview).
Just to give more info, I'm using Android Studio 1.0-rc1, and this problem only occurs in my Nexus 4 with lollipop (5.0) running on it.
I tested in some emulators with Lollipop, and the same happened.
It's important to highlight that if I never installed any previous version of the app (with the old widget preview image), when I install the new version the preview image appears to be correct.
Is anyone having the same problem, or knows how to solve this?
Thanks.
I had the same problem. I managed to work around it (on Nexus 5) by going to the settings of the launcher app (Settings -> Apps -> Google App) and deleting the cache.
I also had this same issue and the answer by #spookypeanut put me on the right track.
My phone is running CyanogenMod so I had to go to app Launcher3 (com.cyanogenmod.trebuchet), clear cache and force stop it. After it reloaded all the previews updated.

Android CWAC-Camera rotation issues after upgrading to 0.6.3

I am using the CWAC-Camera library within my Android application. Recently it was upgraded to v0.6.3, but since then I have noticed that rotation of images doesn't seem to work as expected.
I am starting a CameraFragment within an Activity that is locked to landscape orientation, and have observed the rotation is not correct for an output image with or without setting CameraFragment.lockToLandscape(true). I have managed to reproduce this in the demo application when the "Lock to Landscape" is checked (steps and a screenshot provided below). I have been testing on a Nexus 4 and Nexus 5 both running Android 4.4.2.
Has anyone else experienced this issue since upgrading to v0.6? Previously we were using 0.5.4 which didn't seem to have this issue, but looking at the release log I see there has been a lot of changes to EXIF data/rotation etc.
Steps to reproduce in demo app:
Open application, hold phone portrait or landscape
Select "Lock to Landscape" and "Single shot mode" from menu
Turn phone landscape (if started off portrait in step 1)
Capture image, appears rotated as per screenshot.
Cheers
For the record, this bug was fixed in v0.6.4 of the library.

Categories

Resources