summaryrefslogtreecommitdiff
path: root/app/src/main/java/se
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2015-04-29 12:47:43 +0200
committerParménides GV <parmegv@sdf.org>2015-04-29 12:47:43 +0200
commit8833acbafe00eb2941cfa052cb679fc2684b5290 (patch)
treeaf1e225d222d0e5df02ec5364b16e9efc1a90b25 /app/src/main/java/se
parentf008b5ec8e1c74968e4a605d2de5423edf91b854 (diff)
Dynamically load user session fragment.
Tests click new button, instead of action bar's. Fixing more bugs...
Diffstat (limited to 'app/src/main/java/se')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/Dashboard.java1
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/userstatus/SessionDialog.java5
2 files changed, 4 insertions, 2 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java
index f541283a..a854ffd4 100644
--- a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java
+++ b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java
@@ -200,6 +200,7 @@ public class Dashboard extends Activity implements ProviderAPIResultReceiver.Rec
provider_name.setText(provider.getDomain());
user_session_fragment = new UserSessionFragment();
+ fragment_manager.replace(R.id.user_session_fragment, user_session_fragment, UserSessionFragment.TAG);
if (provider.hasEIP()) {
fragment_manager.removePreviousFragment(EipFragment.TAG);
diff --git a/app/src/main/java/se/leap/bitmaskclient/userstatus/SessionDialog.java b/app/src/main/java/se/leap/bitmaskclient/userstatus/SessionDialog.java
index f51a6779..18f16301 100644
--- a/app/src/main/java/se/leap/bitmaskclient/userstatus/SessionDialog.java
+++ b/app/src/main/java/se/leap/bitmaskclient/userstatus/SessionDialog.java
@@ -81,7 +81,7 @@ public class SessionDialog extends DialogFragment {
ButterKnife.inject(this, view);
Bundle arguments = getArguments();
- if (arguments != Bundle.EMPTY) {
+ if (arguments != Bundle.EMPTY && arguments != null) {
setUp(arguments);
}
@@ -165,8 +165,9 @@ public class SessionDialog extends DialogFragment {
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
+
try {
- interface_with_Dashboard = (SessionDialogInterface) activity;
+ interface_with_Dashboard = (SessionDialogInterface) activity.getFragmentManager().findFragmentById(R.id.user_session_fragment);;
} catch (ClassCastException e) {
throw new ClassCastException(activity.toString()
+ " must implement LogInDialogListener");