This is a migrated post from my former blog.
This entry explains a way to remove and activity when you navigate to another. So, if you press back button you won’t return to it.
But, is it useful?
Imagine you’re in a
LoginActivity and after success, the apps brings you to the
MainActivity. Then, you press the back button and return to the
LoginActivity. To avoid it, add the next property to your
<activity android:name="com.example.LoginActivity" android:label="@string/app_name" android:noHistory="true">