-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make ExpandableText respect enabled state, use a CheckBox as widget
- Loading branch information
Showing
6 changed files
with
64 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 0 additions & 33 deletions
33
library/src/main/res/drawable/map_animated_expand_vector_selector.xml
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
library/src/main/res/drawable/map_collapse_to_expand_animation.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:aapt="http://schemas.android.com/aapt" | ||
android:drawable="@drawable/map_ic_collapse_24dp"> | ||
<target android:name="path"> | ||
<aapt:attr name="android:animation"> | ||
<set> | ||
<objectAnimator | ||
android:duration="@android:integer/config_shortAnimTime" | ||
android:propertyName="pathData" | ||
android:valueFrom="@string/path_ic_collapse" | ||
android:valueTo="@string/path_ic_expand" | ||
android:valueType="pathType" /> | ||
</set> | ||
</aapt:attr> | ||
</target> | ||
</animated-vector> |
18 changes: 18 additions & 0 deletions
18
library/src/main/res/drawable/map_expand_animated_selector.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<animated-selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item | ||
android:id="@+id/map_btn_checked" | ||
android:drawable="@drawable/map_ic_collapse_24dp" | ||
android:state_checked="true" /> | ||
<item | ||
android:id="@+id/map_btn_unchecked" | ||
android:drawable="@drawable/map_ic_expand_24dp" /> | ||
<transition | ||
android:drawable="@drawable/map_expand_to_collapse_animation" | ||
android:fromId="@id/map_btn_unchecked" | ||
android:toId="@id/map_btn_checked" /> | ||
<transition | ||
android:drawable="@drawable/map_collapse_to_expand_animation" | ||
android:fromId="@id/map_btn_checked" | ||
android:toId="@id/map_btn_unchecked" /> | ||
</animated-selector> |
17 changes: 17 additions & 0 deletions
17
library/src/main/res/drawable/map_expand_to_collapse_animation.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:aapt="http://schemas.android.com/aapt" | ||
android:drawable="@drawable/map_ic_expand_24dp"> | ||
<target android:name="path"> | ||
<aapt:attr name="android:animation"> | ||
<set> | ||
<objectAnimator | ||
android:duration="@android:integer/config_shortAnimTime" | ||
android:propertyName="pathData" | ||
android:valueFrom="@string/path_ic_expand" | ||
android:valueTo="@string/path_ic_collapse" | ||
android:valueType="pathType" /> | ||
</set> | ||
</aapt:attr> | ||
</target> | ||
</animated-vector> |
12 changes: 5 additions & 7 deletions
12
library/src/main/res/layout/map_preference_widget_expand_arrow.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.appcompat.widget.AppCompatImageView xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
<CheckBox xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:minWidth="32dp" | ||
android:scaleType="center" | ||
android:src="@drawable/map_animated_expand_vector_selector" | ||
android:tint="?android:textColorPrimary" | ||
tools:ignore="ContentDescription" /> | ||
android:background="@null" | ||
android:button="@drawable/map_expand_animated_selector" | ||
android:buttonTint="?android:textColorPrimary" | ||
android:clickable="false" /> |