0

i just want to know how can i disable the notification bar in my mobile without making my activity fullscreen?

Im doing kind of a lockscreen and i dont want the user can drag down the notification bar.

Marco Espinal
  • 41
  • 1
  • 4
  • check: [android - Disable the ability to drag down the notification bar](http://stackoverflow.com/questions/2600622/android-disable-the-ability-to-drag-down-the-notification-bar) – Paresh Mayani Sep 26 '12 at 06:06
  • according to this link (https://groups.google.com/forum/?fromgroups=#!topic/android-developers/GIq2Lao9jX4) - it is **not possible**. – alex Sep 26 '12 at 06:06

3 Answers3

0

add this code in to your AndroidManifest.xml

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

Anand M Joseph
  • 787
  • 7
  • 7
0

public static void CancelNotification(Context ctx, int notifyId) { String ns = Context.NOTIFICATION_SERVICE; NotificationManager nMgr = (NotificationManager) ctx.getSystemService(ns); nMgr.cancel(notifyId); }

Anand M Joseph
  • 787
  • 7
  • 7
0

This sounds like what you need. It invovles creating a transparent window overlapping the status bar and thereby intercepting all touch events to it.

You'll still keep the status bar, the user just won't be able to activate it.

https://stackoverflow.com/a/7630993/455886

Community
  • 1
  • 1
Frank Leigh
  • 5,262
  • 1
  • 15
  • 18