diff options
-rw-r--r-- | Android.bp | 4 | ||||
-rw-r--r-- | AndroidManifest.xml | 1 | ||||
-rw-r--r-- | java/res/anim/resolver_close_anim.xml | 26 | ||||
-rw-r--r-- | java/res/anim/resolver_launch_anim.xml | 27 | ||||
-rw-r--r-- | java/res/values/dimens.xml | 21 | ||||
-rw-r--r-- | java/res/values/styles.xml | 49 |
6 files changed, 126 insertions, 2 deletions
@@ -33,10 +33,10 @@ license { android_library { name: "IntentResolver-core", + min_sdk_version: "current", srcs: [ "java/src/**/*.java", ], - min_sdk_version: "18", resource_dirs: [ "java/res", ], @@ -55,7 +55,7 @@ android_library { android_app { name: "IntentResolver", - min_sdk_version: "18", + min_sdk_version: "current", certificate: "platform", privileged: true, required: [ diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 8469bbb9..61307f49 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -42,6 +42,7 @@ android:supportsRtl="true"> <activity android:name=".ChooserActivity" + android:theme="@style/Theme.DeviceDefault.Chooser" android:finishOnCloseSystemDialogs="true" android:excludeFromRecents="true" android:documentLaunchMode="never" diff --git a/java/res/anim/resolver_close_anim.xml b/java/res/anim/resolver_close_anim.xml new file mode 100644 index 00000000..18b52e07 --- /dev/null +++ b/java/res/anim/resolver_close_anim.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2022 The Android Open Source Project + ~ + ~ 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. + --> + +<set xmlns:android="http://schemas.android.com/apk/res/android" + android:interpolator="@android:anim/accelerate_interpolator" + android:zAdjustment="top"> + + <translate + android:fromYDelta="0" + android:toYDelta="100%" + android:duration="@android:integer/config_shortAnimTime" /> +</set> diff --git a/java/res/anim/resolver_launch_anim.xml b/java/res/anim/resolver_launch_anim.xml new file mode 100644 index 00000000..f59ed3f9 --- /dev/null +++ b/java/res/anim/resolver_launch_anim.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2022 The Android Open Source Project + ~ + ~ 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. + --> + +<!-- Animation for when a dock window at the bottom of the screen is entering. --> +<set xmlns:android="http://schemas.android.com/apk/res/android" + android:interpolator="@android:anim/accelerate_decelerate_interpolator" + android:zAdjustment="top"> + + <translate android:fromYDelta="100%" + android:toYDelta="0" + android:startOffset="@android:integer/config_shortAnimTime" + android:duration="@android:integer/config_mediumAnimTime"/> +</set> diff --git a/java/res/values/dimens.xml b/java/res/values/dimens.xml new file mode 100644 index 00000000..a0ad1c81 --- /dev/null +++ b/java/res/values/dimens.xml @@ -0,0 +1,21 @@ +<!-- + ~ Copyright (C) 2022 The Android Open Source Project + ~ + ~ 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. + --> +<resources xmlns:android="http://schemas.android.com/apk/res/android"> + <dimen name="chooser_icon_size">56dp</dimen> + <dimen name="chooser_badge_size">22dp</dimen> + <dimen name="resolver_icon_size">32dp</dimen> + <dimen name="resolver_badge_size">18dp</dimen> +</resources>
\ No newline at end of file diff --git a/java/res/values/styles.xml b/java/res/values/styles.xml new file mode 100644 index 00000000..f366cd9a --- /dev/null +++ b/java/res/values/styles.xml @@ -0,0 +1,49 @@ +<!-- + ~ Copyright (C) 2022 The Android Open Source Project + ~ + ~ 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. + --> +<resources xmlns:android="http://schemas.android.com/apk/res/android"> + + <style name="ResolverAnimation" parent="@android:style/Animation.Activity"> + <item name="android:activityOpenEnterAnimation">@anim/resolver_launch_anim</item> + <item name="android:taskOpenEnterAnimation">@anim/resolver_launch_anim</item> + <!-- Handle close for profile switching --> + <item name="android:activityOpenExitAnimation">@anim/resolver_close_anim</item> + <item name="android:taskOpenExitAnimation">@anim/resolver_close_anim</item> + </style> + <style name="Theme.DeviceDefault.ResolverCommon" + parent="@android:style/Theme.DeviceDefault.DayNight"> + <item name="android:windowAnimationStyle">@style/ResolverAnimation</item> + <item name="android:windowIsTranslucent">true</item> + <item name="android:windowNoTitle">true</item> + <item name="android:windowBackground">@android:color/transparent</item> + <item name="android:backgroundDimEnabled">true</item> + <item name="android:statusBarColor">@android:color/transparent</item> + <item name="android:windowContentOverlay">@null</item> + <!-- TODO: finish migrating these commented-out private style attributes --> +<!-- <item name="colorControlActivated">?attr/colorControlHighlight</item>--> +<!-- <item name="listPreferredItemPaddingStart">?attr/dialogPreferredPadding</item>--> +<!-- <item name="listPreferredItemPaddingEnd">?attr/dialogPreferredPadding</item>--> + <item name="android:navigationBarColor">@android:color/transparent</item> +<!-- <item name="android:iconfactoryIconSize">@dimen/resolver_icon_size</item>--> +<!-- <item name="android:iconfactoryBadgeSize">@dimen/resolver_badge_size</item>--> + </style> + <style name="Theme.DeviceDefault.Resolver" parent="Theme.DeviceDefault.ResolverCommon"> + <item name="android:windowLightNavigationBar">true</item> + </style> + <style name="Theme.DeviceDefault.Chooser" parent="Theme.DeviceDefault.Resolver"> +<!-- <item name="android:iconfactoryIconSize">@dimen/chooser_icon_size</item>--> +<!-- <item name="android:iconfactoryBadgeSize">@dimen/chooser_badge_size</item>--> + </style> +</resources> |