Created
November 13, 2017 05:13
-
-
Save engr-erum/a92e6787c295e13e7c00662e749f9eab to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
have made activityA for login | |
activityB that contains tablayout and with 3 fragments. | |
on 3rd tab fragment ----- there is button for logout. | |
Clicking on logout will clear local storage and move user to activityA for login. | |
Right now i used this code | |
private void doLogout() { | |
if(getActivity() != null && getContext() != null) | |
{ | |
SalesforceSDKManager.getInstance().logout(getActivity()); | |
SharedPreferencesManager.getSharedPreferenceInstance(getContext()).setBoolean(getString(R.string.str_login), false); | |
Intent intent = new Intent(getActivity(), LoginActivity.class); | |
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK); | |
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK); | |
startActivity(intent); | |
getActivity().finish(); | |
} | |
} | |
but the issue is its not changing activityA for login .... this code is changing selection of tab3 to tab1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment