Commit e21675e6 authored by wanglei's avatar wanglei

[拆包]修改启动页UI

parent 5d946544
...@@ -21,6 +21,7 @@ import androidx.lifecycle.lifecycleScope ...@@ -21,6 +21,7 @@ import androidx.lifecycle.lifecycleScope
import com.base.appzxhy.GlobalConfig.URL_PRIVACY import com.base.appzxhy.GlobalConfig.URL_PRIVACY
import com.base.appzxhy.GlobalConfig.URL_USE import com.base.appzxhy.GlobalConfig.URL_USE
import com.base.appzxhy.MyApplication import com.base.appzxhy.MyApplication
import com.base.appzxhy.R
import com.base.appzxhy.SpConstObject.ifAgreePrivacy import com.base.appzxhy.SpConstObject.ifAgreePrivacy
import com.base.appzxhy.SpConstObject.isGuided import com.base.appzxhy.SpConstObject.isGuided
import com.base.appzxhy.base.BaseActivity import com.base.appzxhy.base.BaseActivity
...@@ -99,7 +100,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding ...@@ -99,7 +100,7 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
private fun setPrivacyPolicy() { private fun setPrivacyPolicy() {
val spannableString = SpannableString("privacy") val spannableString = SpannableString(getString(R.string.privacy_policy))
spannableString.setSpan(UnderlineSpan(), 0, spannableString.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE) spannableString.setSpan(UnderlineSpan(), 0, spannableString.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
spannableString.setSpan(object : ClickableSpan() { spannableString.setSpan(object : ClickableSpan() {
override fun onClick(widget: View) { override fun onClick(widget: View) {
...@@ -109,19 +110,19 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding ...@@ -109,19 +110,19 @@ class SplashActivity : BaseActivity<ActivitySplashBinding>(ActivitySplashBinding
binding.tvPrivacy.text = spannableString binding.tvPrivacy.text = spannableString
binding.tvPrivacy.movementMethod = LinkMovementMethod.getInstance() binding.tvPrivacy.movementMethod = LinkMovementMethod.getInstance()
binding.tvPrivacy.setLinkTextColor("#2DD29E".toColorInt()) binding.tvPrivacy.setLinkTextColor("#0456ED".toColorInt())
val spannableString2 = SpannableString("terms of service") // val spannableString2 = SpannableString("terms of service")
spannableString2.setSpan(UnderlineSpan(), 0, spannableString2.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE) // spannableString2.setSpan(UnderlineSpan(), 0, spannableString2.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
spannableString2.setSpan(object : ClickableSpan() { // spannableString2.setSpan(object : ClickableSpan() {
override fun onClick(widget: View) { // override fun onClick(widget: View) {
startActivity(Intent(Intent.ACTION_VIEW, URL_USE.toUri())) // startActivity(Intent(Intent.ACTION_VIEW, URL_USE.toUri()))
} // }
}, 0, spannableString2.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE) // }, 0, spannableString2.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
//
binding.tvTerms.text = spannableString2 // binding.tvTerms.text = spannableString2
binding.tvTerms.movementMethod = LinkMovementMethod.getInstance() // binding.tvTerms.movementMethod = LinkMovementMethod.getInstance()
binding.tvTerms.setLinkTextColor("#2DD29E".toColorInt()) // binding.tvTerms.setLinkTextColor("#2DD29E".toColorInt())
} }
......
...@@ -14,7 +14,7 @@ import java.util.Set; ...@@ -14,7 +14,7 @@ import java.util.Set;
public class AppPreferences { public class AppPreferences {
private static AppPreferences sInstance; private static AppPreferences sInstance;
private final SharedPreferences sharedPreferences; private final SharedPreferences sharedPreferences;
private static final String PREF_FILE_NAME = "app_prefs"; // 偏好文件名 private static final String PREF_FILE_NAME = "super_app_prefs"; // 偏好文件名
private AppPreferences(Context context) { private AppPreferences(Context context) {
sharedPreferences = context.getSharedPreferences(PREF_FILE_NAME, Context.MODE_PRIVATE); sharedPreferences = context.getSharedPreferences(PREF_FILE_NAME, Context.MODE_PRIVATE);
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#F8F9FA" /> <solid android:color="#F8F9FA" />
<corners android:radius="20dp" /> <corners android:radius="@dimen/dp_20" />
</shape> </shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!--<shape xmlns:android="http://schemas.android.com/apk/res/android">--> <?xml version="1.0" encoding="utf-8"?>
<!-- <gradient--> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<!-- android:angle="270"--> <gradient
<!-- android:centerColor="#D4E6FA"--> android:angle="270"
<!-- android:centerX="0.1"--> android:centerX="0.1"
<!-- android:centerY="0.5"--> android:centerY="0.5"
<!-- android:endColor="@color/white"--> android:endColor="@color/white"
<!-- android:startColor="#C5D8F6"--> android:startColor="@color/white"
<!-- android:type="linear" />--> android:type="linear" />
</shape><!--<layer-list xmlns:android="http://schemas.android.com/apk/res/android">-->
<!--</shape>--> <!-- <item>-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <!-- <bitmap android:src="@drawable/bg_bg_splash" />-->
<item> <!-- </item>-->
<bitmap android:src="@drawable/bg_bg_splash" /> <!--</layer-list>-->
</item> \ No newline at end of file
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient <gradient
android:endColor="@color/colorPrimary" android:endColor="#0456ED"
android:startColor="@color/colorPrimary" /> android:startColor="#68D2FF" />
<corners android:radius="@dimen/dp_10" /> <corners android:radius="@dimen/dp_60" />
</shape> </shape>
\ No newline at end of file
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
android:id="@+id/iv_logo" android:id="@+id/iv_logo"
android:layout_width="@dimen/dp_136" android:layout_width="@dimen/dp_136"
android:layout_height="@dimen/dp_136" android:layout_height="@dimen/dp_136"
android:src="@mipmap/logo" android:src="@mipmap/logo_corners"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/guide_line" app:layout_constraintTop_toBottomOf="@id/guide_line"
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
android:layout_width="@dimen/dp_306" android:layout_width="@dimen/dp_306"
android:layout_height="@dimen/dp_180" android:layout_height="@dimen/dp_180"
android:layout_marginHorizontal="33dp" android:layout_marginHorizontal="33dp"
android:background="@drawable/bg_fbfbfb_20" android:background="@drawable/bg_f8f9fa_20"
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintBottom_toTopOf="@id/cl_bottom_start" app:layout_constraintBottom_toTopOf="@id/cl_bottom_start"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
...@@ -78,7 +78,8 @@ ...@@ -78,7 +78,8 @@
<ScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="12dp"> android:layout_marginTop="@dimen/dp_12"
android:layout_marginBottom="@dimen/dp_12">
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -86,7 +87,7 @@ ...@@ -86,7 +87,7 @@
android:layout_marginHorizontal="@dimen/dp_20" android:layout_marginHorizontal="@dimen/dp_20"
android:gravity="center" android:gravity="center"
android:text="@string/consent" android:text="@string/consent"
android:textColor="#1A1A1A" android:textColor="#A8A8A8"
android:textSize="@dimen/sp_12" android:textSize="@dimen/sp_12"
tools:ignore="TextContrastCheck" /> tools:ignore="TextContrastCheck" />
</ScrollView> </ScrollView>
...@@ -105,15 +106,16 @@ ...@@ -105,15 +106,16 @@
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvStart" android:id="@+id/tvStart"
android:layout_width="@dimen/dp_260" android:layout_width="match_parent"
android:layout_height="@dimen/dp_55" android:layout_height="@dimen/dp_55"
android:layout_marginHorizontal="@dimen/dp_35"
android:layout_marginTop="@dimen/dp_20" android:layout_marginTop="@dimen/dp_20"
android:background="@drawable/bg_splash_button" android:background="@drawable/bg_splash_button"
android:gravity="center" android:gravity="center"
android:text="@string/start" android:text="@string/start"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="@dimen/sp_16" android:textSize="@dimen/sp_24"
android:textStyle="bold" /> android:textStyle="bold" />
...@@ -126,31 +128,31 @@ ...@@ -126,31 +128,31 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/agree" android:text="@string/by_continuing_"
android:textColor="#1A1A1A" android:textColor="#8B8B8B"
android:textSize="@dimen/sp_14" /> android:textSize="@dimen/sp_12" />
<TextView <TextView
android:id="@+id/tvPrivacy" android:id="@+id/tvPrivacy"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/privacy" android:text="@string/privacy_policy"
android:textSize="@dimen/sp_14" /> android:textSize="@dimen/sp_12" />
<TextView <!-- <TextView-->
android:layout_width="wrap_content" <!-- android:layout_width="wrap_content"-->
android:layout_height="wrap_content" <!-- android:layout_height="wrap_content"-->
android:text=" &amp; " <!-- android:text=" &amp; "-->
android:textColor="#1A1A1A" <!-- android:textColor="#1A1A1A"-->
android:textSize="@dimen/sp_14" <!-- android:textSize="@dimen/sp_14"-->
tools:ignore="HardcodedText" /> <!-- tools:ignore="HardcodedText" />-->
<TextView <!-- <TextView-->
android:id="@+id/tvTerms" <!-- android:id="@+id/tvTerms"-->
android:layout_width="wrap_content" <!-- android:layout_width="wrap_content"-->
android:layout_height="wrap_content" <!-- android:layout_height="wrap_content"-->
android:text="@string/terms_of_service" <!-- android:text="@string/terms_of_service"-->
android:textSize="@dimen/sp_14" /> <!-- android:textSize="@dimen/sp_14" />-->
</LinearLayout> </LinearLayout>
......
...@@ -232,6 +232,7 @@ Please rest assured that we will handle your information in strict accordance wi ...@@ -232,6 +232,7 @@ Please rest assured that we will handle your information in strict accordance wi
<string name="exit_scanning">Exit scanning</string> <string name="exit_scanning">Exit scanning</string>
<string name="ads_are_about_to_be_shown_s">Ads are about to be shown(%1$ss)</string> <string name="ads_are_about_to_be_shown_s">Ads are about to be shown(%1$ss)</string>
<string name="issue">%1$s issue</string> <string name="issue">%1$s issue</string>
<string name="by_continuing_">By continuing you are agreeing to the\u0020</string>
</resources> </resources>
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