- Switched from v2 to v3, cleaned up a bit.

This commit is contained in:
SerpentSpirale 2021-02-21 21:35:33 +01:00
parent 2eb88ff0ba
commit 9fbc0ee108
2 changed files with 1 additions and 156 deletions

View File

@ -205,17 +205,9 @@ public class PojavLoginActivity extends BaseActivity
}
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);
String defaultLang = LocaleUtils.DEFAULT_LOCALE.getDisplayName();
SpannableString defaultLangChar = new SpannableString(defaultLang);
@ -306,10 +298,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);
}

View File

@ -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>