Prevent/hide back button in new Activity

  • Replies:0
  • OpenNot stickiedUnanswered
  • Forum posts: 8

Dec 1, 2014, 9:27:40 AM via Website

Hello everybody,
I am so happy for being in here, I am a web developer that is just starting with Android because a business asked me to develop a simple app to avoid papers when their technicians are going to repair computers, TPV, etc.
So I am supposed to develop an Android app that is kinda HTML form, and some options to list the tasks and to send them to OpenERP (this wil be the last part and it doesn't matter at the moment :))

Surprisingly, the major problems I am having are related to UI options, I would like to understand better the LinearLayout I am working on it, but at the moment the main problem I've found is that when I create the new Activity after a succesful login (because Activities are the natural way in Android to have a diferent "page", isn't it?) I show the main menu, but in the top bar (Navigation bar) you always see the back button. If I use "finish()" or delete the history by using flags, you are still able to press that button (and of course of seeing it), but exiting the app instead of going back to the login activity.
What I would like is to hide that option and, maybe, I will enable a logout button, but at the moment I would like to hide the posibility of going back.

By the way, I will posibly use SQLite in order to get offline information and send it to the ERP, but I have been told that Android allows temporal savings just in case you press "home" or use another applications, but even when I didn't implement anything, it already seems to do it, because I can write something in the login Activity, press home, navigate the Internet, and when I go back to my App the written information is there, should I do something or it is just "automatic"?.
Do you think I am crazy for accepting this "job"? I feel so motivated!.

Thank you in advance for any help!!

Recommended articles