Added layout

pull/146/head
M66B 6 years ago
parent 27597da217
commit a548bf1b67

@ -1708,16 +1708,16 @@ public class FragmentCompose extends FragmentEx {
@NonNull @NonNull
@Override @Override
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) { public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
return getLayout(position, convertView, parent); return getLayout(position, convertView, parent, R.layout.spinner_item2);
} }
@Override @Override
public View getDropDownView(int position, View convertView, ViewGroup parent) { public View getDropDownView(int position, View convertView, ViewGroup parent) {
return getLayout(position, convertView, parent); return getLayout(position, convertView, parent, R.layout.spinner_item2_dropdown);
} }
View getLayout(int position, View convertView, ViewGroup parent) { View getLayout(int position, View convertView, ViewGroup parent, int resid) {
View view = LayoutInflater.from(context).inflate(R.layout.spinner_item2, parent, false); View view = LayoutInflater.from(context).inflate(resid, parent, false);
EntityIdentity identity = identities.get(position); EntityIdentity identity = identities.get(position);

@ -0,0 +1,26 @@
<?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="?android:attr/listPreferredItemHeightSmall"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
<TextView
android:id="@android:id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Text1"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@android:id/text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Text2"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@android:id/text1" />
</androidx.constraintlayout.widget.ConstraintLayout>
Loading…
Cancel
Save