修改启动动画
按照官方提供的文档进行修改后,
在开发者的app module下 res/anim下新建下面四个动画资源
dcloud_unimp_close_exit dcloud_unimp_open_enter dcloud_unimp_host_close_exit dcloud_unimp_host_open_enter
宿主页面A,小程序页面B, 自定义了从左向右的跳转方式
出现:A->黑屏->B ,
后来,想了下,
中间加上IDCUniMPAppSplashView页面,但是自定义的跳转动画(从左到右进入),A->黑屏(一闪而逝)->IDCUniMPAppSplashView->B
用的自定义跳转XML如下:
<?xml version ="1.0" encoding ="utf-8"?><!-- Learn More about how to use App Actions: https://developer.android.com/guide/actions/index.html -->
<set xmlns:android="http://schemas.android.com/apk/res/android" android:background="#ffffff" android:zAdjustment="top">
<!-- 页面从左侧向右侧进入 -->
<translate
android:fromXDelta="100%"
android:toXDelta="0"
android:duration="200">
</translate>
</set>
搜索到相关问题的回答都是说把要跳转的activity背景设置为透明,但是现在根本拿不到小程序SDK对应的activity,求解。
4 个回复
5***@qq.com
请问解决了嘛
龍耗子
dcloud_unimp_close_exit
dcloud_unimp_host_close_exit
dcloud_unimp_host_open_enter
dcloud_unimp_open_enter
试试这个,左边退出右边进入,IDCUniMPAppSplashView自定义背景白色,或者加载动画
1***@163.com - LTtongxue
请问解决了嘛
z***@gmail.com
可以尝试以下步骤:
zip
的方式解压uniMPSDK-V2-release.aar
uniMPSDK-V2-release
目录下找到res\anim
res\anim
目录下的相关动画zip
的方式重新打包修改后的uniMPSDK-V2-release
文件夹,并修改后缀名为.aar
相关动画文件:
dcloud_unimp_host_open_enter.xml
dcloud_unimp_host_close_exit.xml
dcloud_unimp_open_enter.xml
dcloud_unimp_close_exit.xml
如果你需要像页面跳转一样的动画,也可以用这个文件夹下内置的去替换,比如:
dcloud_page_open_enter.xml
dcloud_page_open_exit.xml
dcloud_page_close_enter.xml
dcloud_page_close_exit.xml
这个文件夹下还包括很多动画,可以使用任意一种,或者自己写
注:使用
uni-unimp
插件的,uniMPSDK-V2-release.aar
在其插件目录下的utssdk\app-android\libs
文件夹下