mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-21 22:27:29 +00:00
make media shares look better
This commit is contained in:
parent
b4b91c68e3
commit
37663ced30
@ -65,7 +65,6 @@ public class DirectItemMediaShareViewHolder extends DirectItemViewHolder {
|
||||
if (media == null) return;
|
||||
itemView.post(() -> {
|
||||
setupUser(media);
|
||||
setupTitle(media);
|
||||
setupCaption(media);
|
||||
});
|
||||
final int index;
|
||||
@ -140,16 +139,6 @@ public class DirectItemMediaShareViewHolder extends DirectItemViewHolder {
|
||||
}
|
||||
}
|
||||
|
||||
private void setupTitle(@NonNull final Media media) {
|
||||
final String title = media.getTitle();
|
||||
if (!TextUtils.isEmpty(title)) {
|
||||
binding.title.setVisibility(View.VISIBLE);
|
||||
binding.title.setText(title);
|
||||
} else {
|
||||
binding.title.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
private void setupUser(@NonNull final Media media) {
|
||||
final User user = media.getUser();
|
||||
if (user != null) {
|
||||
|
@ -76,26 +76,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body2"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@id/caption"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="1"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="Title" />
|
||||
app:layout_constraintTop_toTopOf="@id/caption" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/caption"
|
||||
@ -107,6 +88,5 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/title"
|
||||
tools:text="Caption Caption Caption Caption Caption Caption " />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Reference in New Issue
Block a user