一键连更改完成
This commit is contained in:
parent
4e377c7067
commit
88e58f538d
|
|
@ -5,6 +5,7 @@ import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.appcompat.widget.AppCompatImageView
|
import androidx.appcompat.widget.AppCompatImageView
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.lifecycle.observe
|
import androidx.lifecycle.observe
|
||||||
import com.yingmao.clash.view.dialog.RxDialogShapeLoading
|
import com.yingmao.clash.view.dialog.RxDialogShapeLoading
|
||||||
|
|
@ -19,9 +20,8 @@ import com.yingmao.clash.view.RxToast
|
||||||
|
|
||||||
class ShareActivity : BaseActivity() {
|
class ShareActivity : BaseActivity() {
|
||||||
private lateinit var rxDialogShapeLoading: RxDialogShapeLoading
|
private lateinit var rxDialogShapeLoading: RxDialogShapeLoading
|
||||||
private lateinit var shareBtn: View
|
|
||||||
private lateinit var aiBack: AppCompatImageView
|
private lateinit var aiBack: AppCompatImageView
|
||||||
private lateinit var tvShareContent:TextView
|
private lateinit var clShare: ConstraintLayout
|
||||||
private var shareUrl:String? = ""
|
private var shareUrl:String? = ""
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
@ -44,9 +44,7 @@ class ShareActivity : BaseActivity() {
|
||||||
rxDialogShapeLoading.cancel()
|
rxDialogShapeLoading.cancel()
|
||||||
(it.rsp as AppShareInfoRsp).let { data ->
|
(it.rsp as AppShareInfoRsp).let { data ->
|
||||||
if (data.code == 1000) {
|
if (data.code == 1000) {
|
||||||
tvShareContent.text = data.data?.shareInfo
|
|
||||||
shareUrl = data.data?.shareUrl
|
shareUrl = data.data?.shareUrl
|
||||||
shareBtn.visibility = View.VISIBLE
|
|
||||||
} else {
|
} else {
|
||||||
RxToast.warning(resources.getString(R.string.FailedSharedInformation)+data.message)
|
RxToast.warning(resources.getString(R.string.FailedSharedInformation)+data.message)
|
||||||
}
|
}
|
||||||
|
|
@ -60,13 +58,12 @@ class ShareActivity : BaseActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private fun initView() {
|
private fun initView() {
|
||||||
tvShareContent= findViewById(R.id.tv_share_conetent)
|
clShare= findViewById(R.id.clShare)
|
||||||
shareBtn = findViewById(R.id.tv_share_btn)
|
|
||||||
aiBack=findViewById(R.id.aiBack)
|
aiBack=findViewById(R.id.aiBack)
|
||||||
aiBack.setOnClickListener {
|
aiBack.setOnClickListener {
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
shareBtn.setOnClickListener {
|
clShare.setOnClickListener {
|
||||||
shareText()
|
shareText()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.yingmao.clash.fragment.vip
|
package com.yingmao.clash.fragment.vip
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
|
import android.content.ClipData
|
||||||
|
import android.content.ClipboardManager
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
|
|
@ -150,6 +152,17 @@ class vipFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatchers
|
||||||
|
|
||||||
swipeLayout.setColorSchemeColors(Color.rgb(47, 223, 189))
|
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 {
|
tvTxtShowLink.setOnClickListener {
|
||||||
startActivity(Intent(requireActivity(), CustomerServiceWebView::class.java))
|
startActivity(Intent(requireActivity(), CustomerServiceWebView::class.java))
|
||||||
}
|
}
|
||||||
|
|
@ -659,4 +672,10 @@ class vipFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatchers
|
||||||
uiMainActivity.goCheckLogin()
|
uiMainActivity.goCheckLogin()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private fun updateUserInfo() {
|
||||||
|
if (activity != null) {
|
||||||
|
val mainAct = activity as MainActivity
|
||||||
|
mainAct.goCheckLogin()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -35,14 +35,7 @@
|
||||||
android:id="@+id/aivHome"
|
android:id="@+id/aivHome"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@drawable/yjl_vip_page_choose"
|
android:src="@drawable/yjl_home_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:layout_weight="1"
|
android:layout_weight="1"
|
||||||
/>
|
/>
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
|
@ -52,7 +45,13 @@
|
||||||
android:src="@drawable/yjl_vip_page"
|
android:src="@drawable/yjl_vip_page"
|
||||||
android:layout_weight="1"
|
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>
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -157,6 +157,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="17dp"
|
android:layout_marginEnd="17dp"
|
||||||
|
android:padding="5dp"
|
||||||
android:src="@drawable/home_kf_bg"
|
android:src="@drawable/home_kf_bg"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
@ -173,7 +174,7 @@
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/ivAccelerate"
|
android:id="@+id/ivAccelerate"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="300dp"
|
android:layout_height="250dp"
|
||||||
android:src="@mipmap/yjl_home_clink_bg"
|
android:src="@mipmap/yjl_home_clink_bg"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
@ -195,7 +196,7 @@
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginStart="40dp"
|
android:layout_marginStart="40dp"
|
||||||
android:layout_marginEnd="40dp"
|
android:layout_marginEnd="40dp"
|
||||||
android:visibility="visible"
|
android:visibility="invisible"
|
||||||
>
|
>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvIntelligentMode"
|
android:id="@+id/tvIntelligentMode"
|
||||||
|
|
@ -233,7 +234,7 @@
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginStart="20dp"
|
android:layout_marginStart="20dp"
|
||||||
android:layout_marginEnd="20dp"
|
android:layout_marginEnd="20dp"
|
||||||
android:visibility="visible"
|
android:visibility="invisible"
|
||||||
>
|
>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="#FFF">
|
android:background="@mipmap/yjl_share_bg_a">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/clTitle"
|
android:id="@+id/clTitle"
|
||||||
|
|
@ -36,58 +36,95 @@
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:text="@string/share"
|
android:text="@string/share"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
|
android:visibility="gone"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<TextView
|
||||||
|
android:id="@+id/tv_share_conetent"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="500dp"
|
android:layout_height="0dp"
|
||||||
android:background="@mipmap/yjl_share_bg"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/clTitle"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
android:layout_marginTop="50dp"
|
android:textColor="#FFF"
|
||||||
android:layout_marginStart="20dp"
|
android:layout_marginStart="32dp"
|
||||||
android:layout_marginEnd="20dp"
|
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
|
<LinearLayout
|
||||||
android:id="@+id/tv_share_btn"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
android:layout_marginBottom="24dp"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:text="@string/shareNow"
|
android:gravity="center"
|
||||||
android:textSize="16sp"
|
android:layout_marginStart="60dp"
|
||||||
android:textColor="#FFFF961C"
|
android:layout_marginEnd="60dp"
|
||||||
android:textStyle="bold"
|
android:layout_marginTop="20dp"
|
||||||
android:paddingStart="62dp"
|
android:layout_marginBottom="20dp"
|
||||||
android:paddingEnd="62dp"
|
>
|
||||||
android:paddingTop="13dp"
|
<TextView
|
||||||
android:paddingBottom="13dp"
|
android:id="@+id/tv_share_btn"
|
||||||
android:background="@drawable/yjl_share_bt_bg"
|
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>
|
</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>
|
</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 |
|
|
@ -476,4 +476,7 @@
|
||||||
<string name="currentVersionNumber">版本号</string>
|
<string name="currentVersionNumber">版本号</string>
|
||||||
<string name="LineChoose">线路选择</string>
|
<string name="LineChoose">线路选择</string>
|
||||||
<string name="shareNow">立即分享</string>
|
<string name="shareNow">立即分享</string>
|
||||||
|
<string name="ShartPagetxt">邀请新朋友通过你的分享链接注册并订购任意会员套餐,\n
|
||||||
|
您可以获得30天会员(仅限新用户订购有效)</string>
|
||||||
|
<string name="LinkSharetxt">点击分享</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -64,8 +64,8 @@ subprojects {
|
||||||
}
|
}
|
||||||
minSdk = 21
|
minSdk = 21
|
||||||
targetSdk = 34
|
targetSdk = 34
|
||||||
versionName = "1.0.4.8"
|
versionName = "1.0.4.7"
|
||||||
versionCode = 1048
|
versionCode = 1047
|
||||||
resValue("string", "release_name", "v$versionName")
|
resValue("string", "release_name", "v$versionName")
|
||||||
resValue("integer", "release_code", "$versionCode")
|
resValue("integer", "release_code", "$versionCode")
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
|
|
@ -93,7 +93,7 @@ subprojects {
|
||||||
}
|
}
|
||||||
productFlavors {
|
productFlavors {
|
||||||
flavorDimensions("feature")
|
flavorDimensions("feature")
|
||||||
create("0000") {
|
create("2001") {
|
||||||
isDefault = true
|
isDefault = true
|
||||||
dimension = flavorDimensionList[0]
|
dimension = flavorDimensionList[0]
|
||||||
buildConfigField("boolean", "PREMIUM", "Boolean.parseBoolean(\"false\")")
|
buildConfigField("boolean", "PREMIUM", "Boolean.parseBoolean(\"false\")")
|
||||||
|
|
@ -101,7 +101,7 @@ subprojects {
|
||||||
buildConfigField("boolean", "is_back_cn", "false")
|
buildConfigField("boolean", "is_back_cn", "false")
|
||||||
buildConfigField("String", "applicationId", "\"com.jsq.wufu\"")
|
buildConfigField("String", "applicationId", "\"com.jsq.wufu\"")
|
||||||
buildConfigField("String", "service_url", "\"https://api.yijianlianjsq.com/\"")
|
buildConfigField("String", "service_url", "\"https://api.yijianlianjsq.com/\"")
|
||||||
buildConfigField("String", "productId", "\"0000\"")
|
buildConfigField("String", "productId", "\"2001\"")
|
||||||
manifestPlaceholders(
|
manifestPlaceholders(
|
||||||
mapOf(
|
mapOf(
|
||||||
"APP_NAME" to "@string/wf",
|
"APP_NAME" to "@string/wf",
|
||||||
|
|
@ -112,7 +112,7 @@ subprojects {
|
||||||
|
|
||||||
}
|
}
|
||||||
sourceSets {
|
sourceSets {
|
||||||
getByName("0000") {
|
getByName("2001") {
|
||||||
java.srcDirs("src/foss/java")
|
java.srcDirs("src/foss/java")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue