mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 19:49:33 +01:00
Merge pull request #1264 from nextcloud/bugfix/noid/password-visibility-toggle
Remove custom password animation and use default/component one
This commit is contained in:
commit
54b841302b
@ -326,7 +326,12 @@ public class EntryMenuController extends BaseController {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
textInputLayout.setPasswordVisibilityToggleEnabled(operationCode == 99 || operationCode == 4 || operationCode == 6 || operationCode == 7);
|
if (operationCode == 99 || operationCode == 4 || operationCode == 6 || operationCode == 7) {
|
||||||
|
textInputLayout.setEndIconMode(TextInputLayout.END_ICON_PASSWORD_TOGGLE);
|
||||||
|
} else {
|
||||||
|
textInputLayout.setEndIconMode(TextInputLayout.END_ICON_NONE);
|
||||||
|
}
|
||||||
|
|
||||||
textInputLayout.setHint(labelText);
|
textInputLayout.setHint(labelText);
|
||||||
textInputLayout.requestFocus();
|
textInputLayout.requestFocus();
|
||||||
}
|
}
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright 2016 Google Inc.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/visible"
|
|
||||||
android:state_checked="true"
|
|
||||||
android:drawable="@drawable/ic_password_visible" />
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/masked"
|
|
||||||
android:drawable="@drawable/ic_password_masked" />
|
|
||||||
|
|
||||||
<transition
|
|
||||||
android:fromId="@id/masked"
|
|
||||||
android:toId="@id/visible"
|
|
||||||
android:drawable="@drawable/avd_show_password" />
|
|
||||||
|
|
||||||
<transition
|
|
||||||
android:fromId="@id/visible"
|
|
||||||
android:toId="@id/masked"
|
|
||||||
android:drawable="@drawable/avd_hide_password" />
|
|
||||||
|
|
||||||
</animated-selector>
|
|
@ -1,85 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright 2015 Google Inc.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<animated-vector
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:aapt="http://schemas.android.com/aapt">
|
|
||||||
|
|
||||||
<aapt:attr name="android:drawable">
|
|
||||||
|
|
||||||
<vector
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
|
|
||||||
<path
|
|
||||||
android:name="strike_through"
|
|
||||||
android:pathData="@string/path_password_strike_through"
|
|
||||||
android:strokeColor="@android:color/white"
|
|
||||||
android:strokeWidth="1.8"
|
|
||||||
android:strokeLineCap="square" />
|
|
||||||
|
|
||||||
<group>
|
|
||||||
|
|
||||||
<clip-path
|
|
||||||
android:name="eye_mask"
|
|
||||||
android:pathData="@string/path_password_eye_mask_strike_through" />
|
|
||||||
|
|
||||||
<path
|
|
||||||
android:name="eye"
|
|
||||||
android:fillColor="@android:color/white"
|
|
||||||
android:pathData="@string/path_password_eye" />
|
|
||||||
|
|
||||||
</group>
|
|
||||||
|
|
||||||
</vector>
|
|
||||||
|
|
||||||
</aapt:attr>
|
|
||||||
|
|
||||||
<target android:name="eye_mask">
|
|
||||||
|
|
||||||
<aapt:attr name="android:animation">
|
|
||||||
|
|
||||||
<objectAnimator
|
|
||||||
android:propertyName="pathData"
|
|
||||||
android:valueFrom="@string/path_password_eye_mask_strike_through"
|
|
||||||
android:valueTo="@string/path_password_eye_mask_visible"
|
|
||||||
android:duration="@integer/password_strike"
|
|
||||||
android:interpolator="@android:interpolator/fast_out_slow_in"
|
|
||||||
android:valueType="pathType" />
|
|
||||||
|
|
||||||
</aapt:attr>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target android:name="strike_through">
|
|
||||||
|
|
||||||
<aapt:attr name="android:animation">
|
|
||||||
|
|
||||||
<objectAnimator
|
|
||||||
android:propertyName="trimPathEnd"
|
|
||||||
android:valueFrom="1"
|
|
||||||
android:valueTo="0"
|
|
||||||
android:duration="@integer/password_strike"
|
|
||||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
|
||||||
|
|
||||||
</aapt:attr>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</animated-vector>
|
|
@ -1,85 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright 2015 Google Inc.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<animated-vector
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:aapt="http://schemas.android.com/aapt">
|
|
||||||
|
|
||||||
<aapt:attr name="android:drawable">
|
|
||||||
|
|
||||||
<vector
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
|
|
||||||
<path
|
|
||||||
android:name="strike_through"
|
|
||||||
android:pathData="@string/path_password_strike_through"
|
|
||||||
android:strokeColor="@android:color/white"
|
|
||||||
android:strokeWidth="1.8"
|
|
||||||
android:strokeLineCap="square" />
|
|
||||||
|
|
||||||
<group>
|
|
||||||
|
|
||||||
<clip-path
|
|
||||||
android:name="eye_mask"
|
|
||||||
android:pathData="@string/path_password_eye_mask_strike_through" />
|
|
||||||
|
|
||||||
<path
|
|
||||||
android:name="eye"
|
|
||||||
android:fillColor="@android:color/white"
|
|
||||||
android:pathData="@string/path_password_eye" />
|
|
||||||
|
|
||||||
</group>
|
|
||||||
|
|
||||||
</vector>
|
|
||||||
|
|
||||||
</aapt:attr>
|
|
||||||
|
|
||||||
<target android:name="eye_mask">
|
|
||||||
|
|
||||||
<aapt:attr name="android:animation">
|
|
||||||
|
|
||||||
<objectAnimator
|
|
||||||
android:propertyName="pathData"
|
|
||||||
android:valueFrom="@string/path_password_eye_mask_strike_through"
|
|
||||||
android:valueTo="@string/path_password_eye_mask_visible"
|
|
||||||
android:duration="@integer/password_strike"
|
|
||||||
android:interpolator="@android:interpolator/fast_out_slow_in"
|
|
||||||
android:valueType="pathType" />
|
|
||||||
|
|
||||||
</aapt:attr>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target android:name="strike_through">
|
|
||||||
|
|
||||||
<aapt:attr name="android:animation">
|
|
||||||
|
|
||||||
<objectAnimator
|
|
||||||
android:propertyName="trimPathEnd"
|
|
||||||
android:valueFrom="1"
|
|
||||||
android:valueTo="0"
|
|
||||||
android:duration="@integer/password_strike"
|
|
||||||
android:interpolator="@android:interpolator/fast_out_slow_in" />
|
|
||||||
|
|
||||||
</aapt:attr>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</animated-vector>
|
|
@ -1,29 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright 2016 Google Inc.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<vector
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
|
|
||||||
<path
|
|
||||||
android:pathData="M12,7c2.76,0 5,2.24 5,5 0,0.65 -0.13,1.26 -0.36,1.83l2.92,2.92c1.51,-1.26 2.7,-2.89 3.43,-4.75 -1.73,-4.39 -6,-7.5 -11,-7.5 -1.4,0 -2.74,0.25 -3.98,0.7l2.16,2.16C10.74,7.13 11.35,7 12,7zM2,4.27l2.28,2.28 0.46,0.46C3.08,8.3 1.78,10.02 1,12c1.73,4.39 6,7.5 11,7.5 1.55,0 3.03,-0.3 4.38,-0.84l0.42,0.42L19.73,22 21,20.73 3.27,3 2,4.27zM7.53,9.8l1.55,1.55c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.66 1.34,3 3,3 0.22,0 0.44,-0.03 0.65,-0.08l1.55,1.55c-0.67,0.33 -1.41,0.53 -2.2,0.53 -2.76,0 -5,-2.24 -5,-5 0,-0.79 0.2,-1.53 0.53,-2.2zM11.84,9.02l3.15,3.15 0.02,-0.16c0,-1.66 -1.34,-3 -3,-3l-0.17,0.01z"
|
|
||||||
android:fillColor="@android:color/white" />
|
|
||||||
|
|
||||||
</vector>
|
|
@ -1,29 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
Copyright 2016 Google Inc.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<vector
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
|
|
||||||
<path
|
|
||||||
android:pathData="@string/path_password_eye"
|
|
||||||
android:fillColor="@android:color/white" />
|
|
||||||
|
|
||||||
</vector>
|
|
@ -52,7 +52,6 @@
|
|||||||
android:layout_marginEnd="@dimen/standard_half_margin"
|
android:layout_marginEnd="@dimen/standard_half_margin"
|
||||||
android:layout_toStartOf="@id/smileyButton"
|
android:layout_toStartOf="@id/smileyButton"
|
||||||
app:errorTextAppearance="@style/ErrorAppearance"
|
app:errorTextAppearance="@style/ErrorAppearance"
|
||||||
app:passwordToggleDrawable="@drawable/asl_password_visibility"
|
|
||||||
app:passwordToggleTint="@color/grey_600">
|
app:passwordToggleTint="@color/grey_600">
|
||||||
|
|
||||||
<com.nextcloud.talk.utils.EmojiTextInputEditText
|
<com.nextcloud.talk.utils.EmojiTextInputEditText
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
~ Nextcloud Talk application
|
|
||||||
~
|
|
||||||
~ @author Mario Danic
|
|
||||||
~ Copyright (C) 2017-2019 Mario Danic <mario@lovelyhq.com>
|
|
||||||
~
|
|
||||||
~ This program is free software: you can redistribute it and/or modify
|
|
||||||
~ it under the terms of the GNU General Public License as published by
|
|
||||||
~ the Free Software Foundation, either version 3 of the License, or
|
|
||||||
~ at your option) any later version.
|
|
||||||
~
|
|
||||||
~ This program is distributed in the hope that it will be useful,
|
|
||||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
~ GNU General Public License for more details.
|
|
||||||
~
|
|
||||||
~ You should have received a copy of the GNU General Public License
|
|
||||||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<resources>
|
|
||||||
<integer name="password_strike">320</integer>
|
|
||||||
</resources>
|
|
@ -20,7 +20,7 @@
|
|||||||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources>
|
||||||
<!-- Common -->
|
<!-- Common -->
|
||||||
<string name="nc_yes">Yes</string>
|
<string name="nc_yes">Yes</string>
|
||||||
<string name="nc_no">No</string>
|
<string name="nc_no">No</string>
|
||||||
@ -424,7 +424,6 @@
|
|||||||
<string name="appbar_search_in">Search in %s</string>
|
<string name="appbar_search_in">Search in %s</string>
|
||||||
|
|
||||||
<!-- Non-translatable strings -->
|
<!-- Non-translatable strings -->
|
||||||
<string name="path_password_strike_through" translatable="false" tools:override="true">M3.27,4.27L19.74,20.74</string>
|
|
||||||
<string name="tooManyUnreadMessages" translatable="false">999+</string>
|
<string name="tooManyUnreadMessages" translatable="false">999+</string>
|
||||||
<string name="nc_action_open_main_menu">Open main menu</string>
|
<string name="nc_action_open_main_menu">Open main menu</string>
|
||||||
<string name="failed_to_save">Failed to save %1$s</string>
|
<string name="failed_to_save">Failed to save %1$s</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user