full-screen display:
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
Handling black screens: style
<style name="AppTheme" parent="android:Theme.Translucent.NoTitleBar.Fullscreen"> <!--<item name="android:windowDisablePreview">true</item>-->
<activity android:name=".MainActivity" android:theme="@style/AppTheme" >
m0001Image = (ImageView) findViewById(R.id.image_0001);
// Display of random number image
int array[] = {R.drawable.a1, R.drawable.a2, R.drawable.a3, R.drawable.a4, R.drawable.a5, R.drawable.a6, R.drawable.a7, R.drawable.a8, R.drawable.a9}; Random rnd = new Random(); int index = rnd.nextInt(8); Resources resources = getBaseContext().getResources(); Drawable cur = resources.getDrawable(array[index]); m0001Image.setBackgroundDrawable(cur);
Window theme settings: (This is mainly for Activity settings, using the system automatic theme content)
•android:theme=”@android:style/Theme.Dialog” to display an Activity in dialog mode
•android:theme=”@android:style/Theme.NoTitleBar” to not display the application title bar
•android:theme= ”@android:style/Theme.NoTitleBar.Fullscreen” does not show the application title bar and is full screen
android:theme=”Theme.Light” background is white
android:theme=”Theme.Light.NoTitleBar” white background is not Title bar
android:theme=”Theme.Light.NoTitleBar.Fullscreen” white background, no title bar, full screen
android:theme=”Theme.Black” background black
android:theme=”Theme.Black.NoTitleBar” black background No title bar
• android:theme=”Theme.Black.NoTitleBar.Fullscreen” Black background, no title bar, full screen
• android:theme=”Theme.Wallpaper” Use the system desktop as the application background
• android:theme=”Theme .Wallpaper.NoTitleBar” Use the system desktop as the application background, and no title bar
android:theme=”Theme.Wallpaper.NoTitleBar.Fullscreen” Use the system desktop as the application background, no title bar, full screen
•android:theme=”Translucent” 半透明
•android:theme=”Theme.Translucent.NoTitleBar”
•android:theme=”Theme.Translucent.NoTitleBar.Fullscreen”
•android:theme=”Theme.Panel”
•android:theme=”Theme.Light.Panel”