ولكنى اريد ان اجعلها ان تملى السكرين بالكامل بدلا من ان تقوم بعمل ايقونة وتغيير لون الخلفية فقط
هذا هو كود الناتيف الخاص بى
// android/build.gradle
buildscript {
ext {
buildToolsVersion ="31.0.0"
minSdkVersion =23// <- AndroidX splashscreen has basic support for 21 (only the background color), so 23 is best
compileSdkVersion =31// <- set at least 31
targetSdkVersion =31// <- set at least 31// …/////////////////////////////////////////////////////values/styles.xml<resources><style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar"><!--Your base theme customization --></style><!--BootTheme should inherit from Theme.SplashScreen--><style name="BootTheme" parent="Theme.SplashScreen"><item name="windowSplashScreenBackground">@color/bootsplash_background</item><item name="windowSplashScreenAnimatedIcon">@mipmap/bootsplash_logo</item><item name="postSplashScreenTheme">@style/AppTheme</item></style></resources>////////////////////////////////////////AndroidManifest <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.rnbootsplashexample"><!--…--><application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/BootTheme"><!--Replace@style/AppTheme with @style/BootTheme--><!--…--></application></manifest>////////////////////////////////////////MainActivity import com.facebook.react.ReactActivity;import com.facebook.react.ReactActivityDelegate;import com.facebook.react.ReactRootView;import com.zoontek.rnbootsplash.RNBootSplash;// <- add this necessary importpublicclassMainActivity extends ReactActivity{// …publicstaticclassMainActivityDelegate extends ReactActivityDelegate{// …@Overrideprotectedvoid loadApp(String appKey){RNBootSplash.init(getPlainActivity());// <- initialize the splash screen
super.loadApp(appKey);}}}
السؤال
أحمد عبد الله2
السلام عليكم وعيد مبارك
انا استخدم هذه المكتبة
react-native-bootsplash
ولكنى اريد ان اجعلها ان تملى السكرين بالكامل بدلا من ان تقوم بعمل ايقونة وتغيير لون الخلفية فقط
هذا هو كود الناتيف الخاص بى
رابط هذا التعليق
شارك على الشبكات الإجتماعية
1 جواب على هذا السؤال
Recommended Posts
انضم إلى النقاش
يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.