android - 无法更改颤动中默认启动屏幕图标的大小
问题描述
我正在使用颤振提供的默认启动画面。应用程序图标显示在屏幕中间。但它看起来非常小。如果我转到launch_background.xml
,我无法更改位图的大小属性。如何更改位图的大小?
launch_background.xml
看起来像这样:
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<item>
<bitmap
android:gravity="center"
android:src="@drawable/dev_icon" />
</item>
</layer-list>
我提到了这个,但没有用。
任何帮助表示赞赏。我是一个完整的 Flutter 初学者。
解决方案
在你的main函数里面,使用home作为SplashScreen(_),参数如下,改变logo大小。
runApp(MaterialApp(
home: CustomSplash(
imagePath: '@drawable/dev_icon',
backGroundColor: Colors.deepOrange,
animationEffect: 'zoom-in',
logoSize: 200,
home: MyApp(),
customFunction: duringSplash,
duration: 2500,
type: CustomSplashType.StaticDuration,
outputAndHome: op,
),
推荐阅读
- html - 如何为具有全尺寸背景的登录表单设置模糊、居中和响应框的样式?
- docker - 如何通过 Dockerfile 使用 docker run 中传递的动态值创建属性文件?
- bots - 微软团队机器人是否有必要公开访问?
- r - 着色R中图的重叠
- angularjs - 在 AngularJS 中使用 $http 将数据传递给控制器
- machine-learning - 如何修复pycharm中导入tf包的这个错误
- cucumber - 场景.getid 没有返回功能名称
- c# - Lambda 表达式:在 foreach 语句内部还是外部?
- amazon-web-services - 无法访问我的 Amazon S3 存储桶上的跨域内容
- java - CRUDRepository::delete 静默执行,而执行应该违反 FK 并抛出异常