Hello all..

Today I will talk about how to theme your activities the way you want.
Besides that android provides many built in themes that you can use instead of all writing it yourselves.
One of those kind is making the activity appear like a dialog box.

Here is how you do it.
After creating your activity -> go to AndroidManifest.xml. then add this inside the activity tag.


After that the manifest will look something like this.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    <application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@android:style/Theme.Dialog">
        <activity android:name=".ThemeActivityDemo"
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />

The activity for which you have added this theme will appear as a dialog as shown in the figure.

Theme Android activity

Theme Android activity



  1. Pingback: How to place layouts one over another in andriod using addContentView()? | Coderz Heaven

  2. Pingback: Apply Custom Theme for your activity in android. | Coderz Heaven

Leave a Reply

Your email address will not be published. Required fields are marked *




Theme by HermesThemes

Copyright © 2018 CoderzHeaven. All Rights Reserved

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.