Android emulator not showing canvas drawing - android-studio

I have an app that draws animations to the canvas using a SurfaceView subclass. After upgrading to Android Studio 3.0, I started having problems with running the app on the emulator. The app works fine on a real Android device, but the drawing commands are not showing up at all when I run it on the emulator. There are buttons on the activity that show up, but the canvas is just blank and white. I tried the debugging technique here and it all looks fine when I inspect the bitmap, but it just won't show up at all on the emulator. Any ideas on how to resolve this would be fantastic.

I was having a hard time making canvas work in my app, and then I eventually thought it may be the emulator. Hans is right, you can make the canvases show up by tweaking the emulator settings.
Here's the settings that works for me on macOS 10.13.6 (any other combination didn't work):
OpenGL ES renderer: Desktop native OpenGL
OpenGL ES API level: Comptability (OpenGL ES 1.1/2.0)
Note that these fields are in the "Advanced" tabs under Settings.
Also, make sure to restart the emulator after updating the settings.

Here is what worked for me:
In the emulator click on the three dots at the bottom right (=More).
Go to Settings and change the OpenGL ES renderer to Desktop native OpenGL.

Related

Fullscreen keyboard when keyboard is open in landscape mode

I am using an Android plugin for displaying flutter app over other android apps, I did it, and to make a fullscreen keyboard when the keyboard is open in landscape mode, this functionality is also found in WhatsApp in landscape mode, for that I am using a great Plugin, it's working fine, here is a picture: , but in my overlay widget, it's not working, like copy paste is not working too, here is a picture , This is a simple code example reproducing the issue: Github, I am testing using my Huawei P20 Lite.
Any little help will be very welcome, Thank you in advance.

Wear OS Navigation on Android Studio Emulator

I'm using Android Studio to develop an Wear OS standalone application.
Everything is working fine despite the emulator navigation.
When the Watch is started on the following screen I'm not able to simulate the navigation with the mouse (swipe, click, etc nothing works). How can I access the menus or start my app?
Thanks in advance
A cold reboot from the device solved the problem.
It seems the emulator was finally hanging.

Showing All views in the top corner in genymotion Emulator in Android Studio

I have recently installed Android Studio with genymotion emulator based on a youtube tutorial. I'm designing a simple calculator with only one button and two Number(EditText) views . When designing, it is showing different views at different positions.But, when I run it, in the emulator, all the views are appearing in the top corner. How can I resolve this issue?
It sounds like you are using the ConstraintLayout from Android Studio, and you are missing the constraints for your layout.
To fix, go inside the Layout Editor, and click on the infer constraints button (https://developer.android.com/training/constraint-layout/index.html#use-autoconnect-and-infer-constraints) , recompile and deploy to your device and the buttons should be in the correct spot.
I'll also note, you should try the official Android Emulator: https://developer.android.com/studio/run/emulator.html

Android studio emulator displaying screen wrongly

I'm trying to use the emulator in android studio, but the screen is displaying with the wrong size and even position. This is what it looks like.
I've tried changing android device, android operating system, and turning off the border, none of which solved my problems. I'd appreciate help. I'm afraid this problem is causing by DPI aware scaling - I have a high resolution screen.
It's a nice aesthetic touch to see it as an "actual" device, but if it's not going to display properly, it's just an eyesore. Disabling the frame also seems to make the emulator run smoother as well.
In Android Studio 3.14
Tools -> AVD Manager
Actions -> Edit this AVD (Pencil icon)
Uncheck Enable Device Frame

IOS7 translucent keyboard not working

OK, so I've searched the web, Rebuilt my xcode 4.6.3 project in xcode 5, Set my Base SDK to IOS7, Changed my Deployment Target to 7.0, and my keyboard still has the generic gray background.
I've deployed to my IPAD 2 running IOS7, and to the simulator for iPhone Retina (4-inch 64-bit).
Still no luck.
The keyboard auto pops up when I click on a text box. I've tried changing the Appearance (Under Keyboard) in the storyboard from Default to Light, but still no luck.
Where is transparent keyboard setting hiding?

Resources