Splash Screen to a React Native App
icomoon:用于生成不同的icon font/svg icon IOS(xcode)随着iOS开发发展至今,在UI制作上大概分为三个流派:1.使用代码手写UI和布局 xcode制作splash screen:
方法一:
方法二:删除LaunchScreen.xib文件,“Launch Images Source” and click “Use Asset Catalog…”,删除Launch Screen Files中选择的LaunchScreen
image gorilla上生成的不同分辨率的图片文件夹 -> IOS -> Resources -> splash -> 所有图片导入到Images xcassets -> LaunchImage。 Android(Android studio)open splashScreenDemo/android 方法一:
导入到Android/app/res目录下
` <item> <bitmap android:gravity="fill" android:src="@drawable/screen(改名字跟drawable-*下面的图片name是一致的)"/> </item> `
<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar"> <item name="android:windowBackground">@drawable/splash</item> </style>
public class SplashActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Intent intent = new Intent(this,MainActivity.class); startActivity(intent); finish(); } }
<activity android:name=".SplashActivity" android:label="@string/app_name" android:theme="@style/SplashTheme"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> 启动Android APP就会看到splash screen了。 方法二:
当图片需要合成时,则需要自己再去写样式 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/screen"> <ImageView android:id="@+id/logo" android:layout_width="95dp" android:layout_height="70dp" android:src="@drawable/copyright" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" android:layout_marginRight="10dp" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Powered By: " android:textSize="12dp" android:textColor="#C0C0C0" android:layout_toLeftOf="@id/logo" android:layout_alignBottom="@id/logo" android:layout_marginBottom="20dp" /> </RelativeLayout> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |