summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap/bitmaskclient/userstatus
diff options
context:
space:
mode:
authorFup Duck <fupduck@sacknagel.com>2018-01-08 15:49:34 +0100
committerFup Duck <fupduck@sacknagel.com>2018-01-08 15:49:34 +0100
commitbd99fc61a2e8217c41b70c6f2ff0df87e7008ea0 (patch)
tree3bff12a513159483debedcb377015184aceb2e45 /app/src/main/java/se/leap/bitmaskclient/userstatus
parent4f7200c55032d17c9bdbdb30cfd83dc757c63fe7 (diff)
seperate accountList and settingsList in drawer
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/userstatus')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/userstatus/SessionDialog.java7
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/userstatus/UserStatusFragment.java4
2 files changed, 6 insertions, 5 deletions
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 440b02fa..1256c619 100644
--- a/app/src/main/java/se/leap/bitmaskclient/userstatus/SessionDialog.java
+++ b/app/src/main/java/se/leap/bitmaskclient/userstatus/SessionDialog.java
@@ -16,11 +16,12 @@
*/
package se.leap.bitmaskclient.userstatus;
-import android.app.Activity;
import android.app.AlertDialog;
+import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
+import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;
@@ -164,11 +165,11 @@ public class SessionDialog extends DialogFragment {
SessionDialogInterface interface_with_Dashboard;
@Override
- public void onAttach(Activity activity) {
+ public void onAttach(Context activity) {
super.onAttach(activity);
try {
- interface_with_Dashboard = (SessionDialogInterface) activity.getFragmentManager().findFragmentById(R.id.user_status_fragment);;
+ interface_with_Dashboard = (SessionDialogInterface) ((AppCompatActivity) activity).getSupportFragmentManager().getFragments().get(0);
} catch (ClassCastException e) {
throw new ClassCastException(activity.toString()
+ " must implement LogInDialogListener");
diff --git a/app/src/main/java/se/leap/bitmaskclient/userstatus/UserStatusFragment.java b/app/src/main/java/se/leap/bitmaskclient/userstatus/UserStatusFragment.java
index a991e88e..a6439a16 100644
--- a/app/src/main/java/se/leap/bitmaskclient/userstatus/UserStatusFragment.java
+++ b/app/src/main/java/se/leap/bitmaskclient/userstatus/UserStatusFragment.java
@@ -1,6 +1,6 @@
package se.leap.bitmaskclient.userstatus;
-import android.app.Activity;
+import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.app.Fragment;
@@ -72,7 +72,7 @@ public class UserStatusFragment extends Fragment implements Observer, SessionDia
}
@Override
- public void onAttach(Activity activity) {
+ public void onAttach(Context activity) {
super.onAttach(activity);
providerAPI_result_receiver = new ProviderAPIResultReceiver(new Handler(), Dashboard.dashboardReceiver);
}