mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-25 07:23:03 +00:00
Refactoring
This commit is contained in:
parent
bc4a51f45c
commit
cbbc1a3065
4 changed files with 38 additions and 32 deletions
|
@ -186,7 +186,7 @@ public class FragmentDialogSelectAccount extends FragmentDialogBase {
|
|||
@Override
|
||||
@NonNull
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new ViewHolder(inflater.inflate(R.layout.spinner_account, parent, false));
|
||||
return new ViewHolder(inflater.inflate(R.layout.item_account_select, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -174,7 +174,7 @@ public class FragmentDialogSelectIdentity extends FragmentDialogBase {
|
|||
@Override
|
||||
@NonNull
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new ViewHolder(inflater.inflate(R.layout.spinner_account, parent, false));
|
||||
return new ViewHolder(inflater.inflate(R.layout.item_account_select, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
36
app/src/main/res/layout/item_account_select.xml
Normal file
36
app/src/main/res/layout/item_account_select.xml
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?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:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:paddingHorizontal="12dp">
|
||||
|
||||
<eu.faircode.email.ViewStripe
|
||||
android:id="@+id/vwColor"
|
||||
android:layout_width="6dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginVertical="3dp"
|
||||
android:layout_marginStart="6dp"
|
||||
app:layout_constraintBottom_toBottomOf="@android:id/text1"
|
||||
app:layout_constraintEnd_toStartOf="@android:id/text1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@android:id/text1" />
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/text1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:paddingVertical="12dp"
|
||||
android:text="Text1"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/vwColor"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</FrameLayout>
|
|
@ -1,30 +0,0 @@
|
|||
<?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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="12dp">
|
||||
|
||||
<eu.faircode.email.ViewStripe
|
||||
android:id="@+id/vwColor"
|
||||
android:layout_width="6dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginVertical="3dp"
|
||||
android:layout_marginStart="6dp"
|
||||
app:layout_constraintBottom_toBottomOf="@android:id/text1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@android:id/text1"
|
||||
app:layout_constraintTop_toTopOf="@android:id/text1" />
|
||||
|
||||
<TextView
|
||||
android:id="@android:id/text1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:paddingVertical="12dp"
|
||||
android:text="Text1"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/vwColor"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Reference in a new issue