1. Are you ready for the Galaxy S20? Here is everything we know so far!

Disable home button

Discussion in 'Android Development' started by Baweg, Sep 7, 2011.

  1. Baweg

    Baweg Lurker
    Thread Starter

    Hi,
    i need to lock the home button in my app, because it's used in a scientific test and i don't want the test to be interrupted by accidental pressing the home button.

    The only way I found was to set my Activity as Keyguard or Keyguard_Dialog.
    But with this option on, my Views aren't shown in the right order.
    I have a CameraView, an OpenGLView and an OverlayView for displaying Text above the other two Views.
    But with the Keyguard-Option on, the OverlayView always lies under the two other Views, no matter in which order I add them to the ViewGroup.

    Does somebody know why this happens in Keyguard-Mode or does someone know another way to disable the home button?

    Tomorrow I can post some code if needed.

    Regards,
    Baweg
     



    1. Download the Forums for Android™ app!


      Download

       
  2. Baweg

    Baweg Lurker
    Thread Starter

    Hi,
    I solved my problem on my own.
    I found out that you can disable the buttons (like home button) for the whole system on a rooted device.

    FYI:
    Mount system partition as read/write:
    karuppuswamy.com/wordpress/2009/04/25/mounting-system-partition-in-read-write-mode-in-android/

    Edit Files in /system/usr/keylayout/:
    droidforums.net/forum/droid-hacks/23552-disable-search-button.html
     
Loading...
Similar Threads - Disable home button
  1. indieben
    Replies:
    2
    Views:
    338
  2. edent
    Replies:
    2
    Views:
    431
  3. justamel
    Replies:
    3
    Views:
    527
  4. probelogic
    Replies:
    3
    Views:
    706
  5. Viridel
    Replies:
    8
    Views:
    712
  6. jansmigura
    Replies:
    2
    Views:
    1,135
  7. kite
    Replies:
    6
    Views:
    1,290
  8. sinthome
    Replies:
    2
    Views:
    684
  9. Oneechan69
    Replies:
    9
    Views:
    1,912
  10. King Mustard
    Replies:
    2
    Views:
    2,698

Share This Page

Loading...