- De-cluttered the launcher ui.

- Removed stuff that wasn't used.
This commit is contained in:
SerpentSpirale 2021-02-22 11:24:38 +01:00
parent 53db976a15
commit 4c6dd80be8
4 changed files with 16 additions and 52 deletions

View File

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

View File

@ -52,7 +52,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 +185,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);
@ -235,7 +234,7 @@ public class PojavLauncherActivity extends BaseLauncherActivity
mLaunchProgress.setVisibility(launchVisibility);
mLaunchTextStatus.setVisibility(launchVisibility);
switchUsrBtn.setEnabled(!isLaunching);
logoutBtn.setEnabled(!isLaunching);
mVersionSelector.setEnabled(!isLaunching);
canBack = !isLaunching;

View File

@ -82,6 +82,7 @@ public class PojavLoginActivity extends BaseActivity
private CheckBox sRemember, sOffline;
private TextView startupTextView;
private SharedPreferences firstLaunchPrefs;
private MinecraftAccount mProfile = null;
private static boolean isSkipInit = false;
@ -765,7 +766,7 @@ public class PojavLoginActivity extends BaseActivity
return null;
}
private MinecraftAccount mProfile = null;
public void loginMC(final View v)
{

View File

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