Have RegisterProgressFragment finished via noHistory Manifest option

rather than hackish finish with Fragment. Improve comments
This commit is contained in:
Lance Johnson 2013-04-09 23:38:00 -05:00
parent 0d71c8ac59
commit a77f22da10
3 changed files with 6 additions and 4 deletions

View file

@ -36,6 +36,7 @@
<activity
android:name=".activity.RegisterProgress"
android:noHistory="true"
android:label="@string/get_started" />
<activity

View file

@ -8,11 +8,15 @@ import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.newsblur.R;
import com.newsblur.fragment.RegisterProgressFragment;
/**
* Show progress screen while registering request is being processed. This
* Activity doesn't extend NbFragmentActivity because it is one of the few
* Activities that will be shown while the user is still logged out.
*/
public class RegisterProgress extends SherlockFragmentActivity {
private FragmentManager fragmentManager;
private String currentTag = "fragment";
private String TAG = "RegisterProgressActivity";
@Override
protected void onCreate(Bundle bundle) {

View file

@ -79,7 +79,6 @@ public class RegisterProgressFragment extends Fragment {
public void onClick(View arg0) {
Intent i = new Intent(getActivity(), AddSites.class);
startActivity(i);
getActivity().finish();
}
});
@ -112,12 +111,10 @@ public class RegisterProgressFragment extends Fragment {
i.putExtra("username", username);
i.putExtra("password", password);
startActivity(i);
getActivity().finish();
}
} else {
Toast.makeText(getActivity(), extractErrorMessage(response), Toast.LENGTH_LONG).show();
startActivity(new Intent(getActivity(), Login.class));
getActivity().finish();
}
}