Android Question Lock / Unlock Screen after Activity is started

Discussion in 'Android Questions' started by rwblinn, Jan 5, 2016.

  1. rwblinn

    rwblinn Well-Known Member Licensed User

    Hi,

    a togglebutton, placed at the bottom of the screen, is used to start an activity. The activity is stopped by pressing the togglebutton again.

    Issue: If, after Starting the activity, the device is put in the pocket it can happen that the togglebutton is pressed again without purpose and the activity is stopped

    Question: Is there a way to lock the togglebutton after start and unlock via another way to then stop the activity?
    An option could be to use a menu, but would like to stick to (visual) buttons to keep simple for usage.

    Any hints appreciated.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Might be better to use a regular button and handle its LongClick event.
     
    rwblinn likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice