Skip to content

Commit

Permalink
feat(done): Enhance width of done button
Browse files Browse the repository at this point in the history
Refs: #1556

Signed-off-by: Stefan Niedermann <[email protected]>
  • Loading branch information
stefan-niedermann committed Jan 14, 2024
1 parent 2694c8e commit a46f70e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import com.google.android.material.chip.Chip;
import com.google.android.material.snackbar.Snackbar;
import com.nextcloud.android.common.ui.theme.utils.ColorRole;
import com.nextcloud.android.sso.exceptions.NextcloudFilesAppAccountNotFoundException;
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog;
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog.OnDateSetListener;
Expand Down Expand Up @@ -150,6 +151,11 @@ private void applyTheme(@ColorInt int color) {
binding.descriptionEditorWrapper
).forEach(utils.material::colorTextInputLayout);

Stream.of(
binding.clearDueDate,
binding.descriptionToggle
).forEach(v -> utils.platform.colorImageView(v, ColorRole.SECONDARY));

binding.descriptionEditor.setSearchColor(color);
binding.descriptionViewer.setSearchColor(color);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
public void applyTheme(int color) {
final var scheme = ThemeUtils.createScheme(color, requireContext());

@ColorInt final int buttonTextColor = scheme.getOnPrimaryContainer();
@ColorInt final int buttonTextColor = scheme.getOnSecondaryContainer();
setOkColor(buttonTextColor);
setCancelColor(buttonTextColor);

setAccentColor(Scheme.dark(color).getPrimaryContainer());
setAccentColor(Scheme.dark(color).getSecondaryContainer());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
public void applyTheme(int color) {
final var scheme = ThemeUtils.createScheme(color, requireContext());

@ColorInt final int buttonTextColor = scheme.getOnPrimaryContainer();
@ColorInt final int buttonTextColor = scheme.getOnSecondaryContainer();
setOkColor(buttonTextColor);
setCancelColor(buttonTextColor);

setAccentColor(Scheme.dark(color).getPrimaryContainer());
setAccentColor(Scheme.dark(color).getSecondaryContainer());
}

/**
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/fragment_card_edit_tab_details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@
app:icon="@drawable/ic_check_white_24dp"
app:layout_constraintBottom_toTopOf="@id/descriptionWrapper"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/dueDateTimeWrapper"
app:layout_constraintTop_toBottomOf="@id/dueDateDateWrapper" />

<RelativeLayout
Expand Down

0 comments on commit a46f70e

Please sign in to comment.