1

I am planning to create a screen crack app

I have managed to display a cracked screen over the current screen.

<activity
            android:label="@string/app_name"
            android:name=".LNActivity" 
               android:theme="@style/Theme.Transparent"   />



<?xml version="1.0" encoding="utf-8"?>
<resources>
  <style name="Theme.Transparent" parent="android:Theme">
    <item name="android:windowIsTranslucent">true</item>
    <item name="android:windowBackground">@android:color/transparent</item>
    <item name="android:windowContentOverlay">@null</item>
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowIsFloating">true</item>
    <item name="android:backgroundDimEnabled">false</item>
  </style>
</resources>


getWindow().addFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL);
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.main);

But it is not displaying above all activities like home,app menu,other apps.

Maddy
  • 83
  • 1
  • 13
  • 1
    This question is answered here.. http://stackoverflow.com/questions/2176922/how-to-create-transparent-activity-in-android – atomicDroid Jan 19 '12 at 13:50
  • I want to show that crack screen on all screens. When I click back button or home it vanished.I dont want to be like that. – Maddy Jan 19 '12 at 13:54
  • You cannot have your app displayed over other activities while those other activities are active. You can create a transparent activity so that when your app is run the user will see what's underneath. However if a user presses "home" button, your activity will be removed from the screen and the main home screen will be shown. – Aleks G Jan 19 '12 at 13:56
  • [This post](http://stackoverflow.com/questions/3898876/how-to-disable-the-home-key) might help you with disabling home key. – Reed Jan 19 '12 at 17:58
  • Ya, I want overlay only.I have seen app like "crack your screen" and "better cracked" working as overlay on top of all pages like home, contacts..... – Maddy Jan 20 '12 at 04:57

0 Answers0