- Updated account selection layout

This commit is contained in:
SerpentSpirale 2021-01-08 21:51:25 +01:00
parent de6e46b2ea
commit 08a95ce3ac
2 changed files with 29 additions and 8 deletions

View file

@ -671,8 +671,11 @@ public class PojavLoginActivity extends BaseActivity
public void loginSavedAcc(View view) { public void loginSavedAcc(View view) {
final Dialog accountDialog = new Dialog(PojavLoginActivity.this); 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); accountDialog.setContentView(R.layout.simple_account_list_holder);
accountDialog.getWindow().setLayout(800,500); accountDialog.getWindow().setLayout((int)(xScreen*0.4),(int)(yScreen*0.8));
LinearLayout accountListLayout = accountDialog.findViewById(R.id.accountListLayout); LinearLayout accountListLayout = accountDialog.findViewById(R.id.accountListLayout);
LayoutInflater inflater = (LayoutInflater) this.getSystemService(LAYOUT_INFLATER_SERVICE); LayoutInflater inflater = (LayoutInflater) this.getSystemService(LAYOUT_INFLATER_SERVICE);

View file

@ -1,32 +1,50 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:background="#424242"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<TextView
android:id="@+id/TextViewTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="20dp"
android:paddingBottom="20dp"
android:textSize="26sp"
android:textStyle="bold"
android:textColor="@android:color/white"
android:text="Select Account"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toBottomOf="@+id/TextViewTitle">
<LinearLayout <LinearLayout
android:id="@+id/accountListLayout" android:id="@+id/accountListLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginStart="0dp" android:layout_marginStart="0dp"
android:layout_marginEnd="0dp"
android:layout_marginTop="0dp" android:layout_marginTop="0dp"
android:layout_marginEnd="0dp"
android:layout_marginBottom="0dp" android:layout_marginBottom="0dp"
android:background="#424242"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"