diff options
Diffstat (limited to 'app/src/main')
4 files changed, 11 insertions, 11 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"); diff --git a/app/src/main/res/layout/dashboard.xml b/app/src/main/res/layout/dashboard.xml index 30074b6a..95445d63 100644 --- a/app/src/main/res/layout/dashboard.xml +++ b/app/src/main/res/layout/dashboard.xml @@ -18,19 +18,17 @@ android:singleLine="true" android:text="@string/provider_label_none" android:textAppearance="?android:attr/textAppearanceMedium" /> - - <fragment android:name="se.leap.bitmaskclient.userstatus.UserSessionFragment" + + <LinearLayout android:id="@+id/user_session_fragment" - android:tag="user_session_fragment" android:layout_width="match_parent" - android:layout_height="wrap_content"/> + android:layout_height="wrap_content" + android:orientation="horizontal"/> <LinearLayout android:id="@+id/servicesCollection" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="0.11" - android:orientation="vertical" > - </LinearLayout> - + android:orientation="vertical" /> </LinearLayout> diff --git a/app/src/main/res/layout/fragment_user_session.xml b/app/src/main/res/layout/fragment_user_session.xml index 3b7b23c6..2abd6f22 100644 --- a/app/src/main/res/layout/fragment_user_session.xml +++ b/app/src/main/res/layout/fragment_user_session.xml @@ -1,12 +1,12 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:orientation="horizontal" tools:context="se.leap.bitmaskclient.userstatus.UserSessionFragment"> <LinearLayout - android:layout_width="match_parent" + android:layout_width="wrap_content" android:layout_height="wrap_content"> <ProgressBar |