forked from mirrors/Fedilab
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
1c9ebf14f9
4 changed files with 25 additions and 22 deletions
|
@ -1163,15 +1163,15 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
|||
});
|
||||
composeAttachmentItemBinding.preview.setOnClickListener(v -> displayAttachments(holder, position, finalMediaPosition));
|
||||
if (attachment.description == null || attachment.description.trim().isEmpty()) {
|
||||
composeAttachmentItemBinding.buttonDescription.setIconResource(R.drawable.ic_baseline_warning_24);
|
||||
composeAttachmentItemBinding.buttonDescription.setChipIconResource(R.drawable.ic_baseline_warning_24);
|
||||
composeAttachmentItemBinding.buttonDescription.setTextColor(ContextCompat.getColor(context, R.color.black));
|
||||
composeAttachmentItemBinding.buttonDescription.setIconTintResource(R.color.black);
|
||||
composeAttachmentItemBinding.buttonDescription.setBackgroundTintList(ThemeHelper.getNoDescriptionColorStateList(context));
|
||||
composeAttachmentItemBinding.buttonDescription.setChipIconTintResource(R.color.black);
|
||||
composeAttachmentItemBinding.buttonDescription.setChipBackgroundColor(ThemeHelper.getNoDescriptionColorStateList(context));
|
||||
} else {
|
||||
composeAttachmentItemBinding.buttonDescription.setIconResource(R.drawable.ic_baseline_check_circle_24);
|
||||
composeAttachmentItemBinding.buttonDescription.setChipIconResource(R.drawable.ic_baseline_check_circle_24);
|
||||
composeAttachmentItemBinding.buttonDescription.setTextColor(ContextCompat.getColor(context, R.color.white));
|
||||
composeAttachmentItemBinding.buttonDescription.setIconTintResource(R.color.white);
|
||||
composeAttachmentItemBinding.buttonDescription.setBackgroundTintList(ThemeHelper.getHavingDescriptionColorStateList(context));
|
||||
composeAttachmentItemBinding.buttonDescription.setChipIconTintResource(R.color.white);
|
||||
composeAttachmentItemBinding.buttonDescription.setChipBackgroundColor(ThemeHelper.getHavingDescriptionColorStateList(context));
|
||||
}
|
||||
holder.binding.attachmentsList.addView(composeAttachmentItemBinding.getRoot());
|
||||
mediaPosition++;
|
||||
|
|
5
app/src/main/res/drawable/bg_compose_panels.xml
Normal file
5
app/src/main/res/drawable/bg_compose_panels.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="?colorSurfaceVariant" />
|
||||
<corners android:radius="12dp" />
|
||||
</shape>
|
|
@ -25,14 +25,14 @@
|
|||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/button_play"
|
||||
app:srcCompat="@drawable/ic_compose_attachment_play"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:scaleType="fitCenter"
|
||||
app:layout_constraintBottom_toBottomOf="@id/preview"
|
||||
app:layout_constraintEnd_toEndOf="@id/preview"
|
||||
app:layout_constraintStart_toStartOf="@id/preview"
|
||||
app:layout_constraintTop_toTopOf="@id/preview" />
|
||||
app:layout_constraintTop_toTopOf="@id/preview"
|
||||
app:srcCompat="@drawable/ic_compose_attachment_play" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/edit_preview"
|
||||
|
@ -66,22 +66,19 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/preview" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
<com.google.android.material.chip.Chip
|
||||
android:id="@+id/button_description"
|
||||
android:layout_width="match_parent"
|
||||
style="@style/Widget.Material3.Chip.Assist.Elevated"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:text="@string/description"
|
||||
android:textAlignment="textStart"
|
||||
android:textColor="@color/black"
|
||||
app:backgroundTint="@color/no_description"
|
||||
app:icon="@drawable/ic_baseline_warning_24"
|
||||
app:iconGravity="textStart"
|
||||
app:iconTint="@color/black"
|
||||
app:chipBackgroundColor="@color/no_description"
|
||||
app:chipIcon="@drawable/ic_baseline_warning_24"
|
||||
app:layout_constraintEnd_toStartOf="@id/button_order_down"
|
||||
app:layout_constraintStart_toEndOf="@id/button_order_up"
|
||||
app:layout_constraintTop_toBottomOf="@id/preview" />
|
||||
app:layout_constraintTop_toBottomOf="@id/preview"
|
||||
app:textEndPadding="0dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/button_order_down"
|
||||
|
|
|
@ -220,7 +220,7 @@
|
|||
android:id="@+id/attachment_choices_panel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorSurfaceVariant"
|
||||
android:background="@drawable/bg_compose_panels"
|
||||
android:padding="6dp"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="button_attach_image,button_attach_audio,button_attach_video,button_close_attachment_panel,button_poll,button_attach_manual"
|
||||
|
@ -274,14 +274,15 @@
|
|||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/visibility_panel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="?colorSurfaceVariant"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_compose_panels"
|
||||
android:gravity="bottom"
|
||||
android:orientation="vertical"
|
||||
android:padding="6dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="1">
|
||||
|
||||
<com.google.android.material.button.MaterialButtonToggleGroup
|
||||
android:layout_width="match_parent"
|
||||
|
|
Loading…
Reference in a new issue