0

I am showing notifications and on click of it i will show item details but before showing details i am showing password input alert then i have to show the details,i need to clear the background activity screen when alert appears,i have attached the image below,how to clear the background activity when alert appears ,i just need to show the data when password entered is valid else not or is there any other way to show alert on click of notification before showing item data ???

enter image description here

jenil
  • 141
  • 11
  • 1
    many solutions: Show another activity, instead of the detail, for the intent handling... Maybe add another layer to the activity layout and remove it after the password validation... – eduyayo Aug 11 '15 at 08:31
  • how to add other layer ? – jenil Aug 11 '15 at 08:32
  • 1
    lots of samples around http://stackoverflow.com/questions/2629940/how-to-layer-views – eduyayo Aug 11 '15 at 08:35

1 Answers1

1

1) On the popup, you could set all the items in the xml to hidden

2) If the background is a website (genuinely cant tell), you could just hide that layout in the xml again

3) You could start a new activity on notification press with just the login screen on, then use the startActivityForResult to get the values

4) Create a frame layout above your xml, then hide/show that

Ben
  • 1,061
  • 10
  • 23
  • 1
    I feel third point is much reliable to use has i have extras in my activity on click of notification – jenil Aug 11 '15 at 08:40
  • I am going to try it tomorrow ..,i am facing other issue ..,i will update here for sure – jenil Aug 11 '15 at 15:30
  • I have extras in say Scheduling service which i need to pass to IActivity class on click of notification,now if i introduce a new activity how will i retain those extras till IActivity? Can you show me with an example ? – jenil Aug 11 '15 at 15:59
  • but thanks the idea worked out :) that is 4th point hide n show :) – jenil Aug 12 '15 at 10:39
  • http://stackoverflow.com/questions/31993675/sending-extras-on-clcik-of-notification-via-login see this related ,i have to change the design again so – jenil Aug 13 '15 at 16:28