Commit 263ece91 by 王文龙

[update]完善欢迎页

parent 59ca9cf3
......@@ -4,9 +4,9 @@
<application
android:name=".MyApp"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:icon="@mipmap/ic_logo"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:roundIcon="@mipmap/ic_logo"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
......@@ -15,6 +15,7 @@
<activity
android:name=".ui.SplashActivity"
android:configChanges="keyboardHidden|screenSize|orientation"
android:theme="@style/App.Theme.Launch"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
......
package com.offcn.imclient.ui;
import android.content.Intent;
import android.os.Build;
import android.os.Handler;
import android.view.WindowManager;
import com.jyall.base.base.BaseActivity;
import com.offcn.imclient.R;
import com.offcn.imclient.util.LoginManager;
import com.offcn.live.im.util.ZGLUtils;
/**
* 闪屏页
......@@ -18,11 +21,22 @@ public class SplashActivity extends BaseActivity {
@Override
protected int getContentViewLayoutId() {
return R.layout.activity_splash;
return 0;
}
@Override
protected void initViewsAndEvents() {
if (Build.VERSION.SDK_INT >= 28) {
WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.layoutInDisplayCutoutMode
= WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
getWindow().setAttributes(lp);
}
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
......@@ -32,6 +46,12 @@ public class SplashActivity extends BaseActivity {
}
@Override
protected void onDestroy() {
super.onDestroy();
getWindow().setBackgroundDrawable(null);
}
@Override
protected void loadData() {
}
......
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:opacity="opaque">
<item android:drawable="@color/white" />
<item android:drawable="@mipmap/ic_bg_splash" />
<item android:top="-200dp">
<bitmap
android:gravity="center_horizontal"
android:src="@mipmap/ic_offcn" />
</item>
<item android:bottom="20dp">
<bitmap
android:gravity="center_horizontal|bottom"
android:src="@mipmap/ic_splash_bottom" />
</item>
</layer-list>
\ No newline at end of file
......@@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="50dp"
android:layout_margin="20dp"
android:fitsSystemWindows="true"
android:focusable="true"
android:focusableInTouchMode="true"
......
<?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:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_splash">
<TextView
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="闪屏页"/>
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="32dp"
android:src="@mipmap/ic_splash_bottom" />
</RelativeLayout>
\ No newline at end of file
<resources>
<string name="app_name">中公云信教师版</string>
<string name="app_name">在线课堂教师版</string>
<string name="push_mi_appid">2882303761518588294</string>
......
......@@ -17,4 +17,13 @@
<item name="android:textColor">@android:color/darker_gray</item>
</style>
<style name="App.Theme.Launch" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowBackground">@drawable/bg_splash</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowTranslucentNavigation">true</item>
<item name="android:windowFullscreen">true</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
</resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment