diff --git a/app/src/main/java/lu/circl/mispbump/activities/SyncInfoDetailActivity.java b/app/src/main/java/lu/circl/mispbump/activities/SyncInfoDetailActivity.java
index dbbb585..8083154 100644
--- a/app/src/main/java/lu/circl/mispbump/activities/SyncInfoDetailActivity.java
+++ b/app/src/main/java/lu/circl/mispbump/activities/SyncInfoDetailActivity.java
@@ -262,34 +262,6 @@ public class SyncInfoDetailActivity extends AppCompatActivity {
dataLocallyChanged = true;
});
-// CheckBox allowSelfSigned = findViewById(R.id.checkbox_self_signed);
-// allowSelfSigned.setChecked(syncInformation.getRemote().getServer().getSelfSigned());
-// allowSelfSigned.setOnCheckedChangeListener((compoundButton, b) -> {
-// syncInformation.getRemote().getServer().setSelfSigned(b);
-// dataLocallyChanged = true;
-// });
-
-// CheckBox push = findViewById(R.id.checkbox_push);
-// push.setChecked(syncInformation.getRemote().getServer().getPush());
-// push.setOnCheckedChangeListener((compoundButton, b) -> {
-// syncInformation.getRemote().getServer().setPush(b);
-// dataLocallyChanged = true;
-// });
-//
-// CheckBox pull = findViewById(R.id.checkbox_pull);
-// pull.setChecked(syncInformation.getRemote().getServer().getPull());
-// pull.setOnCheckedChangeListener((compundButton, b) -> {
-// syncInformation.getRemote().getServer().setPull(b);
-// dataLocallyChanged = true;
-// });
-//
-// CheckBox cache = findViewById(R.id.checkbox_cache);
-// cache.setChecked(syncInformation.getRemote().getServer().getCachingEnabled());
-// cache.setOnCheckedChangeListener((compoundButton, b) -> {
-// syncInformation.getRemote().getServer().setCachingEnabled(b);
-// dataLocallyChanged = true;
-// });
-
// credentials
MaterialPreferenceText email = findViewById(R.id.email);
diff --git a/app/src/main/java/lu/circl/mispbump/customViews/MaterialPasswordView.java b/app/src/main/java/lu/circl/mispbump/customViews/MaterialPasswordView.java
index 9e90a9b..5c0bec2 100644
--- a/app/src/main/java/lu/circl/mispbump/customViews/MaterialPasswordView.java
+++ b/app/src/main/java/lu/circl/mispbump/customViews/MaterialPasswordView.java
@@ -3,6 +3,7 @@ package lu.circl.mispbump.customViews;
import android.content.Context;
import android.content.res.TypedArray;
+import android.graphics.drawable.AnimatedVectorDrawable;
import android.text.method.PasswordTransformationMethod;
import android.util.AttributeSet;
import android.view.LayoutInflater;
@@ -38,11 +39,19 @@ public class MaterialPasswordView extends ConstraintLayout {
passwordView.setText(password);
ImageButton visibleToggle = findViewById(R.id.visibleToggle);
+
+ AnimatedVectorDrawable lookAway = (AnimatedVectorDrawable) context.getDrawable(R.drawable.animated_eye_to_up);
+ AnimatedVectorDrawable lookCenter = (AnimatedVectorDrawable) context.getDrawable(R.drawable.animated_eye_to_center);
+
visibleToggle.setOnClickListener(v -> {
if (passwordView.getTransformationMethod() == null) {
passwordView.setTransformationMethod(new PasswordTransformationMethod());
+ visibleToggle.setImageDrawable(lookCenter);
+ lookCenter.start();
} else {
passwordView.setTransformationMethod(null);
+ visibleToggle.setImageDrawable(lookAway);
+ lookAway.start();
}
});
}
diff --git a/app/src/main/res/drawable/animated_arrow_cloud_down.xml b/app/src/main/res/drawable/animated_arrow_cloud_down.xml
new file mode 100644
index 0000000..b0fc85b
--- /dev/null
+++ b/app/src/main/res/drawable/animated_arrow_cloud_down.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/animated_arrow_down_cloud.xml b/app/src/main/res/drawable/animated_arrow_down_cloud.xml
new file mode 100644
index 0000000..e43fd81
--- /dev/null
+++ b/app/src/main/res/drawable/animated_arrow_down_cloud.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/animated_arrow_down_up.xml b/app/src/main/res/drawable/animated_arrow_down_up.xml
new file mode 100644
index 0000000..d01b443
--- /dev/null
+++ b/app/src/main/res/drawable/animated_arrow_down_up.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/animated_arrow_up_down.xml b/app/src/main/res/drawable/animated_arrow_up_down.xml
new file mode 100644
index 0000000..bbae73a
--- /dev/null
+++ b/app/src/main/res/drawable/animated_arrow_up_down.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/animated_eye_to_center.xml b/app/src/main/res/drawable/animated_eye_to_center.xml
new file mode 100644
index 0000000..81d562d
--- /dev/null
+++ b/app/src/main/res/drawable/animated_eye_to_center.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/animated_eye_to_up.xml b/app/src/main/res/drawable/animated_eye_to_up.xml
new file mode 100644
index 0000000..208e30d
--- /dev/null
+++ b/app/src/main/res/drawable/animated_eye_to_up.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/material_password_view.xml b/app/src/main/res/layout/material_password_view.xml
index 6dbff23..0bcccc0 100644
--- a/app/src/main/res/layout/material_password_view.xml
+++ b/app/src/main/res/layout/material_password_view.xml
@@ -18,7 +18,7 @@
android:layout_width="48dp"
android:layout_height="0dp"
android:background="?attr/selectableItemBackgroundBorderless"
- android:src="@drawable/ic_eye"
+ android:src="@drawable/animated_eye_to_up"
android:tint="@color/colorIconDark"
app:layout_constraintBottom_toBottomOf="@+id/material_password"
app:layout_constraintEnd_toEndOf="parent"