Question

When user start the application, I just want to show a button. User can continiue to use phone . Example : (problem is icon is not clickable)

        android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"

enter image description here

Was it helpful?

Solution

http://developer.android.com/reference/android/Manifest.permission.html#SYSTEM_ALERT_WINDOW

"android.permission.SYSTEM_ALERT_WINDOW" use this permission in main-feast

    windowManager = (WindowManager) getSystemService(WINDOW_SERVICE);

        Button btn = new ImageView(this);

        WindowManager.LayoutParams params = new WindowManager.LayoutParams(
            WindowManager.LayoutParams.WRAP_CONTENT,
            WindowManager.LayoutParams.WRAP_CONTENT,
            WindowManager.LayoutParams.TYPE_PHONE,
            WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
            PixelFormat.TRANSLUCENT);
windowManager.addView(btn, params);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top