Android provides user experience themes that give apps the look and feel of the underlying operating system. These themes can be applied to your app within the manifest file. By using these built in styles and themes, your app will naturally follow the latest look and feel of Android with each new release.
To make your activity look like a dialog box:
<activity android:theme="@android:style/Theme.Dialog">
To make your activity have a transparent background:
<activity android:theme="@android:style/Theme.Translucent">
To apply your own custom theme defined in /res/values/styles.xml
:
<activity android:theme="@style/CustomTheme">
To apply a theme to your entire app (all activities), add the android:theme
attribute to the <application>
element:
<application android:theme="@style/CustomTheme">