How to fix AVD emulator grainy, poor resolution display in Android Studio

The AVD emulator on Android Studio display shows all characters at 1:1 resolution grainy. It is difficult to read the text of the app under testing. To overcome this problem: Create the AVD emulator device and set to no borders or skin. Instead of a docked view, select the Window view, so the device opens … Continue reading How to fix AVD emulator grainy, poor resolution display in Android Studio

How to backup Android apps source code from Android Studio or command line

Developers use Android Studio to create applications for Android devices. However, if a source code management system like github is not used, then the source code or code of these apps under development has to be backed up. To do this, there are two ways, one from Android Studio and the other from the command … Continue reading How to backup Android apps source code from Android Studio or command line

Code Snippets Manager or Things List Manager on Linux for app developers or normal users

Working as a developer has it's house-keeping that needs to be done on a regular basis. Developers can save time using code snippets managers whose key feature is to store code snippets with code formatting, tips, tricks, information nuggets, all gained during the course of application development. The same code snippets for an ordinary user … Continue reading Code Snippets Manager or Things List Manager on Linux for app developers or normal users

Experience with Motorola G5S Plus (Sanders) (XT-1084) ROMs and Generic System Image custom ROMs Project Treble

Whatever you do with your device, it’s all at your own risk. The DeviceThe legacy Motorola G5S Plus phone (sanders) is of 2017 and has a lot of juice in it to support Android OS versions up to Android 12. However, sucess is not guaranteed. Since this device is over 5 years old now, Motorola … Continue reading Experience with Motorola G5S Plus (Sanders) (XT-1084) ROMs and Generic System Image custom ROMs Project Treble

How to use addTextChangedListener to change values of other TextViews

At times, the value of one TextView is to be replicated into others as a user types the text. Below illustrates how that can be done. In class MainActivity, variable has been declared for the class as below: TextInputEditText[] array_yourinterest_rate = new TextInputEditText[12]; Within the onCreate method of MainActivity, addTextChangedListener was added to change the … Continue reading How to use addTextChangedListener to change values of other TextViews

How to include other layout xml files in a layout file in Android

Sometimes some layout files can contain too many views making it difficult to manage the layout file later. To overcome this, Android has an <include> tag that allows the inclusion of other layout files into the main layout file (in below illustration, the activity_main.xml file). <include android:id="@+id/b_layout" layout="@layout/activity_main_part_b" /> The above include statement will add … Continue reading How to include other layout xml files in a layout file in Android

How to resolve Dependency ‘androidx.appcompat:appcompat:1.4.1’ requires ‘compileSdkVersion’ to be set to 31 or higher.Compilation target for module ‘:app’ is ‘android-30’

I had the below problem when building code for an older version of Android on Android Studio. Dependency 'androidx.appcompat:appcompat:1.4.1' requires 'compileSdkVersion' to be set to 31 or higher.Compilation target for module ':app' is 'android-30' I was able to solve it by changing the version of appcompat in the dependencies What I had: implementation 'androidx.appcompat:appcompat:1.4.0' I … Continue reading How to resolve Dependency ‘androidx.appcompat:appcompat:1.4.1’ requires ‘compileSdkVersion’ to be set to 31 or higher.Compilation target for module ‘:app’ is ‘android-30’

Replace FindViewByID with ViewBinding in Java on Android

In the gradle.build file for the module, add following code and Sync: buildFeatures { viewBinding true } Above automatically generates binding objects for every layout when the plugin is synced. For activity_main.xml, it will generate ActivityMainBinding class. In MainActivity.java, use inflate method on ActivityMainBinding in onCreate method as shown below: ActivityMainBinding bindMain; bindMain = ActivityMainBinding.inflate(getLayoutInflater()); … Continue reading Replace FindViewByID with ViewBinding in Java on Android