Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.git.amarradi.leafpad.adapter;
private static final int STROKE_WIDTH = ColorUtilsHelper.dpToPx(card.getContext(), 2);package com.git.amarradi.leafpad.adapter;

import android.view.LayoutInflater;
import android.view.View;
Expand Down Expand Up @@ -54,7 +54,7 @@ public void setCategories(List<CategoryEntity> categories) {

public void setSelectedCategoryIds(List<Long> ids) {
selectedCategoryIds.clear();
if (ids != null) {
if (null != ids) {
selectedCategoryIds.addAll(ids);
}
notifyDataSetChanged();
Expand Down Expand Up @@ -110,7 +110,7 @@ public void onBindViewHolder(@NonNull CategoryViewHolder holder, int position) {


holder.editButton.setOnClickListener(v -> {
if (listener != null) {
if (null != listener) {
listener.onEditCategory(category);
}
});
Expand All @@ -129,13 +129,13 @@ private void applyCategoryColors(
ImageButton btnDelete,
CategoryEntity category
) {
if (category == null) return;
if (null == category) return;

int baseColor = ColorUtilsHelper.parseCategoryColor(category.colorHex);

int bgColor = ColorUtilsHelper.getCategoryBackgroundColor(baseColor);

card.setStrokeWidth(ColorUtilsHelper.dpToPx(card.getContext(), 2));
card.setStrokeWidth(STROKE_WIDTH);
card.setStrokeColor(baseColor);
card.setCardBackgroundColor(bgColor);

Expand Down