提交UI改变

This commit is contained in:
2024-10-09 16:39:02 +08:00
parent d79dba045d
commit bf8268712b
42 changed files with 436 additions and 330 deletions

View File

@@ -6,10 +6,13 @@ import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Matrix;
import android.graphics.RectF;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.Parcelable;
import android.text.TextUtils;
import android.util.Log;
import android.view.Gravity;
@@ -25,6 +28,7 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.app.ActivityOptionsCompat;
import androidx.core.app.NotificationManagerCompat;
import androidx.core.app.SharedElementCallback;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.fastjson.JSON;
@@ -131,8 +135,8 @@ 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.mipmap.screen, mCover);
mHandler = new Handler() {
// ImgLoader.display(mContext, R.mipmap.screen, mCover);
mHandler = new Handler(getMainLooper()) {
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
@@ -152,6 +156,14 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
e.printStackTrace();
}
SpUtil.getInstance().setBooleanValue("NOTIFICATION", NotificationManagerCompat.from(this).areNotificationsEnabled());
setExitSharedElementCallback(new SharedElementCallback() {
@Override
public Parcelable onCaptureSharedElementSnapshot(View sharedElement, Matrix viewToGlobalMatrix, RectF screenBounds) {
sharedElement.setAlpha(1);
return super.onCaptureSharedElementSnapshot(sharedElement, viewToGlobalMatrix, screenBounds);
}
});
}
@@ -267,8 +279,9 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
IMLoginManager.get(this).upDataUserInfo();
} else {
releaseVideo();
this.startActivity(new Intent(this, EntryActivity.class));
this.finish();
Bundle bundle = ActivityOptionsCompat.makeSceneTransitionAnimation(this, findViewById(R.id.app_logo), findViewById(R.id.app_logo).getTransitionName()).toBundle();
this.startActivity(new Intent(this, EntryActivity.class),bundle);
new Handler(getMainLooper()).postDelayed(this::finish,1000);
}
}
@@ -588,8 +601,9 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
forwardMainActivity();
} else {
releaseVideo();
this.startActivity(new Intent(this, EntryActivity.class));
this.finish();
Bundle bundle = ActivityOptionsCompat.makeSceneTransitionAnimation(this, findViewById(R.id.app_logo), findViewById(R.id.app_logo).getTransitionName()).toBundle();
this.startActivity(new Intent(this, EntryActivity.class),bundle);
new Handler(getMainLooper()).postDelayed(this::finish,1000);
}
}
}

View File

@@ -9,7 +9,7 @@
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000" />
android:background="#fff" />
<FrameLayout
android:id="@+id/btn_skip_img"
@@ -53,12 +53,50 @@
android:textColor="@color/white"
android:textSize="11sp"
android:visibility="invisible" />
<ImageView
<!--原来的启动页图片-->
<!-- <ImageView
android:id="@+id/cover"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:scaleType="centerCrop" />
android:scaleType="centerCrop" />-->
<!--新启动页-->
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/cover"
android:layout_width="match_parent"
android:layout_height="342dp"
android:scaleType="centerCrop"
android:src="@mipmap/bg_app_launch"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/app_logo"
android:transitionName="app_logo"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:orientation="vertical"
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@mipmap/ic_app_launch_logo" />
<ImageView
android:layout_width="match_parent"
android:layout_marginTop="20dp"
android:layout_height="wrap_content"
app:srcCompat="@mipmap/ic_app_launch_name" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">PDLIVE</string>
<string name="app_name">HOSO</string>
<string name="leak_canary_test_class_name">assertk.Assert</string>
</resources>