Loading app/build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ dependencies { } // Nextcloud SSO implementation 'com.github.nextcloud.android-common:ui:0.27.2' implementation 'com.github.nextcloud.android-common:ui:0.28.0' implementation 'com.github.nextcloud:Android-SingleSignOn:1.3.2' implementation "com.github.stefan-niedermann.android-commons:shared-preferences:$androidCommonsVersion" implementation "com.github.stefan-niedermann.android-commons:reactive-livedata:$androidCommonsVersion" Loading app/src/main/java/it/niedermann/owncloud/notes/branding/BrandedActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ public abstract class BrandedActivity extends AppCompatActivity implements Brand super.onStart(); final var typedValue = new TypedValue(); getTheme().resolveAttribute(R.attr.colorAccent, typedValue, true); getTheme().resolveAttribute(R.attr.colorSecondary, typedValue, true); colorAccent = typedValue.data; readBrandMainColorLiveData(this).observe(this, this::applyBrand); Loading app/src/main/java/it/niedermann/owncloud/notes/branding/BrandedFragment.kt +11 −6 Original line number Diff line number Diff line Loading @@ -31,7 +31,9 @@ import kotlinx.coroutines.launch * @see BrandingUtil for brand color resolution and application. * @see Branded for the interface definition related to branding behavior. */ abstract class BrandedFragment : Fragment(), Branded { abstract class BrandedFragment : Fragment(), Branded { @JvmField @ColorInt protected var colorAccent: Int = 0 Loading @@ -55,16 +57,16 @@ abstract class BrandedFragment : Fragment(), Branded { val typedValue = TypedValue() context.theme.resolveAttribute( com.google.android.material.R.attr.colorAccent, com.google.android.material.R.attr.colorSecondary, typedValue, true true, ) colorAccent = typedValue.data context.theme.resolveAttribute( com.google.android.material.R.attr.colorPrimary, com.google.android.material.R.attr.colorPrimaryContainer, typedValue, true true, ) colorPrimary = typedValue.data Loading @@ -75,7 +77,10 @@ abstract class BrandedFragment : Fragment(), Branded { @Suppress("DEPRECATION") @Deprecated("Deprecated in Java") override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) { override fun onCreateOptionsMenu( menu: Menu, inflater: MenuInflater, ) { super.onCreateOptionsMenu(menu, inflater) val utils = BrandingUtil.of(colorAccent, requireContext()) Loading app/src/main/java/it/niedermann/owncloud/notes/main/MultiSelectedActionModeCallback.java +1 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ public class MultiSelectedActionModeCallback implements Callback { this.fragmentManager = fragmentManager; final TypedValue typedValue = new TypedValue(); context.getTheme().resolveAttribute(com.google.android.material.R.attr.colorAccent, typedValue, true); context.getTheme().resolveAttribute(com.google.android.material.R.attr.colorSecondary, typedValue, true); colorAccent = typedValue.data; } Loading app/src/main/java/it/niedermann/owncloud/notes/shared/util/ExtendedFabUtil.kt +15 −11 Original line number Diff line number Diff line Loading @@ -25,18 +25,22 @@ object ExtendedFabUtil { extendedFab.hide() } else { if (extendedFab.animation == null) { val animation = AnimationUtils.loadAnimation( val animation = AnimationUtils.loadAnimation( extendedFab.context, R.anim.abc_shrink_fade_out_from_bottom, R.anim.design_bottom_sheet_slide_out, ) animation.setAnimationListener(object : Animation.AnimationListener { animation.setAnimationListener( object : Animation.AnimationListener { override fun onAnimationStart(animation: Animation) {} override fun onAnimationEnd(animation: Animation) { extendedFab.visibility = View.GONE } override fun onAnimationRepeat(animation: Animation) {} }) }, ) extendedFab.startAnimation(animation) } } Loading Loading
app/build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ dependencies { } // Nextcloud SSO implementation 'com.github.nextcloud.android-common:ui:0.27.2' implementation 'com.github.nextcloud.android-common:ui:0.28.0' implementation 'com.github.nextcloud:Android-SingleSignOn:1.3.2' implementation "com.github.stefan-niedermann.android-commons:shared-preferences:$androidCommonsVersion" implementation "com.github.stefan-niedermann.android-commons:reactive-livedata:$androidCommonsVersion" Loading
app/src/main/java/it/niedermann/owncloud/notes/branding/BrandedActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ public abstract class BrandedActivity extends AppCompatActivity implements Brand super.onStart(); final var typedValue = new TypedValue(); getTheme().resolveAttribute(R.attr.colorAccent, typedValue, true); getTheme().resolveAttribute(R.attr.colorSecondary, typedValue, true); colorAccent = typedValue.data; readBrandMainColorLiveData(this).observe(this, this::applyBrand); Loading
app/src/main/java/it/niedermann/owncloud/notes/branding/BrandedFragment.kt +11 −6 Original line number Diff line number Diff line Loading @@ -31,7 +31,9 @@ import kotlinx.coroutines.launch * @see BrandingUtil for brand color resolution and application. * @see Branded for the interface definition related to branding behavior. */ abstract class BrandedFragment : Fragment(), Branded { abstract class BrandedFragment : Fragment(), Branded { @JvmField @ColorInt protected var colorAccent: Int = 0 Loading @@ -55,16 +57,16 @@ abstract class BrandedFragment : Fragment(), Branded { val typedValue = TypedValue() context.theme.resolveAttribute( com.google.android.material.R.attr.colorAccent, com.google.android.material.R.attr.colorSecondary, typedValue, true true, ) colorAccent = typedValue.data context.theme.resolveAttribute( com.google.android.material.R.attr.colorPrimary, com.google.android.material.R.attr.colorPrimaryContainer, typedValue, true true, ) colorPrimary = typedValue.data Loading @@ -75,7 +77,10 @@ abstract class BrandedFragment : Fragment(), Branded { @Suppress("DEPRECATION") @Deprecated("Deprecated in Java") override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) { override fun onCreateOptionsMenu( menu: Menu, inflater: MenuInflater, ) { super.onCreateOptionsMenu(menu, inflater) val utils = BrandingUtil.of(colorAccent, requireContext()) Loading
app/src/main/java/it/niedermann/owncloud/notes/main/MultiSelectedActionModeCallback.java +1 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ public class MultiSelectedActionModeCallback implements Callback { this.fragmentManager = fragmentManager; final TypedValue typedValue = new TypedValue(); context.getTheme().resolveAttribute(com.google.android.material.R.attr.colorAccent, typedValue, true); context.getTheme().resolveAttribute(com.google.android.material.R.attr.colorSecondary, typedValue, true); colorAccent = typedValue.data; } Loading
app/src/main/java/it/niedermann/owncloud/notes/shared/util/ExtendedFabUtil.kt +15 −11 Original line number Diff line number Diff line Loading @@ -25,18 +25,22 @@ object ExtendedFabUtil { extendedFab.hide() } else { if (extendedFab.animation == null) { val animation = AnimationUtils.loadAnimation( val animation = AnimationUtils.loadAnimation( extendedFab.context, R.anim.abc_shrink_fade_out_from_bottom, R.anim.design_bottom_sheet_slide_out, ) animation.setAnimationListener(object : Animation.AnimationListener { animation.setAnimationListener( object : Animation.AnimationListener { override fun onAnimationStart(animation: Animation) {} override fun onAnimationEnd(animation: Animation) { extendedFab.visibility = View.GONE } override fun onAnimationRepeat(animation: Animation) {} }) }, ) extendedFab.startAnimation(animation) } } Loading