I have a smartwatch with round display and it is running Android 4.4.2. My app is working fine on smartwatch with square display running Android 4.2.2 but the UI gets cropped in round display. It seems all the APIs for round screens are for Android wear. I would like to adjust the UI of my app to fit on round screens but do not want to create a separate Android Wear project for it.
Is there a way to use the Android wear APIs while developing app for devices running regular Android?
Thanks in advance.
Related
I've added an icon to my app via the built-in Image Asset Studio in Android Studio.
Made a png foreground and then color as a background.
On a Samsung device, the icon renders perfectly.
Then when I install the app on a Huawei P20 with android 10. The icon is rendered like this:
I think the Huawei UI isn't using the adaptive icon, but uses the legacy icon and adjusts it into its custom app shape UI and therefore zooms in.
Are there some extra steps I need to do for having a good rendering app icon?
Thanks.
Have you tried Adaptive Icons?
Instead of using a single image use the combination of 2 images for Foreground and background.
You can take the idea from android's default app icon, it's also adaptive.
I had the same problem with Huawei P20 Lite (Android 8.0.0) when I tried to install an app from Android studio.
There's nothing we can do to fix it.
But the icon will look like it should after a reboot.
Also, if you'll build a release version of your app and install it via adb install the icon will look like you expect.
Android added a way to deal with devices that have a notch/cutout at the top of the screen. (See Android and Xamarin.Android.) But as far as I can tell, Android automatically takes care of lowering the views so that they aren't obscured by the notch, so why do we need this new addition?
I tested my Android app on the emulator of a device with a notch and the app automatically goes below the notch without the need to specify layoutInDisplayCutoutMode as LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER.
So my question is, when would I need to use LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER?
In Xamarin that would be:
Window.Attributes.LayoutInDisplayCutoutMode = Android.Views.LayoutInDisplayCutoutMode.Never;
I'm running this on the Android Emulator through Visual Studio on a Windows computer. The emulator is emulating a Pixel 3 XL with Android Pie 9.0 (API 28). The app is an Android app created with Xamarin.Forms.
When you are creating a view, which uses full screen for showing content at that time notch display sometime hide/cut your top content.
To prevent this android provides support for this above android pie.
Refer to this document.
https://source.android.com/devices/tech/display/display-cutouts
Can we based on Android Studio Emulators for different display screens create the App? Can we trust Android Studio Emulators ?
I mean for example whatever that's displayed on the Nexus 7 Emulator, would be exactly the same as it is really displayed on the real Tablet itself.
Yes, we can.
I've compared lots of emulators vs real devices - they are almost identical
Android Emulators give you a basic idea of different layout. Padding and pixel adjustment may be different in real device due to difference between system screen resolution and real device screen resolution.
The Android Emulator is built hand-in-hand with the Android platform for the Android SDK. Moreover, the latest Android Emulator system images (API 24+) 100% pass the Android Compatibility Definition, so that you can have even more assurance that app behavior will be exactly the same between the Android Emulator and a physical Android device.
I wanted to develop an app which basically records a screen video. It is easily possible in Lollipop 5.0 using MediaProjectionManager. How can i do it in kitkat and lower versions of android ?
I created a small app using following this tutorial.
App runs fine on Android but after running on 2 mobiles both running Android 4.1.2, I find that in one mobile the layout was broken. I mean button borders are broken.
Any suggestions on what is going wrong here ?
Using latest ionic framework and cordova.
This mostly happens because different mobile screen size.
You should create different layout files for different screen sizes
For more information go here:
http://developer.android.com/training/multiscreen/screensizes.html