Just sharing the link to a “cheat sheet” that I found: Android Cheatsheet for Graphic Designers I think that this resource should have been said to be for developers too, because developers need to know about dimensions of graphics in the Android apps they develop.
We’re not going to use ViewOverlay here. We’ll use Dialog instead. The overlay does not show on button click. What I did was let the overlay appear when the activity is loaded. First, create the XML file for the contents of that dialog overlay. \app\src\main\res\layout\popup_content.xml
<?xml version="1.0" encoding="utf-8"?>
android:text="This is your dialog with transparent background."
Then add the following code into your activity’s Java […]
Here are the recommended background image sizes in pixels for Android app development: xxxhdpi: 1280×1920 px xxhdpi: 960×1600 px xhdpi: 640×960 px hdpi: 480×800 px mdpi: 320×480 px ldpi: 240×320 px …as suggested in this StackOverflow page: Android: Background Image Size (in Pixel) which Support All Devices
If you use ImageView in your android app layout and you get that unwanted padding around the image, here’s an Android XML attribute that helped me solved the layout issue:
Add android:adjustViewBounds=”true” attribute to your ImageView XML tag and you’ll probably see the unwanted padding go away. According to the ImageView docs: android:adjustViewBounds Set […]
As a mobile app developer, we need to consider various screen sizes for a wide range of Android devices. Here’s a quick note of recommended image sizes for Android app icons: 36×36 for low-density (LDPI) 48×48 for medium-density (MDPI) 72×72 for high-density (HDPI) 96×96 for extra high-density (XHDPI) 180×180 for extra extra high-density (XXHDPI) 192×192 […]
This will probably be one of the Android code snippets that I will need to go back to from time to time. I’m sharing the codes we need to show an Android confirm dialog to prompt the user to click “yes” or “no”, or in my case, “OK” or “Cancel”. The following code for Android […]
You might feel more comfortable with a dark theme in Android Studio, but the default theme is light in color. I’m one of the developers who always code in dark screens since it’s less tiring to the eyes. If you’re like me who prefers dark themes while coding, then I’ll show you how to change […]
I’m trying to learn how to build a simple app in Android just to satisfy my curiosity. This will also be a very handy skill because I use Android phones often, and there are times that the apps I download from Google Play Store lack features that I need. This will be a very simple […]