diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 5aad9dc44..4eecd4c63 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -128,12 +128,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
diff --git a/app/src/main/java/com/shayu/phonelive/AppContext.java b/app/src/main/java/com/shayu/phonelive/AppContext.java
index 9069a94f4..75859c9c9 100644
--- a/app/src/main/java/com/shayu/phonelive/AppContext.java
+++ b/app/src/main/java/com/shayu/phonelive/AppContext.java
@@ -144,10 +144,12 @@ public class AppContext extends CommonAppContext {
@Override
public void onCreate() {
- super.onCreate();
if (!isMainProcess()) {
return;
}
+ super.onCreate();
+ long startTime = System.currentTimeMillis();
+ Log.d("AppStart AppContext", "App start time: " + startTime);
CrashSaveBean.getInstance().setStartTime(System.currentTimeMillis());
//注册全局异常捕获
registerError();
diff --git a/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java b/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java
index 3e053fb47..50048f80b 100644
--- a/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java
+++ b/app/src/main/java/com/shayu/phonelive/activity/LauncherActivity.java
@@ -119,9 +119,9 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
protected void onCreate(@Nullable Bundle savedInstanceState) {
getWindow().requestFeature(Window.FEATURE_ACTIVITY_TRANSITIONS);
super.onCreate(savedInstanceState);
- EventBus.getDefault().register(this);
- setStatusBar();
setContentView(R.layout.activity_launcher);
+ EventBus.getDefault().register(this);
+// setStatusBar();
mContext = this;
mRoot = findViewById(R.id.root);
mCover = findViewById(R.id.cover);
@@ -131,7 +131,6 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
mBtnSkipVideo = findViewById(R.id.btn_skip_video);
mBtnSkipImage.setOnClickListener(this);
mBtnSkipVideo.setOnClickListener(this);
-// ImgLoader.display(mContext, R.drawable.screen, mCover);
mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
@@ -145,6 +144,7 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
}
}
};
+
mHandler.sendEmptyMessageDelayed(WHAT_GET_CONFIG, 1000);
try {
LogUtil.uploadErrorLog(AppContext.sInstance);
@@ -188,9 +188,11 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
* 获取Config信息
*/
private void getConfig() {
+ // TODO 这里花了1.5s
CommonHttpUtil.getConfig(mContext, new CommonCallback() {
@Override
public void callback(ConfigBean bean) {
+
if (bean != null) {
L.e(TAG, "----------> getPaster360Url:" + bean.getBeautyKey() + " " + bean.getPaster360Url());
CommonAppConfig.getInstance().setBeautySdkType(bean.getSproutType());
@@ -220,7 +222,7 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
final String uid = uidAndToken[0];
final String token = uidAndToken[1];
if (!TextUtils.isEmpty(uid) && !TextUtils.isEmpty(token)) {
- playAD(obj.getIntValue("type") == 0);
+// playAD(obj.getIntValue("type") == 0);
} else {
releaseVideo();
LauncherActivity.this.startActivity(new Intent(LauncherActivity.this, EntryActivity.class));
@@ -235,6 +237,7 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
} else {
checkUidAndToken();
}
+
} else {
ToastUtil.show(getString(R.string.net_error));
}
@@ -423,6 +426,7 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
ImageView imageView = new ImageView(mContext);
imageView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
+// imageView.setScaleType(ImageView.ScaleType.FIT_XY);
imageView.setBackgroundColor(0xffffffff);
imageView.setTransitionName("ad_img_" + i);
mImageViewList.add(imageView);
diff --git a/app/src/main/java/com/shayu/phonelive/activity/TestActivity.java b/app/src/main/java/com/shayu/phonelive/activity/TestActivity.java
new file mode 100644
index 000000000..13f6d2935
--- /dev/null
+++ b/app/src/main/java/com/shayu/phonelive/activity/TestActivity.java
@@ -0,0 +1,43 @@
+package com.shayu.phonelive.activity;
+
+import android.annotation.SuppressLint;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+import android.view.ViewTreeObserver;
+
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.constraintlayout.widget.ConstraintLayout;
+
+import myname.pdlive.shayu.R;
+
+
+public class TestActivity extends AppCompatActivity {
+ @Override
+ protected void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_test);
+ ConstraintLayout constraintLayout = findViewById(R.id.root_view);
+
+ View decorView = getWindow().getDecorView();
+ decorView.setSystemUiVisibility(
+ View.SYSTEM_UI_FLAG_FULLSCREEN |
+ View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
+ View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
+ );
+
+ ViewTreeObserver vto = constraintLayout.getViewTreeObserver();
+ vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
+ @Override
+ public void onGlobalLayout() {
+ // 移除监听器,避免重复调用
+ constraintLayout.getViewTreeObserver().removeOnGlobalLayoutListener(this);
+
+ int width = constraintLayout.getWidth();
+ int height = constraintLayout.getHeight();
+ Log.d("TestActivity", "Width: " + width + ", Height: " + height);
+ }
+ });
+ }
+}
diff --git a/app/src/main/res/drawable-xxhdpi/icon_new_splash.9.png b/app/src/main/res/drawable-xxhdpi/icon_new_splash.9.png
new file mode 100644
index 000000000..57d791aa2
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_new_splash.9.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/screen.9.png b/app/src/main/res/drawable-xxhdpi/screen.9.png
new file mode 100644
index 000000000..292820908
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/screen.9.png differ
diff --git a/app/src/main/res/drawable/test.xml b/app/src/main/res/drawable/test.xml
new file mode 100644
index 000000000..4a544104e
--- /dev/null
+++ b/app/src/main/res/drawable/test.xml
@@ -0,0 +1,14 @@
+
+
+ -
+
+
+
+
+ -
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_launcher.xml b/app/src/main/res/layout/activity_launcher.xml
index 06cd78a7f..a0f6286c2 100644
--- a/app/src/main/res/layout/activity_launcher.xml
+++ b/app/src/main/res/layout/activity_launcher.xml
@@ -2,6 +2,8 @@
@@ -52,13 +54,13 @@
android:text="@string/recommend_skip"
android:textColor="@color/white"
android:textSize="11sp"
- android:visibility="invisible" />
+ android:visibility="invisible"
+ />
diff --git a/app/src/main/res/layout/activity_test.xml b/app/src/main/res/layout/activity_test.xml
new file mode 100644
index 000000000..0e7d957d8
--- /dev/null
+++ b/app/src/main/res/layout/activity_test.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
diff --git a/app/src/main/res/mipmap-xxxhdpi/logo_middle.webp b/app/src/main/res/mipmap-xxxhdpi/logo_middle.webp
new file mode 100644
index 000000000..1b74d7847
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/logo_middle.webp differ
diff --git a/app/src/main/res/drawable/screen.9.png b/app/src/main/res/mipmap-xxxhdpi/screen.9.png
similarity index 100%
rename from app/src/main/res/drawable/screen.9.png
rename to app/src/main/res/mipmap-xxxhdpi/screen.9.png
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index bb04d00fe..f7fb7a5e0 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -1,12 +1,9 @@
-
-
\ No newline at end of file
diff --git a/common/src/main/res/values/style.xml b/common/src/main/res/values/style.xml
index 190d8d7e2..0dfa16a69 100644
--- a/common/src/main/res/values/style.xml
+++ b/common/src/main/res/values/style.xml
@@ -1,7 +1,8 @@
-