一键连更改完成

This commit is contained in:
level 2025-10-17 19:03:48 +08:00
parent 4e377c7067
commit 88e58f538d
10 changed files with 122 additions and 66 deletions

View File

@ -5,6 +5,7 @@ import android.os.Bundle
import android.view.View
import android.widget.TextView
import androidx.appcompat.widget.AppCompatImageView
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.observe
import com.yingmao.clash.view.dialog.RxDialogShapeLoading
@ -19,9 +20,8 @@ import com.yingmao.clash.view.RxToast
class ShareActivity : BaseActivity() {
private lateinit var rxDialogShapeLoading: RxDialogShapeLoading
private lateinit var shareBtn: View
private lateinit var aiBack: AppCompatImageView
private lateinit var tvShareContent:TextView
private lateinit var clShare: ConstraintLayout
private var shareUrl:String? = ""
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@ -44,9 +44,7 @@ class ShareActivity : BaseActivity() {
rxDialogShapeLoading.cancel()
(it.rsp as AppShareInfoRsp).let { data ->
if (data.code == 1000) {
tvShareContent.text = data.data?.shareInfo
shareUrl = data.data?.shareUrl
shareBtn.visibility = View.VISIBLE
} else {
RxToast.warning(resources.getString(R.string.FailedSharedInformation)+data.message)
}
@ -60,13 +58,12 @@ class ShareActivity : BaseActivity() {
}
}
private fun initView() {
tvShareContent= findViewById(R.id.tv_share_conetent)
shareBtn = findViewById(R.id.tv_share_btn)
clShare= findViewById(R.id.clShare)
aiBack=findViewById(R.id.aiBack)
aiBack.setOnClickListener {
finish()
}
shareBtn.setOnClickListener {
clShare.setOnClickListener {
shareText()
}
}

View File

@ -1,6 +1,8 @@
package com.yingmao.clash.fragment.vip
import android.annotation.SuppressLint
import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
import android.content.Intent
import android.graphics.Color
@ -150,6 +152,17 @@ class vipFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatchers
swipeLayout.setColorSchemeColors(Color.rgb(47, 223, 189))
tvUserName.setOnClickListener {
val userName = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME)
val clipboardManager =
requireActivity().getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
val clipData = ClipData.newPlainText("text", userName)
clipboardManager.setPrimaryClip(clipData)
RxToast.info(resources.getString(R.string.CopyToClipboard))
}
tvUserTimeEnd.setOnClickListener {
updateUserInfo()
}
tvTxtShowLink.setOnClickListener {
startActivity(Intent(requireActivity(), CustomerServiceWebView::class.java))
}
@ -659,4 +672,10 @@ class vipFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatchers
uiMainActivity.goCheckLogin()
}
}
private fun updateUserInfo() {
if (activity != null) {
val mainAct = activity as MainActivity
mainAct.goCheckLogin()
}
}
}

View File

@ -35,14 +35,7 @@
android:id="@+id/aivHome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/yjl_vip_page_choose"
android:layout_weight="1"
/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/aivCenter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/yjl_user_page"
android:src="@drawable/yjl_home_page_choose"
android:layout_weight="1"
/>
<androidx.appcompat.widget.AppCompatImageView
@ -52,7 +45,13 @@
android:src="@drawable/yjl_vip_page"
android:layout_weight="1"
/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/aivCenter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/yjl_user_page"
android:layout_weight="1"
/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -157,6 +157,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="17dp"
android:padding="5dp"
android:src="@drawable/home_kf_bg"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
@ -173,7 +174,7 @@
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/ivAccelerate"
android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_height="250dp"
android:src="@mipmap/yjl_home_clink_bg"
/>
@ -195,7 +196,7 @@
android:layout_marginTop="16dp"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"
android:visibility="visible"
android:visibility="invisible"
>
<TextView
android:id="@+id/tvIntelligentMode"
@ -233,7 +234,7 @@
android:layout_marginTop="16dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:visibility="visible"
android:visibility="invisible"
>
<androidx.appcompat.widget.AppCompatImageView

View File

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFF">
android:background="@mipmap/yjl_share_bg_a">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clTitle"
@ -36,58 +36,95 @@
app:layout_constraintBottom_toBottomOf="parent"
android:text="@string/share"
android:textSize="18sp"
android:visibility="gone"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
<TextView
android:id="@+id/tv_share_conetent"
android:layout_width="match_parent"
android:layout_height="500dp"
android:background="@mipmap/yjl_share_bg"
android:layout_height="0dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/clTitle"
android:layout_marginTop="50dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
app:layout_constraintTop_toTopOf="parent"
android:textColor="#FFF"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:layout_marginTop="150dp"
android:layout_marginBottom="15dp"
android:textSize="14sp"
android:ellipsize="end"
android:visibility="gone"
/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clShare"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@+id/tvKT"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:background="@mipmap/share_bg_btt"
android:layout_marginBottom="15dp"
>
<TextView
android:id="@+id/tv_share_conetent"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@+id/tv_share_btn"
app:layout_constraintTop_toTopOf="parent"
android:textColor="#FFF"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:layout_marginTop="150dp"
android:layout_marginBottom="15dp"
android:textSize="14sp"
android:ellipsize="end"
/>
<TextView
android:id="@+id/tv_share_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="24dp"
android:text="@string/shareNow"
android:textSize="16sp"
android:textColor="#FFFF961C"
android:textStyle="bold"
android:paddingStart="62dp"
android:paddingEnd="62dp"
android:paddingTop="13dp"
android:paddingBottom="13dp"
android:background="@drawable/yjl_share_bt_bg"
/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:gravity="center"
android:layout_marginStart="60dp"
android:layout_marginEnd="60dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
>
<TextView
android:id="@+id/tv_share_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/LinkSharetxt"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/aivTab"
android:layout_marginEnd="10dp"
android:textSize="20sp"
android:textColor="@color/white"
android:textStyle="bold"
/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/aivTab"
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@mipmap/share_bg_right"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/tvKT"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:text="@string/ShartPagetxt"
android:textColor="#FF888888"
android:textSize="14sp"
android:layout_marginBottom="10dp"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

View File

@ -476,4 +476,7 @@
<string name="currentVersionNumber">版本号</string>
<string name="LineChoose">线路选择</string>
<string name="shareNow">立即分享</string>
<string name="ShartPagetxt">邀请新朋友通过你的分享链接注册并订购任意会员套餐,\n
您可以获得30天会员仅限新用户订购有效</string>
<string name="LinkSharetxt">点击分享</string>
</resources>

View File

@ -64,8 +64,8 @@ subprojects {
}
minSdk = 21
targetSdk = 34
versionName = "1.0.4.8"
versionCode = 1048
versionName = "1.0.4.7"
versionCode = 1047
resValue("string", "release_name", "v$versionName")
resValue("integer", "release_code", "$versionCode")
externalNativeBuild {
@ -93,7 +93,7 @@ subprojects {
}
productFlavors {
flavorDimensions("feature")
create("0000") {
create("2001") {
isDefault = true
dimension = flavorDimensionList[0]
buildConfigField("boolean", "PREMIUM", "Boolean.parseBoolean(\"false\")")
@ -101,7 +101,7 @@ subprojects {
buildConfigField("boolean", "is_back_cn", "false")
buildConfigField("String", "applicationId", "\"com.jsq.wufu\"")
buildConfigField("String", "service_url", "\"https://api.yijianlianjsq.com/\"")
buildConfigField("String", "productId", "\"0000\"")
buildConfigField("String", "productId", "\"2001\"")
manifestPlaceholders(
mapOf(
"APP_NAME" to "@string/wf",
@ -112,7 +112,7 @@ subprojects {
}
sourceSets {
getByName("0000") {
getByName("2001") {
java.srcDirs("src/foss/java")
}
}