Simplified image item view

pull/164/head
M66B 5 years ago
parent 0515c1b2cf
commit 5da41b3e53

@ -64,7 +64,6 @@ public class AdapterImage extends RecyclerView.Adapter<AdapterImage.ViewHolder>
private View view;
private ImageView ivImage;
private TextView tvCaption;
private TextView tvType;
ViewHolder(View itemView) {
super(itemView);
@ -72,7 +71,6 @@ public class AdapterImage extends RecyclerView.Adapter<AdapterImage.ViewHolder>
view = itemView.findViewById(R.id.clItem);
ivImage = itemView.findViewById(R.id.ivImage);
tvCaption = itemView.findViewById(R.id.tvCaption);
tvType = itemView.findViewById(R.id.tvType);
}
private void wire() {
@ -98,7 +96,6 @@ public class AdapterImage extends RecyclerView.Adapter<AdapterImage.ViewHolder>
tvCaption.setVisibility(TextUtils.isEmpty(attachment.name) ? View.GONE : View.VISIBLE);
tvCaption.setText(attachment.name);
tvType.setText(attachment.type);
}
@Override

@ -29,21 +29,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="Launcher icon"
android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ivImage" />
<TextView
android:id="@+id/tvType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="image/jpg"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvCaption" />
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>
Loading…
Cancel
Save