Commit 1ff3594e authored by wanglei's avatar wanglei

[新增]启动页

parent b7bb76d7
...@@ -15,7 +15,7 @@ android { ...@@ -15,7 +15,7 @@ android {
compileSdk = 35 compileSdk = 35
defaultConfig { defaultConfig {
applicationId = "com.base.appzxhy"// "com.link.play.fit.ai.test1" applicationId = "com.base.appzxhy2"// "com.link.play.fit.ai.test1"
minSdk = 24 minSdk = 24
targetSdk = 35 targetSdk = 35
versionCode = 1 versionCode = 1
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
"client_info": { "client_info": {
"mobilesdk_app_id": "1:755421476297:android:c66d8129d83b17e8af6418", "mobilesdk_app_id": "1:755421476297:android:c66d8129d83b17e8af6418",
"android_client_info": { "android_client_info": {
"package_name": "com.base.appzxhy" "package_name": "com.base.appzxhy2"
} }
}, },
"oauth_client": [], "oauth_client": [],
......
...@@ -11,18 +11,18 @@ ...@@ -11,18 +11,18 @@
android:allowBackup="true" android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules" android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules" android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/logo"
android:label="@string/app_name" android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/logo"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/Theme.LocalWeatherWhite" android:theme="@style/Theme.AppTheme"
tools:targetApi="31"> tools:targetApi="31">
<activity <activity
android:name=".ui.splash.SplashActivity" android:name=".ui.splash.SplashActivity"
android:exported="false" /> android:exported="true"
<activity android:screenOrientation="portrait"
android:name=".ui.main.MainActivity" android:theme="@style/splash.theme"
android:exported="true"> tools:ignore="DiscouragedApi,LockedOrientationActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
...@@ -30,6 +30,13 @@ ...@@ -30,6 +30,13 @@
</intent-filter> </intent-filter>
</activity> </activity>
<activity
android:name=".ui.main.MainActivity"
android:exported="false"
android:screenOrientation="portrait"
tools:ignore="DiscouragedApi,LockedOrientationActivity" />
<provider <provider
android:name="androidx.core.content.FileProvider" android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider" android:authorities="${applicationId}.provider"
......
This diff is collapsed.
...@@ -227,6 +227,7 @@ abstract class BaseActivity<VB : ViewBinding>( ...@@ -227,6 +227,7 @@ abstract class BaseActivity<VB : ViewBinding>(
} }
open fun useDefaultImmersive() { open fun useDefaultImmersive() {
setStatusBarColor()
ViewCompat.setOnApplyWindowInsetsListener(binding.root) { v, insets -> ViewCompat.setOnApplyWindowInsetsListener(binding.root) { v, insets ->
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars()) val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom) v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
......
package com.base.appzxhy.ui.splash package com.base.appzxhy.ui.splash
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.os.Bundle
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.base.appzxhy.base.BaseActivity import com.base.appzxhy.base.BaseActivity
import com.base.appzxhy.databinding.ActivitySplashBinding import com.base.appzxhy.databinding.ActivitySplashBinding
@SuppressLint("CustomSplashScreen") @SuppressLint("CustomSplashScreen")
class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding::inflate) { class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding::inflate) {
override fun useDefaultImmersive() {
setStatusBarColor()
ViewCompat.setOnApplyWindowInsetsListener(binding.root) { v, insets ->
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
v.setPadding(systemBars.left, 0, systemBars.right, systemBars.bottom)
insets
}
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
} }
\ No newline at end of file
package com.base.appzxhy.ui.splash
import androidx.lifecycle.ViewModel
class SplashViewModel: ViewModel() {
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#F8F9FA" />
<corners android:radius="20dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="@color/white"
android:endColor="@color/white"
android:angle="270"
android:centerX="0.5"
android:centerY="0.5" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:endColor="#FF3D7AF7"
android:startColor="#FF6AB4FF" />
<corners android:radius="64dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<!-- <item android:drawable="@drawable/qidongyebg" />--> <gradient
<item android:startColor="@color/white"
android:gravity="top|center_horizontal" android:endColor="@color/white"
android:top="150dp"> android:angle="270"
<!-- <bitmap android:src="@mipmap/qdylogo" />--> android:centerX="0.5"
</item> android:centerY="0.5" />
</layer-list> </shape>
\ No newline at end of file \ No newline at end of file
...@@ -2,9 +2,160 @@ ...@@ -2,9 +2,160 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".ui.splash.SplashActivity"> android:background="@drawable/bg_splash">
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guide_line"
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.2" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_logo"
android:layout_width="@dimen/dp_150"
android:layout_height="@dimen/dp_150"
android:src="@mipmap/logo"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/guide_line"
tools:ignore="ImageContrastCheck" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_20"
android:text="@string/app_name"
android:textColor="@color/black"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_logo" />
<LinearLayout
android:id="@+id/llConsent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="33dp"
android:background="@drawable/bg_f8f9fa_20"
android:orientation="vertical"
android:padding="18dp"
app:layout_constraintBottom_toTopOf="@id/cl_bottom_start"
app:layout_constraintTop_toBottomOf="@id/tvName">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/essentiona" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="8dp"
android:text="@string/consent_required"
android:textColor="#838383"
android:textSize="16sp"
tools:ignore="TextContrastCheck" />
</LinearLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_marginTop="12dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/consent"
android:textColor="#A8A8A8"
android:textSize="13sp"
tools:ignore="TextContrastCheck" />
</ScrollView>
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_bottom_start"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="52dp"
app:layout_constraintBottom_toBottomOf="parent">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_start"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="36dp"
android:layout_marginTop="16dp"
android:background="@drawable/bg_splash_button"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:text="@string/start"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_agree"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/agree"
android:textColor="@color/color_8b8b8b"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_start"
tools:ignore="TextContrastCheck" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_bottom_loading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent">
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/lottie_loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="48dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:lottie_autoPlay="true"
app:lottie_fileName="loading.json"
app:lottie_loop="true" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_involve_ad"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="56dp"
android:text="@string/involve_ad"
android:textAlignment="center"
android:textColor="@color/color_8b8b8b"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/nav_graph"
app:startDestination="@id/homeFragment">
<fragment
android:id="@+id/homeFragment"
android:name="com.base.appzxhy.ui.main.HomeFragment"
android:label="fragment_home"
tools:layout="@layout/fragment_home" />
</navigation>
\ No newline at end of file
...@@ -2,4 +2,7 @@ ...@@ -2,4 +2,7 @@
<resources> <resources>
<color name="black">#FF000000</color> <color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color> <color name="white">#FFFFFFFF</color>
<color name="color_8b8b8b">#8B8B8B</color>
</resources> </resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<dimen name="dp_300">300dp</dimen> <dimen name="dp_300">300dp</dimen>
<dimen name="dp_150">150dp</dimen>
<dimen name="dp_40">40dp</dimen>
<dimen name="dp_20">20dp</dimen>
</resources> </resources>
\ No newline at end of file
...@@ -3,5 +3,15 @@ ...@@ -3,5 +3,15 @@
<string name="facebook_app_id">4512448902756291</string> <string name="facebook_app_id">4512448902756291</string>
<string name="preparing_advertisement">Preparing advertisement</string> <string name="preparing_advertisement">Preparing advertisement</string>
<string name="involve_ad">This process may involve ad.</string>
<string name="consent_required">Consent Required</string>
<string name="consent">
During the use of this APP, we need to obtain the following information:Mobile phone model, mobile phone manufacturer,Android system version,Application version number, application version name,Package name,Google Ad ID,Mobile phone local time zone,Mobile phone photo album, empty folders, apk files, temp files, log files,Battery power, mobile phone standby time, battery temperature, battery voltage, battery technology, battery capacity, battery current, current average value of the battery
Please rest assured that we will handle your information in strict accordance with relevant laws and regulations. All the information we collect will be used reasonably to ensure the normal operation and service improvement of the APP, and we will take all necessary measures to protect the security of your personal information. Your privacy is of utmost importance to us.
</string>
<string name="start">Start</string>
<string name="agree">By continuing you are agreeing to the</string>
</resources> </resources>
\ No newline at end of file
<resources xmlns:tools="http://schemas.android.com/tools"> <resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="Base.Theme.LocalWeatherWhite" parent="Theme.Material3.DayNight.NoActionBar"> <style name="Base.Theme.BaseAppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your light theme here. -->
<!-- <item name="colorPrimary">@color/my_light_primary</item> --> <!-- 启用窗口内容过渡 -->
<!-- <item name="android:windowActivityTransitions">true</item>-->
<!-- <item name="android:windowAllowEnterTransitionOverlap">true</item>-->
<!-- <item name="android:windowAllowReturnTransitionOverlap">true</item>-->
<!-- 指定共享元素过渡样式 -->
<!-- <item name="android:windowSharedElementEnterTransition">@transition/shared_element_enter</item>-->
<!-- <item name="android:windowSharedElementExitTransition">@transition/shared_element_exit</item>-->
</style> </style>
<style name="Theme.LocalWeatherWhite" parent="Base.Theme.LocalWeatherWhite" /> <style name="Theme.AppTheme" parent="Base.Theme.BaseAppTheme">
</style>
<style name="splash.theme" parent="Theme.AppCompat.DayNight.NoActionBar"> <style name="splash.theme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- <item name="android:windowBackground">@drawable/splash_bp</item>--> <item name="android:windowBackground">@drawable/splash_bp</item>
<item name="android:windowFullscreen">false</item> <item name="android:windowFullscreen">false</item>
</style> </style>
</resources> </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