Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-deck.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Niedermann <info@niedermann.it>2020-11-04 18:51:08 +0300
committerStefan Niedermann <info@niedermann.it>2020-11-04 18:51:08 +0300
commit5ef596c95abf15eaef34b48184a3f26795cd1d1c (patch)
tree416dedcb9b7d363a05a262f080da485be67edf5c /app/src/main/java/it/niedermann/nextcloud/deck/ui
parentde0c0f2b29b6e8deb99d5c793490967ca90eecfb (diff)
Use white background for controls
Signed-off-by: Stefan Niedermann <info@niedermann.it>
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/ui')
-rw-r--r--app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/CardAttachmentsFragment.java55
1 files changed, 22 insertions, 33 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/CardAttachmentsFragment.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/CardAttachmentsFragment.java
index 46197a182..617b59305 100644
--- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/CardAttachmentsFragment.java
+++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/attachments/CardAttachmentsFragment.java
@@ -1,7 +1,5 @@
package it.niedermann.nextcloud.deck.ui.card.attachments;
-import android.animation.Animator;
-import android.animation.AnimatorListenerAdapter;
import android.animation.ArgbEvaluator;
import android.animation.ValueAnimator;
import android.content.ContentResolver;
@@ -272,20 +270,15 @@ public class CardAttachmentsFragment extends BrandedFragment implements Attachme
pickerAnimationInProgress = true;
binding.pickerBackdrop.setVisibility(VISIBLE);
binding.pickerControlsWrapper.setVisibility(VISIBLE);
- ValueAnimator colorAnimation = ValueAnimator.ofObject(new ArgbEvaluator(), getResources().getColor(android.R.color.transparent), getResources().getColor(R.color.mdtp_transparent_black));
- colorAnimation.setDuration(250);
- colorAnimation.addUpdateListener(animator -> {
- binding.pickerBackdrop.setBackgroundColor((int) animator.getAnimatedValue());
- binding.pickerControls.setBackgroundColor((int) animator.getAnimatedValue());
- });
- colorAnimation.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- super.onAnimationEnd(animation);
- pickerAnimationInProgress = false;
- }
- });
- colorAnimation.start();
+ final ValueAnimator backdropAnimation = ValueAnimator.ofObject(new ArgbEvaluator(), getResources().getColor(android.R.color.transparent), getResources().getColor(R.color.mdtp_transparent_black));
+ final ValueAnimator controlsAnimation = ValueAnimator.ofObject(new ArgbEvaluator(), getResources().getColor(android.R.color.transparent), getResources().getColor(R.color.primary));
+ controlsAnimation.setDuration(250);
+ backdropAnimation.setDuration(250);
+ controlsAnimation.addUpdateListener(animator -> binding.pickerControls.setBackgroundColor((int) animator.getAnimatedValue()));
+ backdropAnimation.addUpdateListener(animator -> binding.pickerBackdrop.setBackgroundColor((int) animator.getAnimatedValue()));
+ controlsAnimation.start();
+ backdropAnimation.start();
+ new Handler(Looper.getMainLooper()).postDelayed(() -> pickerAnimationInProgress = false, 250);
binding.fab.hide();
for (FloatingActionButton fab : brandedViews) {
fab.show();
@@ -294,23 +287,19 @@ public class CardAttachmentsFragment extends BrandedFragment implements Attachme
private void hidePickerSheet() {
pickerAnimationInProgress = true;
- ValueAnimator colorAnimation = ValueAnimator.ofObject(new ArgbEvaluator(), getResources().getColor(R.color.mdtp_transparent_black), getResources().getColor(android.R.color.transparent));
- colorAnimation.setDuration(250);
- colorAnimation.addUpdateListener(animator -> {
- binding.pickerBackdrop.setBackgroundColor((int) animator.getAnimatedValue());
- binding.pickerControls.setBackgroundColor((int) animator.getAnimatedValue());
- });
- colorAnimation.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- super.onAnimationEnd(animation);
- binding.pickerBackdrop.setVisibility(GONE);
- binding.pickerControlsWrapper.setVisibility(GONE);
- pickerAnimationInProgress = false;
- }
- });
- colorAnimation.start();
- new Handler(Looper.getMainLooper()).postDelayed(() -> binding.pickerControlsWrapper.setVisibility(GONE), 250);
+ final ValueAnimator backdropAnimation = ValueAnimator.ofObject(new ArgbEvaluator(), getResources().getColor(R.color.mdtp_transparent_black), getResources().getColor(android.R.color.transparent));
+ final ValueAnimator controlsAnimation = ValueAnimator.ofObject(new ArgbEvaluator(), getResources().getColor(R.color.primary), getResources().getColor(android.R.color.transparent));
+ controlsAnimation.setDuration(250);
+ backdropAnimation.setDuration(250);
+ controlsAnimation.addUpdateListener(animator -> binding.pickerControls.setBackgroundColor((int) animator.getAnimatedValue()));
+ backdropAnimation.addUpdateListener(animator -> binding.pickerBackdrop.setBackgroundColor((int) animator.getAnimatedValue()));
+ controlsAnimation.start();
+ backdropAnimation.start();
+ new Handler(Looper.getMainLooper()).postDelayed(() -> {
+ binding.pickerBackdrop.setVisibility(GONE);
+ binding.pickerControlsWrapper.setVisibility(GONE);
+ pickerAnimationInProgress = false;
+ }, 250);
for (FloatingActionButton fab : brandedViews) {
fab.hide();
}