mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-16 16:16:04 -04:00
Merge pull request #937 from Mathias-Boulay/portait_support
- Improved portrait support
This commit is contained in:
commit
c0437cd432
@ -34,28 +34,11 @@ public abstract class BaseLauncherActivity extends BaseActivity {
|
||||
|
||||
public abstract void statusIsLaunching(boolean isLaunching);
|
||||
|
||||
public void mcaccSwitchUser(View view) {
|
||||
showProfileInfo();
|
||||
}
|
||||
|
||||
public void mcaccLogout(View view) {
|
||||
//PojavProfile.reset();
|
||||
finish();
|
||||
}
|
||||
|
||||
private void showProfileInfo() {
|
||||
/*
|
||||
new AlertDialog.Builder(this)
|
||||
.setTitle("Info player")
|
||||
.setMessage(
|
||||
"AccessToken=" + profile.getAccessToken() + "\n" +
|
||||
"ClientID=" + profile.getClientID() + "\n" +
|
||||
"ProfileID=" + profile.getProfileID() + "\n" +
|
||||
"Username=" + profile.getUsername() + "\n" +
|
||||
"Version=" + profile.getVersion()
|
||||
).show();
|
||||
*/
|
||||
}
|
||||
|
||||
public void launcherMenu(View view) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
|
@ -2,6 +2,7 @@ package net.kdt.pojavlaunch;
|
||||
|
||||
import android.animation.ValueAnimator;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Build;
|
||||
@ -52,7 +53,7 @@ public class PojavLauncherActivity extends BaseLauncherActivity
|
||||
private final Button[] Tabs = new Button[4];
|
||||
private View selected;
|
||||
|
||||
private Button switchUsrBtn, logoutBtn; // MineButtons
|
||||
private Button logoutBtn; // MineButtons
|
||||
|
||||
public PojavLauncherActivity() {
|
||||
}
|
||||
@ -185,7 +186,6 @@ public class PojavLauncherActivity extends BaseLauncherActivity
|
||||
|
||||
mLaunchProgress = (ProgressBar) findViewById(R.id.progressDownloadBar);
|
||||
mLaunchTextStatus = (TextView) findViewById(R.id.progressDownloadText);
|
||||
switchUsrBtn = (Button) findViewById(R.id.infoDevBtn);
|
||||
logoutBtn = (Button) findViewById(R.id.switchUserBtn);
|
||||
|
||||
mPlayButton = (Button) findViewById(R.id.launchermainPlayButton);
|
||||
@ -198,7 +198,7 @@ public class PojavLauncherActivity extends BaseLauncherActivity
|
||||
@Override
|
||||
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
|
||||
if(key.equals("hideSidebar")){
|
||||
restoreOldLook(sharedPreferences.getBoolean("hideSidebar",false));
|
||||
changeLookAndFeel(sharedPreferences.getBoolean("hideSidebar",false));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -208,7 +208,7 @@ public class PojavLauncherActivity extends BaseLauncherActivity
|
||||
}
|
||||
}
|
||||
});
|
||||
restoreOldLook(PREF_HIDE_SIDEBAR);
|
||||
changeLookAndFeel(PREF_HIDE_SIDEBAR);
|
||||
ignoreNotch(PREF_IGNORE_NOTCH, PojavLauncherActivity.this);
|
||||
}
|
||||
|
||||
@ -235,7 +235,7 @@ public class PojavLauncherActivity extends BaseLauncherActivity
|
||||
mLaunchProgress.setVisibility(launchVisibility);
|
||||
mLaunchTextStatus.setVisibility(launchVisibility);
|
||||
|
||||
switchUsrBtn.setEnabled(!isLaunching);
|
||||
|
||||
logoutBtn.setEnabled(!isLaunching);
|
||||
mVersionSelector.setEnabled(!isLaunching);
|
||||
canBack = !isLaunching;
|
||||
@ -276,10 +276,11 @@ public class PojavLauncherActivity extends BaseLauncherActivity
|
||||
}, 500);
|
||||
}
|
||||
|
||||
private void restoreOldLook(boolean oldLookState){
|
||||
private void changeLookAndFeel(boolean useOldLook){
|
||||
Guideline guideLine = findViewById(R.id.guidelineLeft);
|
||||
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) guideLine.getLayoutParams();
|
||||
if(oldLookState){
|
||||
|
||||
if(useOldLook || getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT){
|
||||
//UI v1 Style
|
||||
//Hide the sidebar
|
||||
params.guidePercent = 0; // 0%, range: 0 <-> 1
|
||||
|
@ -1,6 +1,7 @@
|
||||
package net.kdt.pojavlaunch;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
@ -31,7 +32,6 @@ import android.widget.CompoundButton;
|
||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.ProgressBar;
|
||||
@ -74,38 +74,25 @@ import org.apache.commons.io.IOUtils;
|
||||
public class PojavLoginActivity extends BaseActivity
|
||||
// MineActivity
|
||||
{
|
||||
private Object mLockStoragePerm = new Object(),
|
||||
mLockSelectJRE = new Object();
|
||||
private final Object mLockStoragePerm = new Object();
|
||||
private final Object mLockSelectJRE = new Object();
|
||||
|
||||
private EditText edit2, edit3;
|
||||
private int REQUEST_STORAGE_REQUEST_CODE = 1;
|
||||
private ProgressBar prb;
|
||||
private final int REQUEST_STORAGE_REQUEST_CODE = 1;
|
||||
private CheckBox sRemember, sOffline;
|
||||
private LinearLayout loginLayout;
|
||||
private Spinner spinnerChgLang;
|
||||
private ImageView imageLogo;
|
||||
private TextView startupTextView;
|
||||
|
||||
private SharedPreferences firstLaunchPrefs;
|
||||
private MinecraftAccount mProfile = null;
|
||||
|
||||
private static boolean isSkipInit = false;
|
||||
|
||||
|
||||
public static final String PREF_IS_INSTALLED_JAVARUNTIME = "isJavaRuntimeInstalled";
|
||||
public static final String PREF_JAVARUNTIME_VER = "javaRuntimeVersion";
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState){
|
||||
super.onCreate(savedInstanceState); // false);
|
||||
super.onCreate(savedInstanceState); // false;
|
||||
|
||||
Tools.updateWindowSize(this);
|
||||
|
||||
ControlData[] specialButtons = ControlData.getSpecialButtons();
|
||||
specialButtons[0].name = getString(R.string.control_keyboard);
|
||||
specialButtons[1].name = getString(R.string.control_toggle);
|
||||
specialButtons[2].name = getString(R.string.control_primary);
|
||||
specialButtons[3].name = getString(R.string.control_secondary);
|
||||
specialButtons[4].name = getString(R.string.control_mouse);
|
||||
|
||||
firstLaunchPrefs = getSharedPreferences("pojav_extract", MODE_PRIVATE);
|
||||
new InitTask().execute(isSkipInit);
|
||||
@ -115,12 +102,8 @@ public class PojavLoginActivity extends BaseActivity
|
||||
private AlertDialog startAle;
|
||||
private ProgressBar progress;
|
||||
|
||||
private ProgressBar progressSpin;
|
||||
private AlertDialog progDlg;
|
||||
|
||||
@Override
|
||||
protected void onPreExecute()
|
||||
{
|
||||
protected void onPreExecute() {
|
||||
LinearLayout startScr = new LinearLayout(PojavLoginActivity.this);
|
||||
LayoutInflater.from(PojavLoginActivity.this).inflate(R.layout.start_screen, startScr);
|
||||
|
||||
@ -147,14 +130,13 @@ public class PojavLoginActivity extends BaseActivity
|
||||
@Override
|
||||
protected Integer doInBackground(Boolean[] params) {
|
||||
// If trigger a quick restart
|
||||
if (params[0] == true) {
|
||||
return 0;
|
||||
}
|
||||
if (params[0]) return 0;
|
||||
|
||||
try {
|
||||
Thread.sleep(2000);
|
||||
} catch (InterruptedException e) {}
|
||||
|
||||
|
||||
publishProgress("visible");
|
||||
|
||||
while (Build.VERSION.SDK_INT >= 23 && !isStorageAllowed()){
|
||||
@ -195,26 +177,14 @@ public class PojavLoginActivity extends BaseActivity
|
||||
@Override
|
||||
protected void onPostExecute(Integer obj) {
|
||||
startAle.dismiss();
|
||||
if (progressSpin != null) progressSpin.setVisibility(View.GONE);
|
||||
if (obj == 0) {
|
||||
if (progDlg != null) progDlg.dismiss();
|
||||
uiInit();
|
||||
}
|
||||
if (obj == 0) uiInit();
|
||||
}
|
||||
}
|
||||
|
||||
private void uiInit() {
|
||||
setContentView(R.layout.launcher_login_v2);
|
||||
setContentView(R.layout.launcher_login_v3);
|
||||
|
||||
loginLayout = findViewById(R.id.login_layout_linear);
|
||||
spinnerChgLang = findViewById(R.id.login_spinner_language);
|
||||
imageLogo = findViewById(R.id.login_image_logo);
|
||||
loginLayout.postDelayed(new Runnable(){
|
||||
@Override
|
||||
public void run(){
|
||||
imageLogo.setTranslationY(loginLayout.getY() - (imageLogo.getHeight() / 2f));
|
||||
}
|
||||
}, 100);
|
||||
Spinner spinnerChgLang = findViewById(R.id.login_spinner_language);
|
||||
|
||||
String defaultLang = LocaleUtils.DEFAULT_LOCALE.getDisplayName();
|
||||
SpannableString defaultLangChar = new SpannableString(defaultLang);
|
||||
@ -270,7 +240,7 @@ public class PojavLoginActivity extends BaseActivity
|
||||
}
|
||||
|
||||
LauncherPreferences.PREF_LANGUAGE = locale.getLanguage();
|
||||
LauncherPreferences.DEFAULT_PREF.edit().putString("language", LauncherPreferences.PREF_LANGUAGE).commit();
|
||||
LauncherPreferences.DEFAULT_PREF.edit().putString("language", LauncherPreferences.PREF_LANGUAGE).apply();
|
||||
|
||||
// Restart to apply language change
|
||||
finish();
|
||||
@ -283,7 +253,6 @@ public class PojavLoginActivity extends BaseActivity
|
||||
|
||||
edit2 = (EditText) findViewById(R.id.login_edit_email);
|
||||
edit3 = (EditText) findViewById(R.id.login_edit_password);
|
||||
if(prb == null) prb = (ProgressBar) findViewById(R.id.launcherAccProgress);
|
||||
|
||||
sRemember = findViewById(R.id.login_switch_remember);
|
||||
sOffline = findViewById(R.id.login_switch_offline);
|
||||
@ -305,10 +274,6 @@ public class PojavLoginActivity extends BaseActivity
|
||||
|
||||
Tools.updateWindowSize(this);
|
||||
|
||||
if (loginLayout != null && imageLogo != null) {
|
||||
imageLogo.setTranslationY(loginLayout.getY() - (imageLogo.getHeight() / 2f));
|
||||
}
|
||||
|
||||
// Clear current profile
|
||||
PojavProfile.setCurrentProfile(this, null);
|
||||
}
|
||||
@ -568,6 +533,7 @@ public class PojavLoginActivity extends BaseActivity
|
||||
}
|
||||
final String tarEntryName = tarEntry.getName();
|
||||
runOnUiThread(new Runnable(){
|
||||
@SuppressLint("StringFormatInvalid")
|
||||
@Override
|
||||
public void run() {
|
||||
startupTextView.setText(getString(R.string.global_unpacking, tarEntryName));
|
||||
@ -675,12 +641,8 @@ public class PojavLoginActivity extends BaseActivity
|
||||
|
||||
final Dialog accountDialog = new Dialog(PojavLoginActivity.this);
|
||||
|
||||
int xScreen = PojavLoginActivity.this.getResources().getDisplayMetrics().widthPixels;
|
||||
int yScreen = PojavLoginActivity.this.getResources().getDisplayMetrics().heightPixels;
|
||||
|
||||
accountDialog.setContentView(R.layout.simple_account_list_holder);
|
||||
|
||||
|
||||
LinearLayout accountListLayout = accountDialog.findViewById(R.id.accountListLayout);
|
||||
LayoutInflater inflater = (LayoutInflater) this.getSystemService(LAYOUT_INFLATER_SERVICE);
|
||||
|
||||
@ -764,12 +726,14 @@ public class PojavLoginActivity extends BaseActivity
|
||||
public void onClick(DialogInterface p1, int p2) {
|
||||
new InvalidateTokenTask(PojavLoginActivity.this).execute(selectedAccName);
|
||||
accountListLayout.removeViewsInLayout(accountIndex_final, 1);
|
||||
//Resize the window
|
||||
|
||||
if (accountListLayout.getChildCount() == 0) {
|
||||
accountDialog.dismiss(); //No need to keep it, since there is no account
|
||||
return;
|
||||
}
|
||||
accountDialog.getWindow().setLayout((int)(xScreen*0.4),(int) Math.min((yScreen*0.8), (73 + accountListLayout.getChildCount()*55)*(PojavLoginActivity.this.getResources().getDisplayMetrics().densityDpi/160f) ));
|
||||
//Refreshes the layout with the same settings so it take the missing child into account.
|
||||
accountListLayout.setLayoutParams(accountListLayout.getLayoutParams());
|
||||
|
||||
}
|
||||
});
|
||||
builder2.setNegativeButton(android.R.string.cancel, null);
|
||||
@ -778,9 +742,6 @@ public class PojavLoginActivity extends BaseActivity
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//The value 73 and 56 are dp numbers, converted into px in order to resize the layout.
|
||||
accountDialog.getWindow().setLayout((int)(xScreen*0.4),(int)Math.min((yScreen*0.8), (73 + accountListLayout.getChildCount()*56)*(PojavLoginActivity.this.getResources().getDisplayMetrics().densityDpi/160f) ));
|
||||
accountDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||
accountDialog.show();
|
||||
}
|
||||
@ -805,7 +766,7 @@ public class PojavLoginActivity extends BaseActivity
|
||||
return null;
|
||||
}
|
||||
|
||||
private MinecraftAccount mProfile = null;
|
||||
|
||||
public void loginMC(final View v)
|
||||
{
|
||||
|
||||
@ -813,8 +774,10 @@ public class PojavLoginActivity extends BaseActivity
|
||||
mProfile = loginOffline();
|
||||
playProfile(false);
|
||||
} else {
|
||||
ProgressBar prb = findViewById(R.id.launcherAccProgress);
|
||||
new LoginTask().setLoginListener(new LoginListener(){
|
||||
|
||||
|
||||
@Override
|
||||
public void onBeforeLogin() {
|
||||
v.setEnabled(false);
|
||||
|
@ -1,143 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="@drawable/sign_in_background"
|
||||
android:scaleType="centerCrop"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent">
|
||||
|
||||
|
||||
|
||||
<Spinner
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/login_spinner_language"/>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:padding="25dp"
|
||||
android:background="#272727"
|
||||
android:layout_gravity="center"
|
||||
android:id="@+id/login_layout_linear">
|
||||
|
||||
<TextView
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/login_online_username_hint"
|
||||
android:layout_gravity="start"/>
|
||||
|
||||
<com.kdt.mcgui.MineEditText
|
||||
android:imeOptions="flagNoExtractUi"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/login_edit_email"
|
||||
android:inputType="textEmailAddress"
|
||||
android:layout_marginBottom="5dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_gravity="start"
|
||||
android:text="@string/login_online_password_hint"/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="-10dp"
|
||||
app:passwordToggleEnabled="true"
|
||||
app:passwordToggleTint="@android:color/white"
|
||||
>
|
||||
|
||||
<com.kdt.mcgui.MineEditText
|
||||
android:imeOptions="flagNoExtractUi"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:id="@+id/login_edit_password"
|
||||
android:inputType="textPassword"
|
||||
/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
|
||||
<CheckBox
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_gravity="start"
|
||||
android:text="@string/login_online_check_keeplogin"
|
||||
android:id="@+id/login_switch_remember"/>
|
||||
|
||||
<CheckBox
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_gravity="start"
|
||||
android:text="@string/login_offline_label"
|
||||
android:id="@+id/login_switch_offline"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_height="42dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:gravity="bottom|center_vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="210dp"
|
||||
android:layout_marginRight="10dp">
|
||||
|
||||
<com.kdt.mcgui.MineButton
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/mine_button_background"
|
||||
android:text="@string/login_online_login_label"
|
||||
android:textColor="@android:color/white"
|
||||
android:onClick="loginMC"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<ProgressBar
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#88000000"
|
||||
android:id="@+id/launcherAccProgress"
|
||||
android:visibility="gone"
|
||||
android:layout_centerInParent="true"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.kdt.mcgui.MineButton
|
||||
android:layout_width="210dip"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/mine_button_background"
|
||||
android:text="@string/login_select_account"
|
||||
android:textColor="@android:color/white"
|
||||
android:onClick="loginSavedAcc"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.kdt.mcgui.MineButton
|
||||
android:layout_height="42dp"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@drawable/mine_button_background"
|
||||
android:text="@string/login_microsoft"
|
||||
android:textColor="@android:color/white"
|
||||
android:onClick="loginMicrosoft"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_height="48dp"
|
||||
android:layout_width="300dp"
|
||||
android:src="@drawable/logo"
|
||||
android:id="@+id/login_image_logo"
|
||||
android:layout_gravity="center_horizontal"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
188
app_pojavlauncher/src/main/res/layout/launcher_login_v3.xml
Normal file
188
app_pojavlauncher/src/main/res/layout/launcher_login_v3.xml
Normal file
@ -0,0 +1,188 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/transparent">
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guidelineLeft"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:elevation="-10dp"
|
||||
android:src="@drawable/sign_in_background"
|
||||
android:scaleType="centerCrop"
|
||||
/>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/login_spinner_language"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/login_image_logo"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/logo"
|
||||
|
||||
app:layout_constraintBottom_toTopOf="@+id/login_menu"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guidelineLeft"
|
||||
app:layout_constraintStart_toStartOf="@+id/guidelineLeft"
|
||||
app:layout_constraintTop_toTopOf="@+id/login_menu" />
|
||||
|
||||
<View
|
||||
android:id="@+id/login_menu"
|
||||
android:layout_width="0dp"
|
||||
app:layout_constraintWidth_max="480dp"
|
||||
android:layout_height="300dp"
|
||||
|
||||
android:background="#272727"
|
||||
android:translationZ="-1dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/login_online_username_hint"
|
||||
app:layout_constraintBottom_toTopOf="@+id/login_edit_email"
|
||||
app:layout_constraintStart_toStartOf="@+id/login_edit_email" />
|
||||
|
||||
<com.kdt.mcgui.MineEditText
|
||||
android:id="@+id/login_edit_email"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_margin="25dp"
|
||||
android:imeOptions="flagNoExtractUi"
|
||||
android:inputType="textEmailAddress"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/login_menu"
|
||||
app:layout_constraintEnd_toEndOf="@+id/login_menu"
|
||||
app:layout_constraintHorizontal_bias="0.48"
|
||||
app:layout_constraintStart_toStartOf="@+id/login_menu"
|
||||
app:layout_constraintTop_toTopOf="@+id/login_menu"
|
||||
app:layout_constraintVertical_bias="0.088" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/login_online_password_hint"
|
||||
app:layout_constraintBottom_toTopOf="@+id/textInputLayout"
|
||||
app:layout_constraintStart_toStartOf="@+id/textInputLayout"
|
||||
app:layout_constraintTop_toTopOf="@+id/textInputLayout" />
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/textInputLayout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
|
||||
app:layout_constraintBottom_toBottomOf="@+id/login_menu"
|
||||
app:layout_constraintEnd_toEndOf="@+id/login_edit_email"
|
||||
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="@+id/login_edit_email"
|
||||
app:layout_constraintTop_toBottomOf="@+id/login_edit_email"
|
||||
app:layout_constraintVertical_bias="0.08"
|
||||
app:passwordToggleEnabled="true"
|
||||
app:passwordToggleTint="@android:color/white">
|
||||
|
||||
<com.kdt.mcgui.MineEditText
|
||||
android:id="@+id/login_edit_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:imeOptions="flagNoExtractUi"
|
||||
android:inputType="textPassword" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/login_switch_remember"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start"
|
||||
android:text="@string/login_online_check_keeplogin"
|
||||
app:layout_constraintStart_toStartOf="@+id/textInputLayout"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textInputLayout" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/login_switch_offline"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start"
|
||||
android:text="@string/login_offline_label"
|
||||
app:layout_constraintStart_toStartOf="@+id/login_switch_remember"
|
||||
app:layout_constraintTop_toBottomOf="@+id/login_switch_remember" />
|
||||
|
||||
<com.kdt.mcgui.MineButton
|
||||
android:id="@+id/mineButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:background="@drawable/mine_button_background"
|
||||
android:onClick="loginMC"
|
||||
android:text="@string/login_online_login_label"
|
||||
|
||||
android:textColor="@android:color/white"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guidelineLeft"
|
||||
app:layout_constraintStart_toStartOf="@+id/login_switch_offline"
|
||||
app:layout_constraintTop_toBottomOf="@+id/login_switch_offline" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/launcherAccProgress"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="#88000000"
|
||||
android:elevation="1dp"
|
||||
android:translationZ="1dp"
|
||||
android:visibility="invisible"
|
||||
|
||||
app:layout_constraintTop_toTopOf="@+id/mineButton"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/mineButton"
|
||||
app:layout_constraintEnd_toEndOf="@+id/mineButton"
|
||||
app:layout_constraintStart_toStartOf="@+id/mineButton"/>
|
||||
|
||||
<com.kdt.mcgui.MineButton
|
||||
android:id="@+id/mineButton2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="42dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="@drawable/mine_button_background"
|
||||
android:onClick="loginSavedAcc"
|
||||
android:text="@string/login_select_account"
|
||||
|
||||
android:textColor="@android:color/white"
|
||||
|
||||
app:layout_constraintBottom_toBottomOf="@+id/mineButton"
|
||||
app:layout_constraintEnd_toEndOf="@+id/textInputLayout"
|
||||
app:layout_constraintStart_toStartOf="@+id/guidelineLeft"
|
||||
app:layout_constraintTop_toTopOf="@+id/mineButton" />
|
||||
|
||||
<com.kdt.mcgui.MineButton
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="42dp"
|
||||
android:background="@drawable/mine_button_background"
|
||||
android:onClick="loginMicrosoft"
|
||||
android:text="@string/login_microsoft"
|
||||
android:textColor="@android:color/white"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/login_menu"
|
||||
app:layout_constraintEnd_toEndOf="@+id/mineButton2"
|
||||
app:layout_constraintStart_toStartOf="@+id/mineButton"
|
||||
app:layout_constraintTop_toBottomOf="@+id/mineButton" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -205,20 +205,6 @@
|
||||
app:layout_constraintStart_toStartOf="@+id/guidelineLeft"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lMTVVer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:gravity="center"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/main_version"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/guidelineBottom2"
|
||||
app:layout_constraintStart_toStartOf="@+id/guidelineLeft"
|
||||
app:layout_constraintTop_toTopOf="@+id/guidelineBottom" />
|
||||
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/launchermain_spinner_version"
|
||||
@ -226,15 +212,19 @@
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/guidelineBottom2"
|
||||
app:layout_constraintEnd_toStartOf="@+id/launchermainPlayButton"
|
||||
app:layout_constraintStart_toEndOf="@+id/lMTVVer"
|
||||
app:layout_constraintStart_toStartOf="@+id/guidelineLeft"
|
||||
app:layout_constraintTop_toTopOf="@+id/guidelineBottom" />
|
||||
|
||||
<Button
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:onClick="launcherMenu"
|
||||
android:text="@string/main_options"
|
||||
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/launchermainPlayButton"
|
||||
app:layout_constraintStart_toStartOf="@+id/guidelineLeft"
|
||||
@ -259,8 +249,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/launchermain_text_welcome"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/main_welcome"
|
||||
android:textSize="12sp"
|
||||
@ -285,22 +275,13 @@
|
||||
app:layout_constraintStart_toEndOf="@+id/launchermainPlayButton"
|
||||
app:layout_constraintTop_toBottomOf="@+id/launchermain_text_welcome" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/infoDevBtn"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:onClick="mcaccSwitchUser"
|
||||
android:text="@string/main_infodev"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/guidelineRight"
|
||||
app:layout_constraintStart_toEndOf="@+id/launchermainPlayButton"
|
||||
app:layout_constraintTop_toTopOf="@+id/guidelineBottom2" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/switchUserBtn"
|
||||
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:onClick="mcaccLogout"
|
||||
@ -308,7 +289,7 @@
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@+id/guidelineRight"
|
||||
app:layout_constraintStart_toEndOf="@+id/launchermainPlayButton"
|
||||
app:layout_constraintTop_toTopOf="@+id/guidelineBottom2" />
|
||||
|
||||
<View
|
||||
|
@ -3,19 +3,21 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="#424242"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TextViewTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="20dp"
|
||||
|
||||
android:paddingTop="15dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:textSize="26sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@android:color/white"
|
||||
android:gravity="center"
|
||||
|
||||
android:text="@string/login_select_account"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -25,8 +27,10 @@
|
||||
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/accountScrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintHeight_max="200dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
@ -36,7 +40,8 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/accountListLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="100dp"
|
||||
android:maxHeight="100dp"
|
||||
android:layout_marginStart="0dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/accountitem_text_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:gravity="center_vertical"
|
||||
|
Loading…
x
Reference in New Issue
Block a user