Simplified image item view

This commit is contained in:
M66B 2019-10-27 16:52:40 +01:00
parent 0515c1b2cf
commit 5da41b3e53
2 changed files with 1 additions and 15 deletions

View File

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

View File

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