forked from PojavLauncherTeam/PojavLauncher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSelectAuthFragment.java
More file actions
31 lines (23 loc) · 1.18 KB
/
Copy pathSelectAuthFragment.java
File metadata and controls
31 lines (23 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package net.kdt.pojavlaunch.fragments;
import static net.kdt.pojavlaunch.Tools.hasNoOnlineProfileDialog;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import net.kdt.pojavlaunch.R;
import net.kdt.pojavlaunch.Tools;
public class SelectAuthFragment extends Fragment {
public static final String TAG = "AUTH_SELECT_FRAGMENT";
public SelectAuthFragment(){
super(R.layout.fragment_select_auth_method);
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
Button mMicrosoftButton = view.findViewById(R.id.button_microsoft_authentication);
Button mLocalButton = view.findViewById(R.id.button_local_authentication);
mMicrosoftButton.setOnClickListener(v -> Tools.swapFragment(requireActivity(), MicrosoftLoginFragment.class, MicrosoftLoginFragment.TAG, null));
mLocalButton.setOnClickListener(v -> hasNoOnlineProfileDialog(requireActivity(), () -> Tools.swapFragment(requireActivity(), LocalLoginFragment.class, LocalLoginFragment.TAG, null)));
}
}