我的应用程序在加载时显示启动画面。我想在启动画面的图标下方放置一个动态进度条。我尝试使用XML,但它崩溃了!提示无效的标签progressbar。
这是我的调用启动画面的代码,在styles.xml中:
这是我的background_splash.xml文件。
我不太想使用其他方法来制作启动画面,因为这种方法非常简单。你有什么想法吗?
这是我的调用启动画面的代码,在styles.xml中:
<style name="AppTheme.BrandedLaunch" parent="AppThemeDark">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowBackground">@drawable/background_splash</item>
</style>
这是我的background_splash.xml文件。
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@color/splash_screen_bg"/>
<item>
<bitmap
android:gravity="center"
android:tileMode="disabled"
android:src="@drawable/ic_launcher"/>
</item>
<item>
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
/>
</item>
</layer-list>
我不太想使用其他方法来制作启动画面,因为这种方法非常简单。你有什么想法吗?