Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
- name: Build debug APK
run: bash ./gradlew assembleDev --stacktrace --no-configuration-cache
- name: Upload APK
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: app-dev-debug
path: app/build/outputs/apk/dev/debug/app-dev-debug.apk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import android.util.Log
import android.view.View
import android.widget.RemoteViews
import android.widget.RemoteViewsService.RemoteViewsFactory
import androidx.core.content.ContextCompat
import androidx.core.net.toUri
import com.nextcloud.android.common.ui.util.PlatformThemeUtil
import it.niedermann.owncloud.notes.R
import it.niedermann.owncloud.notes.edit.EditNoteActivity
import it.niedermann.owncloud.notes.persistence.NotesRepository
Expand Down Expand Up @@ -148,6 +150,14 @@ class NoteListWidgetFactory internal constructor(private val context: Context, i
} else {
setViewVisibility(R.id.widget_entry_category, View.VISIBLE)
setTextViewText(R.id.widget_entry_category, note.category)

val textColorId = if (PlatformThemeUtil.isDarkMode(context)) {
R.color.text_color
} else {
R.color.category_border
}
val textColor = ContextCompat.getColor(context, textColorId)
setTextColor(R.id.widget_entry_category, textColor)
}

val starIconId = if (note.favorite) {
Expand Down
15 changes: 15 additions & 0 deletions app/src/main/res/drawable/category_widget_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!--
~ Nextcloud Notes - Android Client
~
~ SPDX-FileCopyrightText: 2017-2026 Nextcloud GmbH and Nextcloud contributors
~ SPDX-FileCopyrightText: 2017-2026 Alper Ozturk <alper.ozturk@nextcloud.com>
~ SPDX-License-Identifier: GPL-3.0-or-later
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/category_widget_background" />
<stroke
android:width="1dip"
android:color="@color/category_border" />
<corners android:radius="8dp" />
</shape>
3 changes: 1 addition & 2 deletions app/src/main/res/layout/widget_entry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@
android:layout_gravity="center_vertical"
android:paddingHorizontal="8dp"
android:paddingVertical="4dp"
android:background="@drawable/border"
android:background="@drawable/category_widget_background"
android:textSize="12sp"
android:textColor="@color/category_border"
android:gravity="center"
android:visibility="gone"
tools:visibility="visible"
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@
<color name="icon_on_nc_grey">#ffffff</color>

<color name="action_mode_background">#1E1E1E</color>

<color name="category_widget_background">@color/material_dynamic_secondary20</color>
<color name="category_border">@android:color/transparent</color>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,6 @@
<color name="widget_foreground">#222222</color>

<color name="action_mode_background">#ededed</color>

<color name="category_widget_background">@android:color/transparent</color>
</resources>
Loading