Share
Explore

Android Branding Customizations

Branding Customizations

Change the App Name
Update the app’s display name to "MyUserApp" by modifying res/values/strings.xml:
res/values/strings.xml:

<resources>
<string name="app_name">MyUserApp</string>
</resources>
Customize the App Icon
Create a custom app icon using a tool like Figma or download a free icon (e.g., a user silhouette) from a site like Flaticon. The icon should be a .png file, square, at least 512x512 pixels, with a transparent background.
Use Image Asset Studio in Android Studio to generate the icon:
Right-click on app/src/main/res > New > Image Asset.
In Image Asset Studio:
Icon Type: Select "Launcher Icons (Adaptive and Legacy)".
Name: Keep the default ic_launcher.
Foreground Layer: Select Image, choose your custom icon image, and adjust scaling if needed.
Background Layer: Select Color, choose a background color (e.g., #BBDEFB for light blue).
Click Next, then Finish.
Add a Splash Screen
Create a splash screen with a custom image and background color.
Create a Splash Screen Image:
Create or download a simple image (e.g., a logo or the same user icon used for the app icon).
The image should be a .png file, square, 200x200 pixels, with a transparent background.
Save it as splash_icon.png in app/src/main/res/drawable.
Create a Splash Screen Theme: Create or update res/values/styles.xml:

<resources>
<!-- Base application theme -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowBackground">@android:color/white</item>
</style>

<!-- Splash screen theme -->
<style name="SplashTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowBackground">@drawable/splash_background</item>
</style>
</resources>
Create the Splash Background Drawable: Create res/drawable/splash_background.xml:
xml
CollapseWrapCopy
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Background color -->
<item android:drawable="@android:color/white" />
<!-- Center the splash icon -->
<item>
<bitmap
android:src="@drawable/splash_icon"
android:gravity="center" />
</item>
</layer-list>
Update AndroidManifest.xml: Apply the splash screen theme to MainActivity:
xml
CollapseWrapCopy
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:theme="@style/SplashTheme"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Set the Main Theme in MainActivity.kt: Ensure the main theme is set after the splash screen:
kotlin
CollapseWrapCopy
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setTheme(R.style.AppTheme) // Set the main theme after splash
binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)
// Rest of the code...
}
Customize the Theme Colors
Define custom colors for the app’s theme in res/values/colors.xml:
res/values/colors.xml:
xml
CollapseWrapCopy
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#2196F3</color> <!-- A shade of blue -->
<color name="colorPrimaryDark">#1976D2</color> <!-- Darker shade for status bar -->
<color name="colorAccent">#FF4081</color> <!-- Accent color (e.g., for buttons) -->
</resources>

Exported Working Project

A pre-configured project containing all the above files, including the branding customizations, is available for download:
Download Link:
Note: The exported project needs to be updated with the latest files, including the branding customizations. After updating, re-upload the ZIP file to Dropbox and update the link above.

Setup Instructions

To set up the project, you can either use the pre-configured project (recommended) or create it manually:
Option 1: Use the Pre-Configured Project (Recommended):
Download the exported working project from the link above.
Unzip the file to a local directory (e.g., C:\AndroidStudioProjects\UserStorageApp).
Open Android Studio, select "Open an existing project", and choose the unzipped UserStorageApp directory.
Wait for the project to sync (this may take a few minutes).
Build and run the app on an emulator or device (e.g., Pixel 6 Pro API 34).
Test the app:
Verify the app name is "MyUserApp" on the home screen.
Confirm the app icon is your custom image.
Check that the splash screen displays with the branded image and white background.
Ensure the status bar uses the custom blue color.
Add users with name, age, address, and phone number (e.g., "Alice", 25, "123 Main St", "555-1234").
Edit and delete users as needed, verifying the TextView updates correctly.
Option 2: Create the Project Manually:
In Android Studio, create a new project named UserStorageApp with package com.example.userstorageapp. Choose "Empty Activity", language Kotlin, and minimum API 24.
Copy the above User.kt, activity_main.xml, and MainActivity.kt into the appropriate directories:
app/src/main/java/com/example/userstorageapp/User.kt
app/src/main/res/layout/activity_main.xml
app/src/main/java/com/example/userstorageapp/MainActivity.kt
Add the branding files:
res/values/strings.xml
res/values/colors.xml
res/values/styles.xml
res/drawable/splash_background.xml
Add a splash_icon.png image to res/drawable.
Update the Gradle files with the provided content:
Replace the project-level build.gradle.kts.
Replace the app-level build.gradle.kts.
Replace settings.gradle.kts.
Replace gradle/wrapper/gradle-wrapper.properties.
Update AndroidManifest.xml to use the splash theme.
Sync the project (File > Sync Project with Gradle Files).
Build and run the app on an emulator or device (e.g., Pixel 6 Pro API 34).
Test the app as described above.
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.