diff options
Diffstat (limited to 'app/src/main/res/xml')
-rw-r--r-- | app/src/main/res/xml/activity_motion_test_scene.xml | 45 | ||||
-rw-r--r-- | app/src/main/res/xml/item_post_with_preview_scene.xml | 26 | ||||
-rw-r--r-- | app/src/main/res/xml/theme_preferences.xml | 17 |
3 files changed, 85 insertions, 3 deletions
diff --git a/app/src/main/res/xml/activity_motion_test_scene.xml b/app/src/main/res/xml/activity_motion_test_scene.xml new file mode 100644 index 00000000..d271b2e1 --- /dev/null +++ b/app/src/main/res/xml/activity_motion_test_scene.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<MotionScene xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:motion="http://schemas.android.com/apk/res-auto"> + + <Transition + android:id="@+id/transition_to_end" + motion:constraintSetStart="@+id/start" + motion:constraintSetEnd="@+id/end" + motion:autoTransition="animateToStart" + motion:duration="100"> + <OnSwipe + motion:touchAnchorId="@+id/button" + motion:touchAnchorSide="right" + motion:onTouchUp="autoCompleteToEnd" + motion:dragDirection="dragRight" /> + </Transition> + + <Transition + android:id="@+id/transition_to_start" + motion:constraintSetStart="@+id/end" + motion:constraintSetEnd="@+id/start" + motion:autoTransition="animateToEnd"> + </Transition> + + <ConstraintSet android:id="@+id/start"> + <Constraint + android:id="@+id/button" + android:layout_width="64dp" + android:layout_height="64dp" + motion:layout_constraintBottom_toBottomOf="parent" + motion:layout_constraintStart_toStartOf="parent" + motion:layout_constraintTop_toTopOf="parent" /> + </ConstraintSet> + + <ConstraintSet android:id="@+id/end"> + <Constraint + android:id="@+id/button" + android:layout_width="64dp" + android:layout_height="64dp" + motion:layout_constraintBottom_toBottomOf="parent" + motion:layout_constraintStart_toEndOf="parent" + motion:layout_constraintTop_toTopOf="parent"/> + </ConstraintSet> + +</MotionScene> diff --git a/app/src/main/res/xml/item_post_with_preview_scene.xml b/app/src/main/res/xml/item_post_with_preview_scene.xml new file mode 100644 index 00000000..dc28317a --- /dev/null +++ b/app/src/main/res/xml/item_post_with_preview_scene.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<MotionScene xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> + + <ConstraintSet android:id="@+id/start"> + <Constraint android:id="@+id/material_card_view_item_post_with_preview" /> + </ConstraintSet> + + <ConstraintSet android:id="@+id/end"> + <Constraint android:id="@id/material_card_view_item_post_with_preview" + android:layout_width="0dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintWidth_percent="0.7" /> + </ConstraintSet> + + <Transition + app:constraintSetEnd="@id/end" + app:constraintSetStart="@+id/start"> + + <OnSwipe + app:dragDirection="dragRight" + app:touchAnchorId="@id/material_card_view_item_post_with_preview" + app:touchAnchorSide="right" /> + + </Transition> +</MotionScene> diff --git a/app/src/main/res/xml/theme_preferences.xml b/app/src/main/res/xml/theme_preferences.xml index 3f726ec0..6bac18e4 100644 --- a/app/src/main/res/xml/theme_preferences.xml +++ b/app/src/main/res/xml/theme_preferences.xml @@ -12,6 +12,7 @@ <SwitchPreference app:defaultValue="false" app:key="amoled_dark" + app:icon="@drawable/ic_amoled_theme_preference_24dp" app:title="@string/settings_amoled_dark_title" /> <PreferenceCategory @@ -40,9 +41,19 @@ app:icon="@drawable/ic_edit_24dp" app:title="@string/settings_manage_themes_title" /> + <Preference + app:icon="@drawable/ic_info_preference_24dp" + app:summary="@string/settings_custom_theme_cannot_apply_to_settings_page_summary" + app:enabled="false" /> + <PreferenceCategory app:title="@string/settings_category_material_you_title" /> + <Preference + app:icon="@drawable/ic_info_preference_24dp" + app:summary="@string/settings_enable_material_you_warning_summary" + app:enabled="false" /> + <SwitchPreference app:defaultValue="false" app:key="enable_material_you" @@ -50,8 +61,8 @@ app:summary="@string/settings_enable_material_you_summary" /> <Preference - app:icon="@drawable/ic_info_preference_24dp" - app:summary="@string/settings_custom_theme_cannot_apply_to_settings_page_summary" - app:enabled="false" /> + app:key="apply_material_you" + app:title="@string/settings_apply_material_you_title" + app:summary="@string/settings_apply_material_you_summary" /> </PreferenceScreen>
\ No newline at end of file |