海绵1024
海绵1024
  • 发布:2022-11-29 14:43
  • 更新:2023-10-26 11:26
  • 阅读:510

Uni小程序SDK,android中修改启动动画出现一闪而逝的黑屏问题

分类:uni小程序sdk

修改启动动画
按照官方提供的文档进行修改后,
在开发者的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,求解。

2022-11-29 14:43 负责人:无 分享
已邀请:
5***@qq.com

5***@qq.com

请问解决了嘛

龍耗子

龍耗子

dcloud_unimp_close_exit

<set xmlns:tools="http://schemas.android.com/tools"  
    xmlns:android="http://schemas.android.com/apk/res/android"  
    tools:ignore="MissingDefaultResource"  
    android:duration="200">  
    <translate  android:fromXDelta="0%p" android:toXDelta="100%p"/>  
</set>

dcloud_unimp_host_close_exit

<set xmlns:tools="http://schemas.android.com/tools"  
    xmlns:android="http://schemas.android.com/apk/res/android"  
    tools:ignore="MissingDefaultResource"  
    android:duration="200">  
    <translate android:fromXDelta="0%p" android:toXDelta="-100%p"/>  
</set>

dcloud_unimp_host_open_enter

<set xmlns:tools="http://schemas.android.com/tools"  
    xmlns:android="http://schemas.android.com/apk/res/android"  
    tools:ignore="MissingDefaultResource"  
    android:duration="200">  
    <translate  android:fromXDelta="100%p" android:toXDelta="0%p"/>  
</set>

dcloud_unimp_open_enter

<set xmlns:tools="http://schemas.android.com/tools"  
    xmlns:android="http://schemas.android.com/apk/res/android"  
    tools:ignore="MissingDefaultResource"  
    android:duration="200">  
    <translate  android:fromXDelta="-100%p" android:toXDelta="0%p"/>  
</set>

试试这个,左边退出右边进入,IDCUniMPAppSplashView自定义背景白色,或者加载动画

1***@163.com

1***@163.com - LTtongxue

请问解决了嘛

要回复问题请先登录注册