Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit c8a7a706 authored by Andy Scherzinger's avatar Andy Scherzinger Committed by GitHub
Browse files

Merge pull request #2060 from nextcloud/renovate/com.github.nextcloud.android-common-ui-0.x

fix(deps): update dependency com.github.nextcloud.android-common:ui to v0.18.0
parents b75bc0ea f5a77073
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ dependencies {
    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'

    // Nextcloud SSO
    implementation 'com.github.nextcloud.android-common:ui:0.17.0'
    implementation 'com.github.nextcloud.android-common:ui:0.18.0'
    implementation 'com.github.nextcloud:Android-SingleSignOn:1.1.0'
    implementation 'com.github.stefan-niedermann:android-commons:1.0.0'
    implementation "com.github.stefan-niedermann.nextcloud-commons:sso-glide:$commonsVersion"
+18 −14
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.widget.TextView;
import androidx.annotation.ColorInt;
import androidx.annotation.IdRes;
import androidx.annotation.NonNull;
import androidx.appcompat.widget.AppCompatAutoCompleteTextView;
import androidx.appcompat.widget.SearchView;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
@@ -34,6 +35,7 @@ import com.nextcloud.android.common.ui.theme.MaterialSchemes;
import com.nextcloud.android.common.ui.theme.ViewThemeUtilsBase;
import com.nextcloud.android.common.ui.theme.utils.MaterialViewThemeUtils;

import dynamiccolor.MaterialDynamicColors;
import it.niedermann.android.util.ColorUtil;
import it.niedermann.owncloud.notes.R;
import it.niedermann.owncloud.notes.main.navigation.NavigationItem;
@@ -44,6 +46,8 @@ public class NotesViewThemeUtils extends ViewThemeUtilsBase {

    private static final String TAG = NotesViewThemeUtils.class.getSimpleName();

    private final MaterialDynamicColors dynamicColor = new MaterialDynamicColors();

    public NotesViewThemeUtils(@NonNull MaterialSchemes schemes) {
        super(schemes);
    }
@@ -55,7 +59,7 @@ public class NotesViewThemeUtils extends ViewThemeUtilsBase {
    public void colorNavigationViewItem(@NonNull View view) {
        withScheme(view, scheme -> {
            view.setBackgroundTintList(buildColorStateList(
                    new Pair<>(android.R.attr.state_selected, scheme.getSecondaryContainer()),
                    new Pair<>(android.R.attr.state_selected, dynamicColor.secondaryContainer().getArgb(scheme)),
                    new Pair<>(-android.R.attr.state_selected, Color.TRANSPARENT)
            ));
            return view;
@@ -69,8 +73,8 @@ public class NotesViewThemeUtils extends ViewThemeUtilsBase {
    public void colorNavigationViewItemIcon(@NonNull ImageView view) {
        withScheme(view, scheme -> {
            view.setImageTintList(buildColorStateList(
                    new Pair<>(android.R.attr.state_selected, scheme.getOnSecondaryContainer()),
                    new Pair<>(-android.R.attr.state_selected, scheme.getOnSurfaceVariant())
                    new Pair<>(android.R.attr.state_selected, dynamicColor.onSecondaryContainer().getArgb(scheme)),
                    new Pair<>(-android.R.attr.state_selected, dynamicColor.onSurfaceVariant().getArgb(scheme))
            ));
            return view;
        });
@@ -83,8 +87,8 @@ public class NotesViewThemeUtils extends ViewThemeUtilsBase {
    public void colorNavigationViewItemText(@NonNull TextView view) {
        withScheme(view, scheme -> {
            view.setTextColor(buildColorStateList(
                    new Pair<>(android.R.attr.state_selected, scheme.getOnSecondaryContainer()),
                    new Pair<>(-android.R.attr.state_selected, scheme.getOnSurfaceVariant())
                    new Pair<>(android.R.attr.state_selected, dynamicColor.onSecondaryContainer().getArgb(scheme)),
                    new Pair<>(-android.R.attr.state_selected, dynamicColor.onSurfaceVariant().getArgb(scheme))
            ));
            return view;
        });
@@ -167,7 +171,7 @@ public class NotesViewThemeUtils extends ViewThemeUtilsBase {
    @Deprecated
    public void themeSearchCardView(@NonNull MaterialCardView searchBarWrapper) {
        withScheme(searchBarWrapper, scheme -> {
            searchBarWrapper.setBackgroundTintList(ColorStateList.valueOf(scheme.getSurface()));
            searchBarWrapper.setBackgroundTintList(ColorStateList.valueOf(dynamicColor.surface().getArgb(scheme)));
            return searchBarWrapper;
        });
    }
@@ -179,8 +183,8 @@ public class NotesViewThemeUtils extends ViewThemeUtilsBase {
    @Deprecated
    public void themeSearchToolbar(@NonNull MaterialToolbar toolbar) {
        withScheme(toolbar, scheme -> {
            toolbar.setNavigationIconTint(scheme.getOnSurface());
            toolbar.setTitleTextColor(scheme.getOnSurface());
            toolbar.setNavigationIconTint(dynamicColor.onSurface().getArgb(scheme));
            toolbar.setTitleTextColor(dynamicColor.onSurface().getArgb(scheme));
            return toolbar;
        });
    }
@@ -193,15 +197,15 @@ public class NotesViewThemeUtils extends ViewThemeUtilsBase {
    public void themeToolbarSearchView(@NonNull SearchView searchView) {
        withScheme(searchView, scheme -> {
            // hacky as no default way is provided
            final var editText = (SearchView.SearchAutoComplete) searchView
            final var editText = (AppCompatAutoCompleteTextView) searchView
                    .findViewById(androidx.appcompat.R.id.search_src_text);
            final var closeButton = (ImageView) searchView.findViewById(androidx.appcompat.R.id.search_close_btn);
            final var searchButton = (ImageView) searchView.findViewById(androidx.appcompat.R.id.search_button);
            editText.setHintTextColor(scheme.getOnSurfaceVariant());
            editText.setHighlightColor(scheme.getInverseOnSurface());
            editText.setTextColor(scheme.getOnSurface());
            closeButton.setColorFilter(scheme.getOnSurface());
            searchButton.setColorFilter(scheme.getOnSurface());
            editText.setHintTextColor(dynamicColor.onSurfaceVariant().getArgb(scheme));
            editText.setHighlightColor(dynamicColor.inverseOnSurface().getArgb(scheme));
            editText.setTextColor(dynamicColor.onSurface().getArgb(scheme));
            closeButton.setColorFilter(dynamicColor.onSurface().getArgb(scheme));
            searchButton.setColorFilter(dynamicColor.onSurface().getArgb(scheme));
            return searchView;
        });
    }
+29 −0
Original line number Diff line number Diff line
@@ -309,6 +309,11 @@
            <sha256 value="a1fd8a9bd0a80c9f203065d01b76616d6675a3874c6b8bd1e87736dbfb318005" origin="Generated by Gradle" reason="Artifact is not signed"/>
         </artifact>
      </component>
      <component group="androidx.compose" name="compose-bom" version="2024.02.02">
         <artifact name="compose-bom-2024.02.02.pom">
            <sha256 value="9bfe92a8fa26491d64fc4c94621a8bdd0f61375fb815515236204503ec7cae6b" origin="Generated by Gradle" reason="Artifact is not signed"/>
         </artifact>
      </component>
      <component group="androidx.concurrent" name="concurrent-futures" version="1.0.0">
         <artifact name="concurrent-futures-1.0.0.pom">
            <sha256 value="4505b9a5e30a9418b59a9ad6702c3e4193aea6e691a3d03cf220c7640ad083e2" origin="Generated by Gradle" reason="Artifact is not signed"/>
@@ -1654,6 +1659,14 @@
            <sha256 value="c566a8a9d41b8e804c52539975cfc017d105e9fe2730e74f936ed948f55bc6dc" origin="Generated by Gradle" reason="Artifact is not signed"/>
         </artifact>
      </component>
      <component group="com.github.nextcloud.android-common" name="core" version="0.18.0">
         <artifact name="core-0.18.0.aar">
            <sha256 value="6df9110e5ab50846414102cc75d541fcb488d36a10b7c8b6c12908c344ad3a82" origin="Generated by Gradle"/>
         </artifact>
         <artifact name="core-0.18.0.module">
            <sha256 value="1e92c76d638cb275a3f9432641a0c5664b1eaabcc2da67bd809e787c3371fca5" origin="Generated by Gradle" reason="Artifact is not signed"/>
         </artifact>
      </component>
      <component group="com.github.nextcloud.android-common" name="material-color-utilities" version="0.14.0">
         <artifact name="material-color-utilities-0.14.0.jar">
            <sha256 value="bfcd5205b056b948bc6ff9a556898188f4a4e92179c723906e10f1164b776eed" origin="Generated by Gradle" reason="Artifact is not signed"/>
@@ -1686,6 +1699,14 @@
            <sha256 value="c6239f76c0d68b7126c4233e84fd3de9063b86e76084c602f296010192536a74" origin="Generated by Gradle" reason="Artifact is not signed"/>
         </artifact>
      </component>
      <component group="com.github.nextcloud.android-common" name="material-color-utilities" version="0.18.0">
         <artifact name="material-color-utilities-0.18.0.jar">
            <sha256 value="e04a3f4a3caff6e4b2ce3f14f91f0485ab1f012af652102eba61ab6bcf3d8240" origin="Generated by Gradle" reason="Artifact is not signed"/>
         </artifact>
         <artifact name="material-color-utilities-0.18.0.module">
            <sha256 value="708823ec85484322da28afa177689bc2adadf0d88f766407328353e0c755e63b" origin="Generated by Gradle" reason="Artifact is not signed"/>
         </artifact>
      </component>
      <component group="com.github.nextcloud.android-common" name="ui" version="0.14.0">
         <artifact name="ui-0.14.0.aar">
            <sha256 value="2ff1b8ca1ce4d4151ce967c4704a4def19a128d3f710491872e007217f3ac84f" origin="Generated by Gradle" reason="Artifact is not signed"/>
@@ -1718,6 +1739,14 @@
            <sha256 value="2ac34079e37123543bfc0fa78271424978b81baa5866d21884ec4084d6157573" origin="Generated by Gradle" reason="Artifact is not signed"/>
         </artifact>
      </component>
      <component group="com.github.nextcloud.android-common" name="ui" version="0.18.0">
         <artifact name="ui-0.18.0.aar">
            <sha256 value="7d900a930d7ad1f7de91177b8b661abef13deef032493cee99fe9842f85bcf16" origin="Generated by Gradle"/>
         </artifact>
         <artifact name="ui-0.18.0.module">
            <sha256 value="abbece3fec4a3a1b706401b26e10d0290ac394d04d89343d32da682527579846" origin="Generated by Gradle" reason="Artifact is not signed"/>
         </artifact>
      </component>
      <component group="com.github.stefan-niedermann" name="android-commons" version="1.0.0">
         <artifact name="android-commons-1.0.0.jar">
            <sha256 value="670f84d9ef31964f1b548204d83c81a44142106c69d4188b20556bc32f4ee3dc" origin="Generated by Gradle" reason="Artifact is not signed"/>