From ff427f2863dd2c3c46030968f4d034553f09d0bf Mon Sep 17 00:00:00 2001 From: cyBerta Date: Fri, 23 Jul 2021 23:50:02 +0200 Subject: add click listener to gateway selection button, open the gateway selection fragment --- .../java/se/leap/bitmaskclient/base/fragments/EipFragment.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/src/main/java/se') diff --git a/app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java b/app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java index cc822463..af34b7a5 100644 --- a/app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java +++ b/app/src/main/java/se/leap/bitmaskclient/base/fragments/EipFragment.java @@ -56,6 +56,7 @@ import de.blinkt.openvpn.core.OpenVPNService; import de.blinkt.openvpn.core.VpnStatus; import se.leap.bitmaskclient.R; import se.leap.bitmaskclient.base.FragmentManagerEnhanced; +import se.leap.bitmaskclient.base.MainActivity; import se.leap.bitmaskclient.base.models.Provider; import se.leap.bitmaskclient.base.models.ProviderObservable; import se.leap.bitmaskclient.base.views.LocationButton; @@ -168,6 +169,7 @@ public class EipFragment extends Fragment implements Observer { gatewaysManager = new GatewaysManager(getContext()); + } @Override @@ -189,6 +191,11 @@ public class EipFragment extends Fragment implements Observer { } restoreFromSavedInstance(savedInstanceState); + locationButton.setOnClickListener(v -> { + FragmentManagerEnhanced fragmentManager = new FragmentManagerEnhanced(getActivity().getSupportFragmentManager()); + Fragment fragment = new GatewaySelectionFragment(); + fragmentManager.replace(R.id.main_container, fragment, MainActivity.TAG); + }); return view; } -- cgit v1.2.3