一键连新增ui更改完成

This commit is contained in:
level 2025-10-17 17:56:23 +08:00
parent 87bd1e60b7
commit 4e377c7067
51 changed files with 807 additions and 291 deletions

View File

@ -14,7 +14,7 @@ plugins {
dependencies { dependencies {
implementation(fileTree(mapOf("dir" to "src/main/libs", "include" to listOf("*.aar")))) implementation(fileTree(mapOf("dir" to "src/main/libs", "include" to listOf("*.aar"))))
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0") implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
// implementation(files("src\\main\\libs\\Baidu_ocpc_action_2_7_2.aar")) implementation(files("src\\main\\libs\\Baidu_ocpc_action_2_7_2.aar"))
// implementation(files("src\\main\\libs\\OpenInstall.jar")) // implementation(files("src\\main\\libs\\OpenInstall.jar"))
// implementation("com.google.firebase:firebase-crashlytics-buildtools:3.0.2") // implementation("com.google.firebase:firebase-crashlytics-buildtools:3.0.2")
// implementation(files("src/main/libs/openinstall.jar")) // implementation(files("src/main/libs/openinstall.jar"))
@ -188,6 +188,7 @@ android {
jvmTarget = "17" // 或者改为 "1.8" jvmTarget = "17" // 或者改为 "1.8"
} }
defaultConfig { defaultConfig {
vectorDrawables.useSupportLibrary = true
ndk { ndk {
abiFilters.add("arm64-v8a") abiFilters.add("arm64-v8a")
abiFilters.add("armeabi-v7a") abiFilters.add("armeabi-v7a")

View File

@ -11,6 +11,8 @@ import android.widget.Toast
import androidx.appcompat.widget.AppCompatImageView import androidx.appcompat.widget.AppCompatImageView
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.observe import androidx.lifecycle.observe
import com.baidu.mobads.action.ActionType
import com.baidu.mobads.action.BaiduAction
import com.yingmao.clash.view.dialog.RxDialogShapeLoading import com.yingmao.clash.view.dialog.RxDialogShapeLoading
import com.tencent.mmkv.MMKV import com.tencent.mmkv.MMKV
@ -141,7 +143,7 @@ class BandPhoneActivity : BaseActivity() {
MMKV.defaultMMKV().removeValueForKey(BZYConstants.MMKV_KEY_TOKEN) MMKV.defaultMMKV().removeValueForKey(BZYConstants.MMKV_KEY_TOKEN)
MMKV.defaultMMKV().removeValueForKey(BZYConstants.MMKV_KEY_CURRENT_NODE) MMKV.defaultMMKV().removeValueForKey(BZYConstants.MMKV_KEY_CURRENT_NODE)
//百度埋点完成注册 //百度埋点完成注册
// BaiduAction.logAction(ActionType.REGISTER) BaiduAction.logAction(ActionType.REGISTER)
val intent=Intent(CommonUtils.getApp(), LoginActivity::class.java) val intent=Intent(CommonUtils.getApp(), LoginActivity::class.java)
intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK
startActivity(intent) startActivity(intent)

View File

@ -22,6 +22,8 @@ import androidx.swiperefreshlayout.widget.SwipeRefreshLayout.OnRefreshListener
import com.chad.library.adapter.base.BaseQuickAdapter import com.chad.library.adapter.base.BaseQuickAdapter
import com.cncat.vpn.common.constants.Intents import com.cncat.vpn.common.constants.Intents
import com.cncat.vpn.common.log.Log import com.cncat.vpn.common.log.Log
import com.cncat.vpn.core.Clash
import com.cncat.vpn.core.model.TunnelState
import com.cncat.vpn.service.remote.IRemoteService import com.cncat.vpn.service.remote.IRemoteService
import com.google.gson.Gson import com.google.gson.Gson
import com.google.gson.JsonParser import com.google.gson.JsonParser
@ -39,6 +41,7 @@ import com.yingmao.clash.entity.ClashNodebBean
import com.yingmao.clash.fragment.home.HomeFragment.Companion.CHECK_NODE_REQUEST_CODE import com.yingmao.clash.fragment.home.HomeFragment.Companion.CHECK_NODE_REQUEST_CODE
import com.yingmao.clash.fragment.home.HomeFragment.Companion.clashRunning import com.yingmao.clash.fragment.home.HomeFragment.Companion.clashRunning
import com.yingmao.clash.fragment.home.HomeFragment.Companion.isGlo import com.yingmao.clash.fragment.home.HomeFragment.Companion.isGlo
import com.yingmao.clash.listener.AsyncCallBackListener
import com.yingmao.clash.remote.Resource import com.yingmao.clash.remote.Resource
import com.yingmao.clash.util.Utils import com.yingmao.clash.util.Utils
import com.yingmao.clash.view.RxToast import com.yingmao.clash.view.RxToast
@ -46,10 +49,12 @@ import com.yingmao.clash.view.adapter.NodeListAdapter
import com.yingmao.clash.view.dialog.DialogDoMainChoose import com.yingmao.clash.view.dialog.DialogDoMainChoose
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job import kotlinx.coroutines.Job
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.delay import kotlinx.coroutines.delay
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.coroutines.sync.Semaphore import kotlinx.coroutines.sync.Semaphore
import kotlinx.coroutines.sync.withPermit import kotlinx.coroutines.sync.withPermit
import okhttp3.Response
import java.util.UUID import java.util.UUID
class ChangeNodeActivity : BaseActivity(), View.OnClickListener { class ChangeNodeActivity : BaseActivity(), View.OnClickListener {
@ -73,6 +78,7 @@ class ChangeNodeActivity : BaseActivity(), View.OnClickListener {
var getNodeTimeOutNum = 5 var getNodeTimeOutNum = 5
var isRunDing = false var isRunDing = false
var dialogDoMainChoose: DialogDoMainChoose? = null var dialogDoMainChoose: DialogDoMainChoose? = null
var proList: MutableList<ClashNodebBean>? = null
var nowSubUrl: String = "" var nowSubUrl: String = ""
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
@ -129,10 +135,14 @@ class ChangeNodeActivity : BaseActivity(), View.OnClickListener {
if(!clashRunning){ if(!clashRunning){
setBackground(ProxyMode.PAC) setBackground(ProxyMode.PAC)
MMKV.defaultMMKV().encode(BZYConstants.MMKV_KEY_GLOBAL_MODEL, false) MMKV.defaultMMKV().encode(BZYConstants.MMKV_KEY_GLOBAL_MODEL, false)
checkGlo()
}else{ }else{
RxToast.info(resources.getString(R.string.closeRunningChoose)) RxToast.info(resources.getString(R.string.closeRunningChoose))
} }
if(clashRunning){
RxToast.info(resources.getString(R.string.SwitchingSourceModel))
return@setOnClickListener
}
} }
tvProj.setOnClickListener { tvProj.setOnClickListener {
@ -475,8 +485,9 @@ class ChangeNodeActivity : BaseActivity(), View.OnClickListener {
when (proxyMode) { when (proxyMode) {
ProxyMode.PAC -> { ProxyMode.PAC -> {
isGlo = false isGlo = false
tvProA.setBackgroundResource(R.drawable.oc_proxy_choose_bg) tvProA.setBackgroundResource(R.drawable.yil_node_proxy_choose_bg)
tvProj.setBackgroundResource(0) tvProj.setBackgroundResource(0)
sendMode(false) sendMode(false)
} }
@ -484,7 +495,7 @@ class ChangeNodeActivity : BaseActivity(), View.OnClickListener {
ProxyMode.GLOBAL -> { ProxyMode.GLOBAL -> {
isGlo = true isGlo = true
tvProA.setBackgroundResource(0) tvProA.setBackgroundResource(0)
tvProj.setBackgroundResource(R.drawable.oc_proxy_choose_bg) tvProj.setBackgroundResource(R.drawable.yil_node_proxy_choose_bg)
sendMode(true) sendMode(true)
} }
} }
@ -553,4 +564,136 @@ class ChangeNodeActivity : BaseActivity(), View.OnClickListener {
enum class ProxyMode { enum class ProxyMode {
PAC, GLOBAL PAC, GLOBAL
} }
private fun checkGlo() {
val isGlobal = isGlo
val isGlobal2 = MMKV.defaultMMKV().decodeBool(BZYConstants.MMKV_KEY_GLOBAL_MODEL, false)
Log.i("checkGlo isGlobal==>${isGlobal}, isGlobal2==>${isGlobal2}")
val px: ProxyMode = if (isGlobal2) {
ProxyMode.GLOBAL
} else {
ProxyMode.PAC
}
setBackground(px)
launch(Dispatchers.IO) {
if (isGlobal) {
if (clashRunning) {
getNodes()
}
} else {
if (clashRunning) {
delay(1000)
clashBinder?.let { cm ->
val names = cm.queryProxyGroupNames(false)
Log.i("checkGlo names==>${names}")
if (names.isNotEmpty()) {
val selectedName =
MMKV.defaultMMKV()
.decodeString(BZYConstants.NODE_SELECTED_NAME_KEY, "");
Log.i("selected_name ==>${selectedName}")
if (!TextUtils.isEmpty(selectedName)) {
val o = cm.queryOverride(Clash.OverrideSlot.Session)
o.mode = TunnelState.Mode.Rule
cm.patchOverride(Clash.OverrideSlot.Session, o)
delay(500)
var gName = names[0]
//全局模式下 names[0]会自动添加一个 "GLOBAL" 组
if (names.size >= 2) {
if ("GLOBAL" == gName) {
//names[0] 为 "GLOBAL" //names[1]才是规则模式下的组名,所以需要手动赋值
gName = names[1]
}
}
cm.patchSelector(gName, selectedName!!)
}
}
}
}
}
}
}
private suspend fun getNodes() {
coroutineScope {
val selectedName =
MMKV.defaultMMKV().decodeString(BZYConstants.NODE_SELECTED_NAME_KEY, "")
Log.d("getNodes selected_name==>${selectedName}")
if (TextUtils.isEmpty(selectedName)) {
subUrl?.let {
changeNodeVM.getNodeOther(it, object : AsyncCallBackListener {
override fun suc(obj: Any?) {
proList = obj as MutableList<ClashNodebBean>
proList?.let { proListItem ->
val nodeName = proListItem[0].name
if (!TextUtils.isEmpty(nodeName)) {
launch(Dispatchers.IO) {
clashBinder?.let { cm ->
val o = cm.queryOverride(Clash.OverrideSlot.Session)
o.mode = TunnelState.Mode.Global
cm.patchOverride(Clash.OverrideSlot.Session, o)
delay(3000)
//等待全局模式生效
var maxIndex = 0
while (true) {
if (maxIndex > 3) {
break
}
val names = cm.queryProxyGroupNames(false)
if (names.isNotEmpty()) {
if (names[0] == "GLOBAL") {
Log.d("repeat end")
break
}
}
Log.d("repeat agent")
maxIndex++
delay(1000)
}
cm.patchSelector("GLOBAL", nodeName)
}
}
}
}
}
override fun faild(response: Response) {
}
override fun err(msg: String, exception: Exception?) {
}
})
}
} else {
clashBinder?.let { cm ->
val o = cm.queryOverride(Clash.OverrideSlot.Session)
o.mode = TunnelState.Mode.Global
cm.patchOverride(Clash.OverrideSlot.Session, o)
delay(3000)
//等待全局
var maxIndex = 0
while (true) {
if (maxIndex > 3) {
break
}
val names = cm.queryProxyGroupNames(false)
if (names.isNotEmpty()) {
if (names[0] == "GLOBAL") {
Log.d("repeat end")
break
}
}
Log.d("repeat agent")
maxIndex++
delay(1000)
}
cm.patchSelector("GLOBAL", selectedName!!)
}
}
}
}
} }

View File

@ -4,11 +4,20 @@ package com.yingmao.clash.act
import com.tencent.mmkv.MMKV import com.tencent.mmkv.MMKV
import com.yingmao.clash.base.PublicViewMode import com.yingmao.clash.base.PublicViewMode
import com.cncat.vpn.common.log.Log import com.cncat.vpn.common.log.Log
import com.google.gson.Gson
import com.yingmao.clash.conf.BZYConstants import com.yingmao.clash.conf.BZYConstants
import com.yingmao.clash.entity.ClashNodebBean
import com.yingmao.clash.entity.NodesRsp import com.yingmao.clash.entity.NodesRsp
import com.yingmao.clash.listener.AsyncCallBackListener
import com.yingmao.clash.net.http.HttpApi import com.yingmao.clash.net.http.HttpApi
import com.yingmao.clash.net.http.HttpReqType import com.yingmao.clash.net.http.HttpReqType
import com.yingmao.clash.net.http.NetService import com.yingmao.clash.net.http.NetService
import okhttp3.OkHttpClient
import okhttp3.Request
import org.yaml.snakeyaml.Yaml
import java.math.BigDecimal
import kotlin.collections.get
import kotlin.text.split
class ChangeNodeVM : PublicViewMode() { class ChangeNodeVM : PublicViewMode() {
fun getAirNodes(){ fun getAirNodes(){
@ -24,4 +33,72 @@ class ChangeNodeVM : PublicViewMode() {
httpApi.getAirportNode(params) httpApi.getAirportNode(params)
} }
} }
fun getNodeOther(url: String, listener: AsyncCallBackListener) {
Log.d("get_Node_Other start")
val client = OkHttpClient()
try {
val request = Request.Builder()
.url(url)
.header("User-Agent", "ClashforWindows/0.19.23")
.build()
client.newCall(request).execute().use { response ->
if (!response.isSuccessful || response.headers["subscription-userinfo"] == null) return
var upload: Long = 0
var download: Long = 0
var total: Long = 0
var expire: Long = 0
val userinfo = response.headers["subscription-userinfo"]
if (response.isSuccessful && userinfo != null) {
val flags = userinfo.split(";")
for (flag in flags) {
val info = flag.split("=")
when {
info[0].contains("upload") && info[1].isNotEmpty() -> upload =
BigDecimal(info[1]).longValueExact()
info[0].contains("download") && info[1].isNotEmpty() -> download =
BigDecimal(info[1]).longValueExact()
info[0].contains("total") && info[1].isNotEmpty() -> total =
BigDecimal(info[1]).longValueExact()
info[0].contains("expire") && info[1].isNotEmpty() -> {
if (info[1].isNotEmpty()) {
expire = (info[1].toDouble() * 1000).toLong()
}
}
}
}
Log.d("upload==>${upload}, download==>${download}, total==>${total}, expire==>${expire}")
response.body?.let {
val respStr = it.string()
val conf = Yaml().loadAs(respStr, HashMap::class.java)
val proxies = conf["proxies"]
proxies?.let { pro ->
val proList = pro as ArrayList<*>
val gson = Gson()
val dataList = mutableListOf<ClashNodebBean>()
proList.forEach { item ->
val jo = gson.toJson(item)
val bean = gson.fromJson(jo.toString(), ClashNodebBean::class.java)
dataList.add(bean)
}
listener.suc(dataList)
}
}
} else {
listener.faild(response)
}
}
} catch (e: Exception) {
e.printStackTrace()
Log.d("e==>" + e.localizedMessage)
}
}
} }

View File

@ -2,6 +2,8 @@ package com.yingmao.clash.act
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.Intent import android.content.Intent
import android.content.res.ColorStateList
import android.graphics.Color
import android.net.Uri import android.net.Uri
import android.os.Build import android.os.Build
import android.os.Bundle import android.os.Bundle
@ -15,6 +17,7 @@ import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.view.inputmethod.InputMethodManager import android.view.inputmethod.InputMethodManager
import android.widget.* import android.widget.*
import androidx.core.content.ContextCompat
import androidx.core.content.FileProvider import androidx.core.content.FileProvider
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.lifecycleScope import androidx.lifecycle.lifecycleScope
@ -47,6 +50,7 @@ import kotlinx.coroutines.launch
import java.io.File import java.io.File
import androidx.core.graphics.toColorInt import androidx.core.graphics.toColorInt
import androidx.core.net.toUri import androidx.core.net.toUri
import com.google.android.material.floatingactionbutton.FloatingActionButton
class LoginActivity : BaseActivity(), View.OnClickListener { class LoginActivity : BaseActivity(), View.OnClickListener {
private lateinit var loginViewMode: LoginAtyVM private lateinit var loginViewMode: LoginAtyVM
@ -58,6 +62,8 @@ class LoginActivity : BaseActivity(), View.OnClickListener {
private lateinit var userAgreementCB: CheckBox private lateinit var userAgreementCB: CheckBox
private lateinit var loginUserName: String private lateinit var loginUserName: String
private lateinit var tvRegister: TextView private lateinit var tvRegister: TextView
private lateinit var customService: FloatingActionButton
private var usernameEncrypt = "" private var usernameEncrypt = ""
private var passwordEncrypt = "" private var passwordEncrypt = ""
private var userOAID = "" private var userOAID = ""
@ -309,6 +315,10 @@ class LoginActivity : BaseActivity(), View.OnClickListener {
startActivity(intent) startActivity(intent)
finish() finish()
} }
customService=findViewById(R.id.customService)
customService.setOnClickListener {
startActivity(Intent(this@LoginActivity, CustomerServiceWebView::class.java))
}
} }
private fun initUserAgreementView(userAgreementCB: CheckBox) { private fun initUserAgreementView(userAgreementCB: CheckBox) {

View File

@ -5,7 +5,6 @@ import android.content.Intent
import android.os.Build import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.text.TextUtils import android.text.TextUtils
import android.widget.FrameLayout
import android.widget.TextView import android.widget.TextView
import androidx.annotation.RequiresApi import androidx.annotation.RequiresApi
import androidx.appcompat.widget.AppCompatImageView import androidx.appcompat.widget.AppCompatImageView
@ -14,6 +13,8 @@ import androidx.lifecycle.ViewModelProvider
import com.afollestad.materialdialogs.MaterialDialog import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.customview.customView import com.afollestad.materialdialogs.customview.customView
import com.afollestad.materialdialogs.customview.getCustomView import com.afollestad.materialdialogs.customview.getCustomView
import com.baidu.mobads.action.ActionType
import com.baidu.mobads.action.BaiduAction
import com.cncat.vpn.common.log.Log import com.cncat.vpn.common.log.Log
import com.cncat.vpn.core.model.LogMessage import com.cncat.vpn.core.model.LogMessage
import com.cncat.vpn.service.ClashManager import com.cncat.vpn.service.ClashManager
@ -35,7 +36,7 @@ import com.yingmao.clash.base.BaseActivity
import com.yingmao.clash.conf.BZYConstants import com.yingmao.clash.conf.BZYConstants
import com.yingmao.clash.conf.Conf import com.yingmao.clash.conf.Conf
import com.yingmao.clash.entity.CheckLoginRsp import com.yingmao.clash.entity.CheckLoginRsp
import com.yingmao.clash.fragment.activity.vipFragment import com.yingmao.clash.fragment.vip.vipFragment
import com.yingmao.clash.fragment.home.HomeFragment import com.yingmao.clash.fragment.home.HomeFragment
import com.yingmao.clash.fragment.setting.SettingFragment import com.yingmao.clash.fragment.setting.SettingFragment
import com.yingmao.clash.net.http.HttpApi import com.yingmao.clash.net.http.HttpApi
@ -331,14 +332,18 @@ class MainActivity : BaseActivity() {
val expired = checkLoginRsp.data.expired val expired = checkLoginRsp.data.expired
mmkv.encode(BZYConstants.MMKV_KEY_VPN_EXPIRED, expired ?: true) mmkv.encode(BZYConstants.MMKV_KEY_VPN_EXPIRED, expired ?: true)
mmkv.encode(BZYConstants.MMKV_KEY_VPN_VALID_PERIOD, nowExpireTime) mmkv.encode(BZYConstants.MMKV_KEY_VPN_VALID_PERIOD, nowExpireTime)
val hf = val fragments = supportFragmentManager.fragments
supportFragmentManager.findFragmentById(R.id.fragmentContainer) as? HomeFragment for (fragment in fragments) {
val sf = when (fragment) {
supportFragmentManager.findFragmentById(R.id.fragmentContainer) as? SettingFragment is HomeFragment -> fragment.setExpireDate()
sf?.setExpireDate() is SettingFragment -> fragment.setExpireDate()
is vipFragment -> fragment.setExpireDate()
}
}
checkPayResultDia?.dismiss() checkPayResultDia?.dismiss()
mainAtyVM.getAirNodes() mainAtyVM.getAirNodes()
RxToast.info(resources.getString(R.string.SuccessfullyUpdatedUserInformation)) RxToast.info(resources.getString(R.string.SuccessfullyUpdatedUserInformation))
mainAtyVM.getExpensesRecord(mPageInfo)
} }
}else if(checkLoginRsp.code == -2){ }else if(checkLoginRsp.code == -2){
RxToast.info(resources.getString(R.string.LoginOut)) RxToast.info(resources.getString(R.string.LoginOut))
@ -426,6 +431,7 @@ class MainActivity : BaseActivity() {
android.util.Log.i("reqType:","data:::"+it.code) android.util.Log.i("reqType:","data:::"+it.code)
if(it.code==200){ if(it.code==200){
//上报百度支付功能 //上报百度支付功能
BaiduAction.logAction(ActionType.PURCHASE)
} }
} }
} }
@ -725,8 +731,8 @@ class MainActivity : BaseActivity() {
if (activityFragment == null) activityFragment = vipFragment() if (activityFragment == null) activityFragment = vipFragment()
showFragment(activityFragment!!) showFragment(activityFragment!!)
aivHome.setImageResource(R.drawable.yjl_home_page) aivHome.setImageResource(R.drawable.yjl_home_page)
aivCenter.setImageResource(R.drawable.yjl_vip_page) aivCenter.setImageResource(R.drawable.yjl_user_page)
aivVip.setImageResource(R.drawable.yjl_user_page_choose) aivVip.setImageResource(R.drawable.yjl_vip_page_choose)
// startActivityForResult( // startActivityForResult(
// Intent(this@MainActivity, MemberRechargeActivity::class.java), // Intent(this@MainActivity, MemberRechargeActivity::class.java),
// REQUEST_CODE_PAY_WEB_VIEW_ACTIVITY // REQUEST_CODE_PAY_WEB_VIEW_ACTIVITY

View File

@ -3,6 +3,7 @@ package com.yingmao.clash.act
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.Intent import android.content.Intent
import android.graphics.Color import android.graphics.Color
import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.widget.TextView import android.widget.TextView
import androidx.appcompat.widget.AppCompatImageView import androidx.appcompat.widget.AppCompatImageView
@ -59,6 +60,8 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import java.text.DecimalFormat import java.text.DecimalFormat
import java.text.SimpleDateFormat
import java.util.Locale
class MemberRechargeActivity : BaseActivity() { class MemberRechargeActivity : BaseActivity() {
private lateinit var aiBack: AppCompatImageView private lateinit var aiBack: AppCompatImageView
@ -76,6 +79,10 @@ class MemberRechargeActivity : BaseActivity() {
//stripePay 支付 //stripePay 支付
private var paymentIntentClientSecret: String = "" private var paymentIntentClientSecret: String = ""
private lateinit var mainAtyVM: MainAtyVM private lateinit var mainAtyVM: MainAtyVM
private lateinit var tvUserName: TextView
private lateinit var tvUserTimeEnd: TextView
private lateinit var tvTxtShowLink:TextView
private val stripe: Stripe by lazy { private val stripe: Stripe by lazy {
Stripe( Stripe(
this@MemberRechargeActivity, this@MemberRechargeActivity,
@ -95,6 +102,11 @@ class MemberRechargeActivity : BaseActivity() {
mainAtyVM = ViewModelProvider(this)[MainAtyVM::class.java] mainAtyVM = ViewModelProvider(this)[MainAtyVM::class.java]
viewModel = ViewModelProvider(this)[RechargeViewModel::class.java] viewModel = ViewModelProvider(this)[RechargeViewModel::class.java]
observe(this, viewModel) observe(this, viewModel)
val userName =
MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME)
tvUserName.text=userName
setExpireDate()
//获取充值列表 //获取充值列表
val username = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME,"")!! val username = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_REMEMBER_USERNAME,"")!!
val phToken = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_PH_TOKEN,"")!! val phToken = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_PH_TOKEN,"")!!
@ -109,6 +121,9 @@ class MemberRechargeActivity : BaseActivity() {
tvPay=findViewById(R.id.tvPay) tvPay=findViewById(R.id.tvPay)
tvRechargeRecord=findViewById(R.id.tvRechargeRecord) tvRechargeRecord=findViewById(R.id.tvRechargeRecord)
clCustom=findViewById(R.id.clCustom) clCustom=findViewById(R.id.clCustom)
tvUserName=findViewById(R.id.tvUserName)
tvUserTimeEnd=findViewById(R.id.tvUserTimeEnd)
tvTxtShowLink=findViewById(R.id.tvTxtShowLink)
swipeLayout.setColorSchemeColors(Color.rgb(47, 223, 189)) swipeLayout.setColorSchemeColors(Color.rgb(47, 223, 189))
swipeLayout.setOnRefreshListener { swipeLayout.setOnRefreshListener {
selectedGrade = null selectedGrade = null
@ -118,7 +133,9 @@ class MemberRechargeActivity : BaseActivity() {
val userId = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_USER_ID)!! val userId = MMKV.defaultMMKV().decodeString(BZYConstants.MMKV_KEY_USER_ID)!!
viewModel.getPhRechargeInfo(username, phToken, userId) viewModel.getPhRechargeInfo(username, phToken, userId)
} }
tvTxtShowLink.setOnClickListener {
startActivity(Intent(this@MemberRechargeActivity, CustomerServiceWebView::class.java))
}
aiBack.setOnClickListener { aiBack.setOnClickListener {
val intent=Intent() val intent=Intent()
this.setResult(1000,intent) this.setResult(1000,intent)
@ -531,4 +548,71 @@ class MemberRechargeActivity : BaseActivity() {
} }
} }
} }
fun setExpireDate() {
val isExpire = checkExpire()
var endTimeInfo = "--"
if (isExpire) {
endTimeInfo = resources.getString(R.string.AccountExpired)
} else {
val validPeriod = MMKV.defaultMMKV().decodeLong(BZYConstants.MMKV_KEY_VPN_VALID_PERIOD)
val decodeString = MMKV.defaultMMKV().decodeString(BZYConstants.languageInfo, "")
if (decodeString.isNullOrEmpty()) {
//获取当前系统语言
val config = resources.configuration
val language = config.locale.language
if (language.equals("en")) {
val dateFormat = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
val localEN = Locale.ENGLISH
SimpleDateFormat("MM/dd/yyyy HH:mm", localEN)
} else {
val localEN = Locale.ENGLISH
SimpleDateFormat("MM/dd/yyyy HH:mm", localEN)
}
endTimeInfo = dateFormat.format(validPeriod)
} else {
val dateFormat = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
SimpleDateFormat("yyyy年MM月dd日 HH:mm")
} else {
SimpleDateFormat("yyyy年MM月dd日 HH:mm")
}
endTimeInfo = dateFormat.format(validPeriod)
}
} else {
if (decodeString == "English") {
val dateFormat = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
val locale = Locale.ENGLISH
SimpleDateFormat("MM/dd/yyyy HH:mm", locale)
} else {
val locale = Locale.ENGLISH
SimpleDateFormat("MM/dd/yyyy HH:mm", locale)
}
endTimeInfo = dateFormat.format(validPeriod)
} else {
val dateFormat = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
SimpleDateFormat("yyyy年MM月dd日 HH:mm")
} else {
SimpleDateFormat("yyyy年MM月dd日 HH:mm")
}
endTimeInfo = dateFormat.format(validPeriod)
}
}
}
tvUserTimeEnd.text =resources.getString(R.string.expire_date)+endTimeInfo
}
private fun checkExpire(): Boolean {
val validPeriod = MMKV.defaultMMKV().decodeLong(BZYConstants.MMKV_KEY_VPN_VALID_PERIOD)
if (validPeriod > 0) {
val nowTime = System.currentTimeMillis()
Log.d("validPeriod==>$validPeriod, nowTime==>$nowTime")
if (validPeriod >= nowTime) {
return false
}
}
return true
}
} }

View File

@ -163,6 +163,7 @@ class SettingActivity : BaseActivity() {
if (clashRunning) { if (clashRunning) {
stopClashService() stopClashService()
} }
clashRunning=false
mainAtyVM.stopHeartBeat() mainAtyVM.stopHeartBeat()
cleanProfile() cleanProfile()
val intent=Intent(CommonUtils.getApp(), LoginActivity::class.java) val intent=Intent(CommonUtils.getApp(), LoginActivity::class.java)

View File

@ -22,7 +22,6 @@ class ShareActivity : BaseActivity() {
private lateinit var shareBtn: View private lateinit var shareBtn: View
private lateinit var aiBack: AppCompatImageView private lateinit var aiBack: AppCompatImageView
private lateinit var tvShareContent:TextView private lateinit var tvShareContent:TextView
private lateinit var tvShareUrl:TextView
private var shareUrl:String? = "" private var shareUrl:String? = ""
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
@ -46,9 +45,6 @@ class ShareActivity : BaseActivity() {
(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 tvShareContent.text = data.data?.shareInfo
val replaceStr = data.data?.shareUrl.toString()
.replace("您的专属链接为:", "您的专属链接为:\n")
tvShareUrl.text =replaceStr
shareUrl = data.data?.shareUrl shareUrl = data.data?.shareUrl
shareBtn.visibility = View.VISIBLE shareBtn.visibility = View.VISIBLE
} else { } else {
@ -65,7 +61,6 @@ class ShareActivity : BaseActivity() {
} }
private fun initView() { private fun initView() {
tvShareContent= findViewById(R.id.tv_share_conetent) tvShareContent= findViewById(R.id.tv_share_conetent)
tvShareUrl = findViewById(R.id.tv_share_url)
shareBtn = findViewById(R.id.tv_share_btn) shareBtn = findViewById(R.id.tv_share_btn)
aiBack=findViewById(R.id.aiBack) aiBack=findViewById(R.id.aiBack)
aiBack.setOnClickListener { aiBack.setOnClickListener {

View File

@ -21,6 +21,9 @@ import androidx.core.content.FileProvider
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.lifecycleScope import androidx.lifecycle.lifecycleScope
import com.afollestad.materialdialogs.MaterialDialog import com.afollestad.materialdialogs.MaterialDialog
import com.baidu.mobads.action.ActionType
import com.baidu.mobads.action.BaiduAction
import com.baidu.mobads.action.PrivacyStatus
import com.cncat.vpn.service.ClashManager import com.cncat.vpn.service.ClashManager
import com.cncat.vpn.service.remote.IClashManager import com.cncat.vpn.service.remote.IClashManager
import com.cncat.vpn.service.remote.wrap import com.cncat.vpn.service.remote.wrap
@ -130,12 +133,19 @@ class SplashActivity : BaseActivity() {
username = Utils.getUniqueID(this) username = Utils.getUniqueID(this)
MainApplication.initUtil() MainApplication.initUtil()
val oaId = OAID val oaId = OAID
Log.i("SplashActOAID", "OAID::" + OAID + "oaId.isEmpty()::" + oaId.isEmpty()) Log.i("SplashActOAID","OAID::"+OAID+"oaId.isEmpty()::"+oaId.isEmpty())
if(oaId.isEmpty()) { if(oaId.isEmpty()){
if (DeviceID.supportedOAID(this)) { if (DeviceID.supportedOAID(this)){
val aynOAID = DeviceIdentifier.getOAID(this) val aynOAID = DeviceIdentifier.getOAID(this)
OAID = aynOAID OAID=aynOAID
BaiduAction.setOaid(aynOAID)
//设置同意隐私政策激活设备
BaiduAction.setPrivacyStatus(PrivacyStatus.AGREE)
} }
}else{
BaiduAction.setOaid(oaId)
//设置同意隐私政策激活设备
BaiduAction.setPrivacyStatus(PrivacyStatus.AGREE)
} }
setLocalLanguage() setLocalLanguage()
val clashBinder = MainApplication.getApp()?.let { val clashBinder = MainApplication.getApp()?.let {

View File

@ -9,6 +9,7 @@ import android.content.res.Configuration
import android.os.Build import android.os.Build
import androidx.annotation.RequiresApi import androidx.annotation.RequiresApi
import androidx.core.content.getSystemService import androidx.core.content.getSystemService
import com.baidu.mobads.action.BaiduAction
import com.cncat.vpn.common.Global import com.cncat.vpn.common.Global
import com.cncat.vpn.common.compat.currentProcessName import com.cncat.vpn.common.compat.currentProcessName
import com.cncat.vpn.common.log.Log import com.cncat.vpn.common.log.Log
@ -20,6 +21,7 @@ import com.orhanobut.logger.Logger
import com.stripe.android.PaymentConfiguration import com.stripe.android.PaymentConfiguration
import com.tencent.mmkv.MMKV import com.tencent.mmkv.MMKV
import com.yingmao.clash.R import com.yingmao.clash.R
import com.yingmao.clash.conf.Constants
import com.yingmao.clash.entity.UserData import com.yingmao.clash.entity.UserData
import com.yingmao.clash.util.CrashCatchHandler import com.yingmao.clash.util.CrashCatchHandler
import com.yingmao.clash.util.clashDir import com.yingmao.clash.util.clashDir
@ -129,7 +131,13 @@ class MainApplication : Application() {
Global.init(mApp) Global.init(mApp)
val keepRootDir = MMKV.initialize(mApp) val keepRootDir = MMKV.initialize(mApp)
Logger.i("MMKV_ROOT_DIR:$keepRootDir") Logger.i("MMKV_ROOT_DIR:$keepRootDir")
// 是否在控制台输出⽇志可⽤于观察⽤⼾⾏为⽇志上报情况建议仅在调试时使⽤release版 请设置为false
BaiduAction.setPrintLog(false)
// 是否允许通过应用商店获取referrer信息仅支持华为、小米默认true
BaiduAction.enableMarketReferrer(true)
BaiduAction.init(this, Constants.USER_ACTION_SET_ID, Constants.APP_SECRET_KEY)
// 设置应用激活的间隔,此方法在初始化成功后才有意义,建议在初始化后执行,具体执行的时机没有限制
BaiduAction.setActivateInterval(this, 7)
} }
private fun extractGeoFiles() { private fun extractGeoFiles() {
clashDir.mkdirs() clashDir.mkdirs()

View File

@ -49,7 +49,7 @@ open class BaseActivity : AppCompatActivity(), CoroutineScope by MainScope(), Br
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED //竖屏 requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT //竖屏
StatusBarUtils.with(this).init() StatusBarUtils.with(this).init()
window.decorView.systemUiVisibility = window.decorView.systemUiVisibility =
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR

View File

@ -274,7 +274,7 @@ open class HomeFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispa
if (checkExpire()) { if (checkExpire()) {
if (isAdded) { if (isAdded) {
MaterialDialog(requireContext()).show { MaterialDialog(requireContext()).show {
this.cancelable(false) this.cancelable(true)
cornerRadius(res = R.dimen.dp_10) cornerRadius(res = R.dimen.dp_10)
customView( customView(
R.layout.expired_recharge__layout, R.layout.expired_recharge__layout,
@ -287,6 +287,12 @@ open class HomeFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispa
goNewRecharge() goNewRecharge()
dismiss() dismiss()
} }
getCustomView().findViewById<AppCompatImageView>(R.id.aivClose)
.setOnClickListener {
dismiss()
}
} }
} }
return@setOnClickListener return@setOnClickListener
@ -515,13 +521,12 @@ open class HomeFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispa
@Deprecated("Deprecated in Java") @Deprecated("Deprecated in Java")
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
android.util.Log.i("AAAAAAAAAAAAAAA","data:::${data}")
if (requestCode == 2) { if (requestCode == 2) {
nodeChooseBase(data) nodeChooseBase(data)
} }
} }
@SuppressLint("SimpleDateFormat") @SuppressLint("SimpleDateFormat", "LongLogTag")
fun setExpireDate() { fun setExpireDate() {
val isExpire = checkExpire() val isExpire = checkExpire()
var endTimeInfo = "--" var endTimeInfo = "--"

View File

@ -57,10 +57,9 @@ class VIPRechargeAdapter : RecyclerView.Adapter<VIPRechargeAdapter.VIPRechargeVi
override fun onBindViewHolder(holder: VIPRechargeViewHolder, @SuppressLint("RecyclerView") position: Int) { override fun onBindViewHolder(holder: VIPRechargeViewHolder, @SuppressLint("RecyclerView") position: Int) {
if(rechargeInfo.grade!=null) { if(rechargeInfo.grade!=null) {
holder.tvDiscount.text = holder.tvDayAverage.text ="${rechargeInfo.grade!![position].amount}" + context!!.resources.getString(
context!!.resources.getString(R.string.laPay) + "${rechargeInfo.grade!![position].amount}" + context!!.resources.getString( R.string.Yuan
R.string.Yuan ).replace("$", "")
).replace("$", "")
holder.cyn.text = "¥" holder.cyn.text = "¥"
if (rechargeInfo.grade!![position].days != null) { if (rechargeInfo.grade!![position].days != null) {
@ -76,8 +75,8 @@ class VIPRechargeAdapter : RecyclerView.Adapter<VIPRechargeAdapter.VIPRechargeVi
val data = rechargeInfo.grade?.getOrNull(position)?.amount!!.toDouble() val data = rechargeInfo.grade?.getOrNull(position)?.amount!!.toDouble()
.div(30 + totalGiftAmount) .div(30 + totalGiftAmount)
val tempStr = String.format("%.2f", data) val tempStr = String.format("%.2f", data)
holder.tvDayAverage.text = holder.tvDiscount.text =
context!!.resources.getString(R.string.Yuan).replace("$", tempStr) context!!.resources.getString(R.string.everyDay)+context!!.resources.getString(R.string.Yuan).replace("$", tempStr)
} }
} }
@ -88,8 +87,8 @@ class VIPRechargeAdapter : RecyclerView.Adapter<VIPRechargeAdapter.VIPRechargeVi
val data = rechargeInfo.grade?.getOrNull(position)?.amount!!.toDouble() val data = rechargeInfo.grade?.getOrNull(position)?.amount!!.toDouble()
.div(90 + totalGiftAmount) .div(90 + totalGiftAmount)
val tempStr = String.format("%.2f", data) val tempStr = String.format("%.2f", data)
holder.tvDayAverage.text = holder.tvDiscount.text =
context!!.resources.getString(R.string.Yuan).replace("$", tempStr) context!!.resources.getString(R.string.everyDay)+ context!!.resources.getString(R.string.Yuan).replace("$", tempStr)
} }
} }
@ -99,8 +98,8 @@ class VIPRechargeAdapter : RecyclerView.Adapter<VIPRechargeAdapter.VIPRechargeVi
val data = rechargeInfo.grade?.getOrNull(position)?.amount!!.toDouble() val data = rechargeInfo.grade?.getOrNull(position)?.amount!!.toDouble()
.div(180 + totalGiftAmount) .div(180 + totalGiftAmount)
val tempStr = String.format("%.2f", data) val tempStr = String.format("%.2f", data)
holder.tvDayAverage.text = holder.tvDiscount.text =
context!!.resources.getString(R.string.Yuan).replace("$", tempStr) context!!.resources.getString(R.string.everyDay)+ context!!.resources.getString(R.string.Yuan).replace("$", tempStr)
} }
} }
@ -110,8 +109,8 @@ class VIPRechargeAdapter : RecyclerView.Adapter<VIPRechargeAdapter.VIPRechargeVi
val data = rechargeInfo.grade?.getOrNull(position)?.amount!!.toDouble() val data = rechargeInfo.grade?.getOrNull(position)?.amount!!.toDouble()
.div(365 + totalGiftAmount) .div(365 + totalGiftAmount)
val tempStr = String.format("%.2f", data) val tempStr = String.format("%.2f", data)
holder.tvDayAverage.text = holder.tvDiscount.text =
context!!.resources.getString(R.string.Yuan).replace("$", tempStr) context!!.resources.getString(R.string.everyDay)+context!!.resources.getString(R.string.Yuan).replace("$", tempStr)
} }
} }
@ -122,7 +121,7 @@ class VIPRechargeAdapter : RecyclerView.Adapter<VIPRechargeAdapter.VIPRechargeVi
val data = rechargeInfo.grade?.getOrNull(position)?.amount!!.toDouble() val data = rechargeInfo.grade?.getOrNull(position)?.amount!!.toDouble()
.div(days!! + totalGiftAmount) .div(days!! + totalGiftAmount)
val tempStr = String.format("%.2f", data) val tempStr = String.format("%.2f", data)
holder.tvDayAverage.text = holder.tvDiscount.text =
context!!.resources.getString(R.string.Yuan).replace("$", tempStr) context!!.resources.getString(R.string.Yuan).replace("$", tempStr)
} }
} }
@ -130,13 +129,13 @@ class VIPRechargeAdapter : RecyclerView.Adapter<VIPRechargeAdapter.VIPRechargeVi
if (selectorPosition == position) { if (selectorPosition == position) {
holder.rechargeItemRl.isSelected = true holder.rechargeItemRl.isSelected = true
holder.rechargeItemRl.setBackgroundResource(R.drawable.oc_pay_choose_bg) holder.rechargeItemRl.setBackgroundResource(R.drawable.vip_item_choose_bg)
if (selectorPosition == 0) { if (selectorPosition == 0) {
listener?.onItemClick(rechargeInfo.grade?.getOrNull(position)) listener?.onItemClick(rechargeInfo.grade?.getOrNull(position))
} }
} else { } else {
holder.rechargeItemRl.isSelected = false holder.rechargeItemRl.isSelected = false
holder.rechargeItemRl.setBackgroundResource(R.drawable.oc_pay_item_bg) holder.rechargeItemRl.setBackgroundResource(R.drawable.vip_item_nochoose_bg)
} }
holder.rechargeItemRl.setOnClickListener { holder.rechargeItemRl.setOnClickListener {
listener?.onItemClick(rechargeInfo.grade?.getOrNull(position)) listener?.onItemClick(rechargeInfo.grade?.getOrNull(position))

View File

@ -69,6 +69,7 @@ import com.yingmao.clash.view.dialog.DialogDoMainChoose
import com.yingmao.clash.view.dialog.NoticeViewDialog import com.yingmao.clash.view.dialog.NoticeViewDialog
import com.yingmao.clash.view.dialog.RxDialogShapeLoading import com.yingmao.clash.view.dialog.RxDialogShapeLoading
import com.yingmao.clash.vm.MainAtyVM import com.yingmao.clash.vm.MainAtyVM
import com.yingmao.clash.webview.CustomerServiceWebView
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.MainScope import kotlinx.coroutines.MainScope
@ -139,7 +140,7 @@ class SettingFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatc
setExpireDate() setExpireDate()
tvVersion.text=requireActivity().resources.getString(R.string.edition) + "${BuildConfig.VERSION_NAME}." + BuildConfig.productId tvVersion.text=requireActivity().resources.getString(R.string.currentVersionNumber) + "${BuildConfig.VERSION_NAME}." + BuildConfig.productId
val settingItem= SettingPageBean( val settingItem= SettingPageBean(
1, 1,
@ -192,6 +193,11 @@ class SettingFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatc
resources.getString(R.string.InitializationRepair), resources.getString(R.string.InitializationRepair),
R.drawable.user_init_icon, R.drawable.user_init_icon,
) )
val customItem= SettingPageBean(
10,
resources.getString(R.string.OnlineCustomerService),
R.drawable.onlinecustomerservice_icon,
)
settingPageList.add(settingItem) settingPageList.add(settingItem)
@ -203,6 +209,7 @@ class SettingFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatc
settingPageList.add(upLoadData) settingPageList.add(upLoadData)
settingPageList.add(privacyPolicyItem) settingPageList.add(privacyPolicyItem)
settingPageList.add(initializationItem) settingPageList.add(initializationItem)
settingPageList.add(customItem)
val settingAdapter= SettingPageAdapter() val settingAdapter= SettingPageAdapter()
settingAdapter.setTagList(settingPageList,requireContext()) settingAdapter.setTagList(settingPageList,requireContext())
@ -305,6 +312,9 @@ class SettingFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatc
9->{ 9->{
initializationRepair() initializationRepair()
} }
10->{
startActivity(Intent(requireContext(), CustomerServiceWebView::class.java))
}
} }
} }

View File

@ -1,4 +1,4 @@
package com.yingmao.clash.fragment.activity package com.yingmao.clash.fragment.vip
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.Context import android.content.Context
@ -11,7 +11,6 @@ import android.widget.FrameLayout
import android.widget.ImageView import android.widget.ImageView
import android.widget.RelativeLayout import android.widget.RelativeLayout
import android.widget.TextView import android.widget.TextView
import androidx.annotation.RequiresApi
import androidx.appcompat.widget.AppCompatImageView import androidx.appcompat.widget.AppCompatImageView
import androidx.constraintlayout.widget.ConstraintLayout import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.net.toUri import androidx.core.net.toUri
@ -36,6 +35,7 @@ import com.yingmao.clash.BuildConfig
import com.yingmao.clash.R import com.yingmao.clash.R
import com.yingmao.clash.act.ExpensesRecordActivity import com.yingmao.clash.act.ExpensesRecordActivity
import com.yingmao.clash.act.LoginActivity import com.yingmao.clash.act.LoginActivity
import com.yingmao.clash.act.MainActivity
import com.yingmao.clash.act.MainActivity.Companion.isSubbed import com.yingmao.clash.act.MainActivity.Companion.isSubbed
import com.yingmao.clash.act.MainActivity.Companion.profileBinder import com.yingmao.clash.act.MainActivity.Companion.profileBinder
import com.yingmao.clash.conf.BZYConstants import com.yingmao.clash.conf.BZYConstants
@ -78,7 +78,7 @@ class vipFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatchers
private lateinit var rvRechargeList:RecyclerView private lateinit var rvRechargeList:RecyclerView
private lateinit var tvPay:TextView private lateinit var tvPay:TextView
private lateinit var tvRechargeRecord:AppCompatImageView private lateinit var tvRechargeRecord:AppCompatImageView
private lateinit var clCustom: ConstraintLayout private lateinit var clCustomTxt: ConstraintLayout
private var selectedGrade: Grade? = null private var selectedGrade: Grade? = null
private lateinit var rxDialogShapeLoading: RxDialogShapeLoading private lateinit var rxDialogShapeLoading: RxDialogShapeLoading
@ -96,6 +96,9 @@ class vipFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatchers
PaymentConfiguration.getInstance(requireContext()).publishableKey PaymentConfiguration.getInstance(requireContext()).publishableKey
) )
} }
companion object {
var isTopup = false
}
private val mPageInfo = ExpensesRecordActivity.PageInfo() private val mPageInfo = ExpensesRecordActivity.PageInfo()
@ -138,7 +141,7 @@ class vipFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatchers
rvRechargeList=view.findViewById(R.id.rvRechargeList) rvRechargeList=view.findViewById(R.id.rvRechargeList)
tvPay=view.findViewById(R.id.tvPay) tvPay=view.findViewById(R.id.tvPay)
tvRechargeRecord=view.findViewById(R.id.tvRechargeRecord) tvRechargeRecord=view.findViewById(R.id.tvRechargeRecord)
clCustom=view.findViewById(R.id.clCustom) clCustomTxt=view.findViewById(R.id.clCustomTxt)
tvUserName=view.findViewById(R.id.tvUserName) tvUserName=view.findViewById(R.id.tvUserName)
tvUserTimeEnd=view.findViewById(R.id.tvUserTimeEnd) tvUserTimeEnd=view.findViewById(R.id.tvUserTimeEnd)
@ -176,7 +179,7 @@ class vipFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatchers
viewModel.pay("1", selectedGrade!!, "pointCard") viewModel.pay("1", selectedGrade!!, "pointCard")
} }
clCustom.setOnClickListener { clCustomTxt.setOnClickListener {
startActivity(Intent(requireActivity(), CustomerServiceWebView::class.java)) startActivity(Intent(requireActivity(), CustomerServiceWebView::class.java))
} }
} }
@ -242,6 +245,7 @@ class vipFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatchers
if (rsp.data != null) { if (rsp.data != null) {
when (rsp.data.payModel) { when (rsp.data.payModel) {
1000 -> { 1000 -> {
isTopup=true
val orderInfo = rsp.data.appFormat val orderInfo = rsp.data.appFormat
if(orderInfo!=null){ if(orderInfo!=null){
CoroutineScope(Dispatchers.IO).launch { CoroutineScope(Dispatchers.IO).launch {
@ -276,6 +280,7 @@ class vipFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatchers
} }
} }
0->{ 0->{
isTopup=true
startActivity(Intent(Intent.ACTION_VIEW, rsp.data.payUrl?.toUri())) startActivity(Intent(Intent.ACTION_VIEW, rsp.data.payUrl?.toUri()))
} }
} }
@ -641,4 +646,17 @@ class vipFragment : BaseFragment(), CoroutineScope by CoroutineScope(Dispatchers
return true return true
} }
override fun onResume() {
super.onResume()
if(isTopup){
goMainCheck()
isTopup=false
}
}
private fun goMainCheck() {
if (activity != null) {
val uiMainActivity = activity as MainActivity
uiMainActivity.goCheckLogin()
}
}
} }

View File

@ -30,11 +30,9 @@ class NodeListAdapter(layoutResId: Int) :
val nodeListItem = holder.getView<ConstraintLayout>(R.id.rl_node_list_item) val nodeListItem = holder.getView<ConstraintLayout>(R.id.rl_node_list_item)
val nodeCheckMrb = holder.getView<AppCompatImageView>(R.id.mrb_node_checked) val nodeCheckMrb = holder.getView<AppCompatImageView>(R.id.mrb_node_checked)
if (holder.layoutPosition == selectedPosition) { if (holder.layoutPosition == selectedPosition) {
nodeListItem.isSelected = true nodeCheckMrb.setImageResource(R.drawable.check_img_select)
nodeCheckMrb.isSelected = true
} else { } else {
nodeListItem.isSelected = false nodeCheckMrb.setImageResource(R.drawable.check_img)
nodeCheckMrb.isSelected = false
} }
val nodeNameTv = holder.getView<TextView>(R.id.node_list_item_tv_node_name) val nodeNameTv = holder.getView<TextView>(R.id.node_list_item_tv_node_name)
@ -45,7 +43,7 @@ class NodeListAdapter(layoutResId: Int) :
signal.visibility=View.GONE signal.visibility=View.GONE
}else{ }else{
signal.visibility=View.VISIBLE signal.visibility=View.GONE
if (item.delay > 0) { if (item.delay > 0) {
if (item.delay >= 65535) { if (item.delay >= 65535) {
item.delay = Utils.generateRandomTwoDigitNumber(99, 300) item.delay = Utils.generateRandomTwoDigitNumber(99, 300)

Binary file not shown.

View File

@ -0,0 +1,30 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- This is the main color -->
<item>
<shape>
<!-- 边框颜色 -->
<gradient
android:angle="0"
android:endColor="#FFE9E7E7"
android:startColor="#FFE9E7E7" />
<corners android:radius="21dp" />
</shape>
</item>
<!-- 给View的上 左 右设置8dp的边框 -->
<item
android:bottom="3dp"
android:left="1dp"
android:right="3dp"
android:top="1dp">
<shape>
<!-- View填充颜色 -->
<solid android:color="#FF8A04" />
<gradient
android:angle="0"
android:endColor="#FFE9E7E7"
android:startColor="#FFE9E7E7" />
<corners android:radius="21dp" />
</shape>
</item>
</layer-list>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="22dp"
android:height="22dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M511.9,991c-64.7,0 -127.4,-12.7 -186.5,-37.7 -57,-24.2 -108.3,-58.7 -152.3,-102.7 -44,-44 -78.5,-95.2 -102.7,-152.3C45.5,639.3 32.8,576.5 32.8,511.8c0,-64.7 12.7,-127.4 37.7,-186.5 24.2,-57 58.7,-108.3 102.7,-152.3 44,-44 95.2,-78.5 152.3,-102.7 59.1,-25 121.9,-37.7 186.5,-37.7 64.7,0 127.4,12.7 186.5,37.7 57,24.2 108.3,58.7 152.3,102.7 44,44 78.5,95.2 102.7,152.3 25,59.1 37.7,121.9 37.7,186.5 0,64.7 -12.7,127.4 -37.7,186.5 -24.2,57 -58.7,108.3 -102.7,152.3 -44,44 -95.2,78.5 -152.3,102.7C639.4,978.3 576.6,991 511.9,991L511.9,991zM511.9,71.4c-59.5,0 -117.1,11.7 -171.4,34.6 -52.4,22.2 -99.5,54 -140,94.4 -40.4,40.4 -72.2,87.6 -94.4,140 -22.9,54.3 -34.6,111.9 -34.6,171.4 0,59.5 11.7,117.1 34.6,171.4 22.2,52.4 54,99.5 94.4,140 40.4,40.4 87.6,72.2 140,94.4 54.3,22.9 111.9,34.6 171.4,34.6 59.5,0 117.1,-11.7 171.4,-34.6 52.4,-22.2 99.5,-54 140,-94.4 40.4,-40.4 72.2,-87.6 94.4,-140 22.9,-54.3 34.6,-111.9 34.6,-171.4 0,-59.5 -11.7,-117.1 -34.6,-171.4 -22.2,-52.4 -54,-99.5 -94.4,-140 -40.4,-40.4 -87.6,-72.2 -140,-94.4C629,83 571.4,71.4 511.9,71.4L511.9,71.4zM511.9,71.4"
android:fillColor="#000"/>
</vector>

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="32dp"
android:height="32dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M512,162.1C319.1,162.1 162.1,319.1 162.1,512S319.1,861.9 512,861.9 861.9,704.9 861.9,512 704.9,162.1 512,162.1zM445.4,682.7l-129.7,-121.2 42.7,-44.4 88.7,83.6L662.2,392.5l46.1,41L445.4,682.7z"
android:fillColor="#FFFF6C03"/>
</vector>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true" android:drawable="@mipmap/check_img_select"/> <item android:state_selected="true" android:drawable="@drawable/check_img_select"/>
<item android:drawable="@mipmap/check_img"/> <item android:drawable="@drawable/check_img"/>
</selector> </selector>

View File

@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="25dp"
android:height="32dp"
android:viewportWidth="25"
android:viewportHeight="32">
<path
android:pathData="M21.157,10.614C21.157,5.875 16.761,2.021 11.359,2.021C5.957,2.021 1.562,5.875 1.562,10.614C1.562,13.263 2.966,15.777 5.335,17.398V19.236C5.335,19.774 5.643,20.281 6.112,20.523C6.331,20.643 6.578,20.705 6.826,20.705C7.122,20.705 7.408,20.62 7.619,20.474L8.75,19.733C8.776,19.717 8.813,19.693 8.855,19.659L9.728,19.084C10.276,19.166 10.824,19.208 11.359,19.208C16.761,19.208 21.157,15.353 21.157,10.614ZM11.359,18.082C10.814,18.082 10.254,18.034 9.694,17.939C9.552,17.915 9.406,17.945 9.286,18.024L8.197,18.742C8.175,18.756 8.154,18.772 8.134,18.79C8.135,18.789 8.135,18.789 8.135,18.789C8.134,18.789 8.126,18.794 8.109,18.804L6.983,19.543C6.945,19.568 6.79,19.609 6.644,19.53C6.54,19.476 6.467,19.355 6.467,19.236V17.096C6.467,16.905 6.369,16.726 6.207,16.623C4.007,15.22 2.694,12.973 2.694,10.614C2.694,6.496 6.581,3.146 11.359,3.146C16.137,3.146 20.024,6.496 20.024,10.614C20.024,14.732 16.137,18.082 11.359,18.082ZM7.933,9.48C7.395,9.48 6.957,9.914 6.957,10.446C6.957,10.978 7.395,11.412 7.933,11.412C8.47,11.412 8.908,10.978 8.908,10.446C8.908,9.914 8.47,9.48 7.933,9.48ZM11.579,9.48C11.041,9.48 10.603,9.914 10.603,10.446C10.603,10.978 11.041,11.412 11.579,11.412C12.116,11.412 12.554,10.978 12.554,10.446C12.554,9.914 12.116,9.48 11.579,9.48ZM15.225,9.48C14.687,9.48 14.249,9.914 14.249,10.446C14.249,10.978 14.687,11.412 15.225,11.412C15.762,11.412 16.2,10.978 16.2,10.446C16.2,9.914 15.762,9.48 15.225,9.48ZM23.268,13.604C23.166,13.186 23.014,12.768 22.816,12.36C22.678,12.075 22.336,11.956 22.051,12.094C21.766,12.233 21.647,12.576 21.785,12.861C21.948,13.197 22.072,13.538 22.154,13.875C22.246,14.253 22.292,14.653 22.292,15.063C22.292,16.805 21.343,18.484 19.752,19.555C19.674,19.607 19.61,19.678 19.566,19.761C19.522,19.844 19.499,19.937 19.499,20.031V21.495C19.499,21.614 19.439,21.723 19.338,21.794C19.161,21.851 19.045,21.844 18.938,21.772L18.127,21.239C18.106,21.219 18.083,21.201 18.06,21.185L17.355,20.71C17.234,20.629 17.087,20.597 16.944,20.62C15.344,20.878 13.783,20.63 12.43,19.902C12.364,19.866 12.291,19.844 12.216,19.836C12.141,19.828 12.066,19.836 11.994,19.857C11.922,19.879 11.854,19.915 11.796,19.963C11.738,20.01 11.69,20.069 11.654,20.136C11.504,20.415 11.609,20.763 11.887,20.913C13.4,21.727 15.128,22.027 16.899,21.787L17.359,22.097C17.417,22.152 17.475,22.188 17.515,22.21L18.306,22.73C18.551,22.893 18.838,22.98 19.136,22.98C19.341,22.98 19.552,22.939 19.781,22.855C19.811,22.845 19.839,22.831 19.866,22.816C20.346,22.545 20.644,22.038 20.644,21.495V20.329C22.399,19.04 23.438,17.092 23.438,15.063C23.438,14.562 23.381,14.071 23.268,13.604Z"
android:fillColor="#0387FD"/>
<path
android:pathData="M3,28.5a9.5,0.5 0,1 0,19 0a9.5,0.5 0,1 0,-19 0z"
android:fillColor="#0387FD"/>
</vector>

View File

@ -5,8 +5,8 @@ android:color="#BFD5D5D5" >
<shape> <shape>
<gradient android:type="linear" <gradient android:type="linear"
android:angle="180" android:angle="180"
android:startColor="#FFF3E5" android:startColor="#FFABD6FB"
android:endColor="#FFF3E5" android:endColor="#FF94A4FE"
/> />
</shape> </shape>
</item> </item>

View File

@ -0,0 +1,19 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- This is the main color -->
<item>
<shape>
<!-- 边框颜色 -->
<gradient android:startColor="#FFFA6407" android:endColor="#FFFF9345" android:angle="0"/>
<corners android:radius="16dp"/>
</shape>
</item>
<!-- 给View的上 左 右设置8dp的边框 -->
<item android:top="2dp" android:left="2dp" android:right="2dp" android:bottom="2dp" >
<shape>
<!-- View填充颜色 -->
<solid android:color="#FFFFE6D5" />
<corners android:radius="16dp"/>
</shape>
</item>
</layer-list>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="#BFD5D5D5" >
<item>
<shape>
<gradient
android:angle="360"
android:endColor="#FFFFFFFF"
android:startColor="#FFFFFFFF" />
<corners android:radius="16dp"/>
</shape>
</item>
</ripple>

View File

@ -0,0 +1,20 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- This is the main color -->
<item>
<shape>
<!-- 边框颜色 -->
<solid android:color="#FFCBCBCB"/>
<corners android:topRightRadius="24dp" android:topLeftRadius="24dp" android:bottomLeftRadius="24dp" android:bottomRightRadius="24dp"/>
</shape>
</item>
<!-- 给View的上 左 右设置8dp的边框 -->
<item android:top="1dp" android:left="1dp" android:right="4dp" android:bottom="4dp" >
<shape>
<!-- View填充颜色 -->
<solid android:color="#FFCBCBCB" />
<corners android:topRightRadius="24dp" android:topLeftRadius="24dp" android:bottomLeftRadius="24dp" android:bottomRightRadius="24dp"/>
</shape>
</item>
</layer-list>

View File

@ -0,0 +1,20 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- This is the main color -->
<item>
<shape>
<!-- 边框颜色 -->
<solid android:color="#FFFFFFFF"/>
<corners android:topRightRadius="24dp" android:topLeftRadius="24dp" android:bottomLeftRadius="24dp" android:bottomRightRadius="24dp"/>
</shape>
</item>
<!-- 给View的上 左 右设置8dp的边框 -->
<item android:top="1dp" android:left="1dp" android:right="4dp" android:bottom="4dp" >
<shape>
<!-- View填充颜色 -->
<solid android:color="#FFFFFFFF" />
<corners android:topRightRadius="24dp" android:topLeftRadius="24dp" android:bottomLeftRadius="24dp" android:bottomRightRadius="24dp"/>
</shape>
</item>
</layer-list>

View File

@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="32dp"
android:height="32dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M512,930c-230.4,0 -418,-187.6 -418,-418s187.6,-418 418,-418 418,187.6 418,418 -187.6,418 -418,418zM512,135.8c-207.4,0 -376.2,168.8 -376.2,376.2s168.8,376.2 376.2,376.2 376.2,-168.8 376.2,-376.2 -168.8,-376.2 -376.2,-376.2z"
android:fillColor="#333333"/>
<path
android:pathData="M355.3,689.6c-5.2,0 -10.4,-2.1 -14.6,-6.3 -8.4,-8.4 -8.4,-21.4 0,-29.8l313.5,-313.5c8.4,-8.4 21.4,-8.4 29.8,0 8.4,8.4 8.4,21.4 0,29.8l-313.5,313.5c-4.7,4.2 -9.9,6.3 -15.2,6.3z"
android:fillColor="#333333"/>
<path
android:pathData="M668.7,689.6c-5.2,0 -10.4,-2.1 -14.6,-6.3l-313.5,-313.5c-8.4,-8.4 -8.4,-21.4 0,-29.8 8.4,-8.4 21.4,-8.4 29.8,0l313.5,313.5c8.4,8.4 8.4,21.4 0,29.8 -4.7,4.2 -9.9,6.3 -15.2,6.3z"
android:fillColor="#333333"/>
</vector>

View File

@ -0,0 +1,24 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="34dp"
android:height="59dp"
android:viewportWidth="34"
android:viewportHeight="59">
<path
android:pathData="M14.116,51.06V55.442H13.136V54.84H7.116V55.442H6.136V51.06H14.116ZM7.116,53.93H13.136V51.97H7.116V53.93ZM8.236,44.816L9.216,45.026C9.006,45.348 8.796,45.656 8.572,45.95H13.738V46.762C13.164,47.56 12.338,48.26 11.26,48.876C12.786,49.478 14.494,49.842 16.384,49.982L16.16,50.892C13.92,50.724 11.946,50.234 10.21,49.394C8.558,50.15 6.472,50.738 3.952,51.172L3.574,50.276C5.828,49.912 7.704,49.45 9.188,48.862C8.474,48.442 7.816,47.966 7.214,47.434C6.668,47.924 6.08,48.358 5.464,48.75L4.82,47.966C6.206,47.168 7.34,46.118 8.236,44.816ZM10.224,48.414C11.19,47.938 11.96,47.392 12.534,46.804H7.844L7.802,46.846C8.544,47.462 9.356,47.98 10.224,48.414ZM15.684,43.612V46.258H14.662V44.522H5.338V46.258H4.316V43.612H9.44C9.272,43.248 9.104,42.926 8.922,42.632L10.028,42.464C10.196,42.8 10.35,43.192 10.518,43.612H15.684ZM19.548,47.35V49.688H21.802V47.35H19.548ZM21.802,46.44V44.074H19.548V46.44H21.802ZM19.534,50.598C19.45,52.558 19.114,54.168 18.54,55.428L17.784,54.728C18.344,53.468 18.624,51.844 18.638,49.884V43.164H22.726V54.084C22.726,54.924 22.334,55.358 21.55,55.358H20.43L20.192,54.462C20.584,54.49 20.934,54.518 21.27,54.518C21.62,54.518 21.802,54.266 21.802,53.762V50.598H19.534ZM24.854,49.212V55.414H23.902V43.15H29.572C29.572,44.886 29.488,46.034 29.32,46.594C29.152,47.168 28.634,47.462 27.752,47.462H26.618L26.352,46.594C26.59,46.594 26.898,46.608 27.29,46.608C27.626,46.608 27.864,46.58 28.032,46.538C28.2,46.482 28.326,46.342 28.41,46.132C28.508,45.824 28.564,45.138 28.592,44.074H24.854V48.316H29.614V49.17C29.348,50.612 28.886,51.844 28.242,52.852C28.872,53.468 29.614,54.014 30.468,54.504L29.964,55.358C29.068,54.84 28.312,54.266 27.668,53.636C27.052,54.35 26.338,54.924 25.498,55.372L24.966,54.56C25.764,54.126 26.436,53.58 26.996,52.908C26.1,51.816 25.498,50.584 25.19,49.212H24.854ZM26.058,49.212C26.352,50.29 26.856,51.256 27.57,52.124C28.088,51.284 28.466,50.318 28.718,49.212H26.058Z"
android:fillColor="#000000"/>
<path
android:pathData="M29.5,4.884C26.248,1.685 21.68,-0.144 17.112,0.009C12.39,-0.067 7.822,1.685 4.57,4.884C1.551,7.93 -0.075,11.891 0.003,16.004C0.003,18.823 0.777,21.565 2.093,23.926L1.009,27.049C0.622,28.191 0.854,29.41 1.706,30.324C2.403,31.086 3.254,31.467 4.261,31.467C4.493,31.467 4.648,31.467 4.88,31.391L9.68,30.553C11.925,31.543 14.403,32 16.958,32H17.345C21.912,32 26.248,30.248 29.422,27.125C32.519,24.078 34.145,20.118 33.99,16.004C34.145,11.815 32.519,7.93 29.5,4.884ZM17.035,24.383C12.235,24.383 8.364,20.651 8.364,16.004C8.364,15.167 9.061,14.481 9.912,14.481C10.764,14.481 11.461,15.167 11.461,16.004C11.461,18.975 13.938,21.336 17.035,21.336C20.132,21.336 22.609,18.975 22.609,16.004C22.609,15.167 23.306,14.481 24.158,14.481C25.009,14.481 25.706,15.167 25.706,16.004C25.706,20.651 21.835,24.383 17.035,24.383Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="17"
android:startY="0"
android:endX="17"
android:endY="32"
android:type="linear">
<item android:offset="0" android:color="#FF5788FF"/>
<item android:offset="1" android:color="#FF00C9F0"/>
</gradient>
</aapt:attr>
</path>
</vector>

View File

@ -0,0 +1,24 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- This is the main color -->
<item>
<shape>
<!-- 边框颜色 -->
<gradient android:startColor="#fff" android:endColor="#fff" android:angle="0"/>
<corners android:radius="15dp"/>
</shape>
</item>
<!-- 给View的上 左 右设置8dp的边框 -->
<item
android:bottom="3dp"
android:left="1dp"
android:right="3dp"
android:top="1dp">
<shape>
<!-- View填充颜色 -->
<solid android:color="#FF8A04" />
<gradient android:startColor="#fff" android:endColor="#fff" android:angle="0"/>
<corners android:radius="15dp" />
</shape>
</item>
</layer-list>

View File

@ -5,7 +5,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="@mipmap/oc_index_bg" android:background="#FF6FA2FA"
tools:context=".act.ChangeNodeActivity" tools:context=".act.ChangeNodeActivity"
android:padding="@dimen/dp_10"> android:padding="@dimen/dp_10">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@ -27,16 +27,17 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
android:tint="@color/white"
/> />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="#B36C1B" android:textColor="#FFFFFFFF"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
android:text="@string/changeLocation" android:text="@string/LineChoose"
android:textSize="18sp" android:textSize="18sp"
android:textStyle="bold" android:textStyle="bold"
/> />
@ -66,17 +67,17 @@
android:layout_marginTop="18dp" android:layout_marginTop="18dp"
app:layout_constraintTop_toBottomOf="@id/node_user_traffic" app:layout_constraintTop_toBottomOf="@id/node_user_traffic"
android:orientation="horizontal" android:orientation="horizontal"
android:background="@drawable/oc_proxy_bg" android:background="@drawable/yil_node_proxy_bg"
> >
<TextView <TextView
android:id="@+id/tvProA" android:id="@+id/tvProA"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/oc_proxy_choose_bg" android:background="@drawable/yil_node_proxy_choose_bg"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/anqpro" android:text="@string/anqpro"
android:gravity="center" android:gravity="center"
android:textColor="@color/white" android:textColor="#FF2D2D2D"
android:paddingTop="10dp" android:paddingTop="10dp"
android:paddingBottom="10dp" android:paddingBottom="10dp"
/> />
@ -87,7 +88,7 @@
android:layout_weight="1" android:layout_weight="1"
android:text="@string/jsmpri" android:text="@string/jsmpri"
android:gravity="center" android:gravity="center"
android:textColor="#B36C1B" android:textColor="#FF2D2D2D"
android:paddingTop="10dp" android:paddingTop="10dp"
android:paddingBottom="10dp" android:paddingBottom="10dp"
/> />
@ -102,6 +103,8 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginBottom="@dimen/dp_10" android:layout_marginBottom="@dimen/dp_10"
android:layout_marginStart="11dp"
android:layout_marginEnd="11dp"
> >
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_node_list" android:id="@+id/rv_node_list"

View File

@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@mipmap/oc_index_bg" android:background="@drawable/yjl_setting_bg"
> >
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clTitle" android:id="@+id/clTitle"
@ -24,11 +24,12 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
android:tint="#000"
/> />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/orange_B36C1B" android:textColor="#000"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"

View File

@ -16,11 +16,6 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@+id/bottom_navigation" app:layout_constraintBottom_toTopOf="@+id/bottom_navigation"
android:layout_marginLeft="0dp"
android:layout_marginStart="0dp"
android:layout_marginEnd="0dp"
android:layout_marginRight="0dp"
android:layout_marginBottom="0dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior" app:layout_behavior="@string/appbar_scrolling_view_behavior"
> >

View File

@ -16,8 +16,8 @@
android:layout_marginRight="20dp" android:layout_marginRight="20dp"
android:gravity="center" android:gravity="center"
android:text="@string/DeviceBinding" android:text="@string/DeviceBinding"
android:textColor="#B36C1B" android:textColor="#FF333333"
android:textSize="18sp" android:textSize="20sp"
android:textStyle="bold" /> android:textStyle="bold" />
<LinearLayout <LinearLayout
@ -26,27 +26,10 @@
android:layout_margin="@dimen/dp_10" android:layout_margin="@dimen/dp_10"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView
android:id="@+id/tv_pay_cancle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_weight="1"
android:background="@drawable/oc_login_bg"
android:textColor="@color/white"
android:gravity="center"
android:paddingLeft="20dp"
android:paddingTop="@dimen/dp_10"
android:paddingRight="20dp"
android:paddingBottom="@dimen/dp_10"
android:text="@string/cancel"
/>
<TextView <TextView
android:id="@+id/tv_pay_finish" android:id="@+id/tv_pay_finish"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginBottom="20dp" android:layout_marginBottom="20dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/oc_login_bg" android:background="@drawable/oc_login_bg"
@ -58,5 +41,21 @@
android:paddingBottom="@dimen/dp_10" android:paddingBottom="@dimen/dp_10"
android:text="@string/binding" android:text="@string/binding"
/> />
<TextView
android:id="@+id/tv_pay_cancle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginLeft="50dp"
android:layout_weight="1"
android:background="@drawable/bing_bg"
android:textColor="#FF333333"
android:gravity="center"
android:paddingLeft="20dp"
android:paddingTop="@dimen/dp_10"
android:paddingRight="20dp"
android:paddingBottom="@dimen/dp_10"
android:text="@string/cancel"
/>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@ -3,7 +3,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@mipmap/oc_index_bg" android:background="@drawable/yjl_setting_bg"
android:id="@+id/root_view" android:id="@+id/root_view"
android:orientation="vertical" android:orientation="vertical"
> >

View File

@ -1,21 +1,36 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@drawable/pay_dialog_bg" android:background="@drawable/pay_dialog_bg"
android:gravity="center" android:gravity="center"
android:orientation="vertical"> android:orientation="vertical">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/aivClose"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:src="@drawable/yjl_close_vbg"
android:layout_marginEnd="20dp"
android:layout_marginTop="10dp"
/>
<TextView <TextView
android:id="@+id/tvShowTime"
android:textStyle="bold" android:textStyle="bold"
android:gravity="center" android:gravity="center"
android:textSize="18sp" android:textSize="18sp"
android:textColor="#B36C1B" android:textColor="#FF000000"
android:text="@string/TimeOver" android:text="@string/TimeOver"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="30dp" android:layout_marginTop="20dp"
android:layout_marginBottom="20dp" /> app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/aivClose"
/>
<TextView <TextView
android:id="@+id/tv_pay_finish" android:id="@+id/tv_pay_finish"
@ -24,6 +39,7 @@
android:layout_marginBottom="20dp" android:layout_marginBottom="20dp"
android:layout_marginStart="30dp" android:layout_marginStart="30dp"
android:layout_marginEnd="30dp" android:layout_marginEnd="30dp"
android:layout_marginTop="10dp"
android:background="@drawable/oc_login_bg" android:background="@drawable/oc_login_bg"
android:textColor="@color/white" android:textColor="@color/white"
android:gravity="center" android:gravity="center"
@ -32,5 +48,9 @@
android:paddingRight="20dp" android:paddingRight="20dp"
android:paddingBottom="@dimen/dp_10" android:paddingBottom="@dimen/dp_10"
android:text="@string/GORecharge" android:text="@string/GORecharge"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvShowTime"
/> />
</LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -19,9 +19,7 @@
android:id="@+id/clUserCard" android:id="@+id/clUserCard"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="48dp" android:layout_marginTop="48dp"
android:layout_marginEnd="12dp"
android:background="@drawable/yjl_home_user_bg" android:background="@drawable/yjl_home_user_bg"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -73,7 +71,7 @@
android:maxLines="1" android:maxLines="1"
android:text="" android:text=""
android:textColor="#FFF96B10" android:textColor="#FFF96B10"
android:textSize="12dp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
@ -174,8 +172,8 @@
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/ivAccelerate" android:id="@+id/ivAccelerate"
android:layout_width="250dp" android:layout_width="match_parent"
android:layout_height="250dp" android:layout_height="300dp"
android:src="@mipmap/yjl_home_clink_bg" android:src="@mipmap/yjl_home_clink_bg"
/> />
@ -270,7 +268,7 @@
android:id="@+id/tvNodeName" android:id="@+id/tvNodeName"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/CurrentRoute" android:text="@string/AutomaticSelection"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold" android:textStyle="bold"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"

View File

@ -190,7 +190,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/layout_login_tv_login_start_margin" android:layout_marginStart="@dimen/layout_login_tv_login_start_margin"
android:layout_marginTop="30dp" android:layout_marginTop="10dp"
android:layout_marginEnd="@dimen/layout_login_tv_login_end_margin" android:layout_marginEnd="@dimen/layout_login_tv_login_end_margin"
android:background="@drawable/oc_login_bg" android:background="@drawable/oc_login_bg"
android:gravity="center" android:gravity="center"
@ -237,7 +237,7 @@
android:id="@+id/tvRegister" android:id="@+id/tvRegister"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="18dp" android:layout_marginTop="10dp"
android:background="@drawable/yjl_register_login_bg" android:background="@drawable/yjl_register_login_bg"
android:ellipsize="end" android:ellipsize="end"
android:gravity="center" android:gravity="center"
@ -249,7 +249,6 @@
android:textSize="16sp" android:textSize="16sp"
app:layout_constraintEnd_toEndOf="@+id/tv_login" app:layout_constraintEnd_toEndOf="@+id/tv_login"
app:layout_constraintStart_toStartOf="@+id/tv_login" app:layout_constraintStart_toStartOf="@+id/tv_login"
app:layout_constraintTop_toBottomOf="@+id/tv_login" /> app:layout_constraintTop_toBottomOf="@+id/tv_login" />
<TextView <TextView
@ -261,10 +260,13 @@
android:text="@string/loginTips" android:text="@string/loginTips"
android:textColor="#828282" android:textColor="#828282"
android:textSize="12sp" android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvRegister" /> app:layout_constraintEnd_toEndOf="parent"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
app:layout_constraintTop_toBottomOf="@+id/tvRegister"
android:layout_marginTop="10dp"
/>
<TextView <TextView
android:id="@+id/tv_kefu" android:id="@+id/tv_kefu"
@ -292,9 +294,22 @@
android:visibility="visible" android:visibility="visible"
app:layout_constraintStart_toStartOf="@+id/tv_password" app:layout_constraintStart_toStartOf="@+id/tv_password"
app:layout_constraintTop_toBottomOf="@+id/llPassword" /> app:layout_constraintTop_toBottomOf="@+id/llPassword" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/customService"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginEnd="20dp"
android:contentDescription="@string/OnlineCustomerService"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:srcCompat="@drawable/yjl_logoing_cust"
app:backgroundTint="#fff"
app:tint="@null"
app:maxImageSize="40dp"
app:useCompatPadding="false"
/>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -4,8 +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"
tools:ignore="MissingConstraints" android:background="#FFF">
android:background="@mipmap/oc_index_bg">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clTitle" android:id="@+id/clTitle"
@ -30,129 +29,65 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="#B36C1B" android:textColor="#FF333333"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
android:text="@string/SharingTime" android:text="@string/share"
android:textSize="18sp" android:textSize="18sp"
/> />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<ImageView <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/iv_gif" android:layout_width="match_parent"
android:layout_width="0dp" android:layout_height="500dp"
android:contentDescription="@string/share" android:background="@mipmap/yjl_share_bg"
app:layout_constraintWidth_percent="0.55"
app:layout_constraintHeight_percent="0.25"
android:layout_height="0dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:scaleType="centerInside"
android:src="@drawable/oc_dog"
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_toBottomOf="@+id/clTitle"
/> android:layout_marginTop="50dp"
android:layout_marginStart="20dp"
<androidx.constraintlayout.widget.ConstraintLayout android:layout_marginEnd="20dp"
android:id="@+id/clTXT"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@+id/iv_gif"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:background="@drawable/oc_language_bg"
android:layout_marginStart="31dp"
android:layout_marginEnd="31dp"
android:layout_marginTop="21dp"
> >
<TextView <TextView
android:id="@+id/tv_share_title" 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_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="16dp"
android:text="@string/RecommendFriends"
android:textColor="#B36C1B"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<TextView
android:id="@+id/tv_share_conetent"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_share_title"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
android:layout_below="@id/tv_share_title" android:layout_marginBottom="24dp"
android:layout_centerHorizontal="true" android:text="@string/shareNow"
android:layout_marginTop="11dp" android:textSize="16sp"
android:layout_marginStart="16dp" android:textColor="#FFFF961C"
android:layout_marginEnd="16dp" android:textStyle="bold"
android:layout_marginBottom="16dp" android:paddingStart="62dp"
android:textColor="@color/gray_828282" android:paddingEnd="62dp"
android:textSize="12sp" /> android:paddingTop="13dp"
android:paddingBottom="13dp"
android:background="@drawable/yjl_share_bt_bg"
/>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<View
android:id="@+id/line"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray_828282"
android:layout_marginStart="31dp"
android:layout_marginEnd="31dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/clTXT"
android:layout_marginTop="21dp"
android:visibility="gone"
/>
<TextView
android:id="@+id/tv_share_url"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/line"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_10"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:textColor="@color/gray_828282"
android:textSize="12sp"
android:layout_marginStart="31dp"
android:visibility="gone"
android:layout_marginEnd="31dp"
/>
<TextView
android:id="@+id/tv_share_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="46dp"
android:background="@drawable/oc_login_bg"
android:gravity="center"
android:paddingTop="@dimen/layout_login_tv_login_top_padding"
android:paddingBottom="@dimen/layout_login_tv_login_bottom_padding"
android:text="@string/ShareLink"
android:textColor="@color/white"
android:textSize="@dimen/layout_login_tv_login_textsize"
android:textStyle="bold"
android:visibility="visible"
android:shadowColor="#9AB4FE"
android:layout_marginStart="31dp"
android:layout_marginEnd="31dp"
/>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -38,23 +38,7 @@
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:indeterminateTint="@color/blue_0136CB" android:indeterminateTint="@color/blue_0136CB"
android:visibility="invisible" /> android:visibility="invisible" />
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="centerInside"
android:src="@drawable/oc_pdy"
android:layout_marginBottom="20dp"
android:layout_centerInParent="true"
/>
<TextView
android:id="@+id/jmTips"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/jumapStr"
android:layout_marginBottom="40dp"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
/>
<LinearLayout <LinearLayout
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_centerInParent="true" android:layout_centerInParent="true"
@ -160,7 +144,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:layout_marginBottom="80dp" android:layout_marginBottom="180dp"
android:visibility="gone"> android:visibility="gone">
<ProgressBar <ProgressBar

View File

@ -106,14 +106,14 @@
app:layout_constraintTop_toTopOf="@+id/userIcon" app:layout_constraintTop_toTopOf="@+id/userIcon"
app:layout_constraintBottom_toBottomOf="@+id/userIcon" app:layout_constraintBottom_toBottomOf="@+id/userIcon"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_marginEnd="108dp" android:layout_marginEnd="20dp"
android:orientation="vertical" android:orientation="vertical"
> >
<TextView <TextView
android:id="@+id/tvUserName" android:id="@+id/tvUserName"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="ID:33333AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" android:text=""
android:textColor="#FF333333" android:textColor="#FF333333"
android:textSize="14sp" android:textSize="14sp"
android:maxLines="1" android:maxLines="1"
@ -126,7 +126,7 @@
android:id="@+id/tvUserTimeEnd" android:id="@+id/tvUserTimeEnd"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="ID:33333AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" android:text=""
android:textColor="#FFF96B10" android:textColor="#FFF96B10"
android:textSize="14sp" android:textSize="14sp"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
@ -173,9 +173,9 @@
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipeLayout" android:id="@+id/swipeLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="350dp" android:layout_height="280dp"
android:layout_marginTop="@dimen/dp_10" android:layout_marginTop="7dp"
android:layout_marginBottom="16dp" android:layout_marginBottom="13dp"
app:layout_constraintBottom_toTopOf="@+id/clCustomTxt" app:layout_constraintBottom_toTopOf="@+id/clCustomTxt"
app:layout_constraintTop_toBottomOf="@+id/textView3" app:layout_constraintTop_toBottomOf="@+id/textView3"
tools:layout_editor_absoluteX="10dp"> tools:layout_editor_absoluteX="10dp">
@ -222,15 +222,17 @@
android:id="@+id/tvTxtShowLink" android:id="@+id/tvTxtShowLink"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="5dp"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:padding="5dp"
android:text="@string/LinekCustom" android:text="@string/LinekCustom"
android:textColor="#FFFC4863" android:textColor="#FFFC4863"
android:textSize="14sp" android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toEndOf="@+id/tvTxtShow" app:layout_constraintStart_toEndOf="@+id/tvTxtShow"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<TextView <TextView
android:id="@+id/tvPay" android:id="@+id/tvPay"

View File

@ -6,7 +6,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:background="@drawable/home_node_bg" android:background="@drawable/yil_home_node_bg"
android:clickable="true" android:clickable="true"
android:focusable="true"> android:focusable="true">
@ -26,15 +26,17 @@
<TextView <TextView
android:id="@+id/node_list_item_tv_node_name" android:id="@+id/node_list_item_tv_node_name"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginEnd="10dp"
android:layout_toEndOf="@id/node_list_item_iv_country" android:layout_toEndOf="@id/node_list_item_iv_country"
android:text="" android:text=""
android:textColor="#0136CB" android:textColor="#FF000000"
android:textSize="16sp" android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="@+id/node_list_item_iv_country" app:layout_constraintBottom_toBottomOf="@+id/node_list_item_iv_country"
app:layout_constraintEnd_toStartOf="@+id/tv_ping_time"
app:layout_constraintStart_toEndOf="@+id/node_list_item_iv_country" app:layout_constraintStart_toEndOf="@+id/node_list_item_iv_country"
app:layout_constraintTop_toTopOf="@+id/node_list_item_iv_country" /> app:layout_constraintTop_toTopOf="@+id/node_list_item_iv_country" />
@ -43,7 +45,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/dp_15" android:layout_marginEnd="30dp"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toStartOf="@+id/mrb_node_checked" app:layout_constraintEnd_toStartOf="@+id/mrb_node_checked"
android:textColor="#0136CB" android:textColor="#0136CB"
@ -56,6 +58,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:visibility="gone"
android:contentDescription="@string/qr_pay_note_wx" android:contentDescription="@string/qr_pay_note_wx"
android:src="@drawable/ic_wifi_powerful" android:src="@drawable/ic_wifi_powerful"
app:layout_constraintBottom_toBottomOf="@+id/node_list_item_tv_node_name" app:layout_constraintBottom_toBottomOf="@+id/node_list_item_tv_node_name"
@ -66,10 +69,8 @@
android:id="@+id/mrb_node_checked" android:id="@+id/mrb_node_checked"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="21dp" android:layout_marginEnd="21dp"
android:background="@drawable/home_node_img_bg" android:src="@drawable/check_img"
android:clickable="false" android:clickable="false"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View File

@ -34,11 +34,8 @@
android:id="@+id/clUserPage" android:id="@+id/clUserPage"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="20dp" android:layout_marginTop="10dp"
android:layout_marginTop="17dp"
android:layout_marginEnd="12dp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/clTitle"> app:layout_constraintTop_toBottomOf="@+id/clTitle">
@ -46,8 +43,8 @@
android:id="@+id/userIcon" android:id="@+id/userIcon"
android:layout_width="60dp" android:layout_width="60dp"
android:layout_height="60dp" android:layout_height="60dp"
android:layout_marginStart="15dp" android:layout_marginStart="10dp"
android:layout_marginTop="15dp" android:layout_marginTop="10dp"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:src="@mipmap/yjl_usericon" android:src="@mipmap/yjl_usericon"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
@ -73,7 +70,7 @@
android:drawablePadding="5dp" android:drawablePadding="5dp"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="1" android:maxLines="1"
android:text="ID:33333AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" android:text=""
android:textColor="#FF333333" android:textColor="#FF333333"
android:textSize="16sp" /> android:textSize="16sp" />
@ -86,9 +83,9 @@
android:drawablePadding="5dp" android:drawablePadding="5dp"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="1" android:maxLines="1"
android:text="ID:33333AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" android:text=""
android:textColor="#FFF96B10" android:textColor="#FFF96B10"
android:textSize="16sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
@ -184,9 +181,9 @@
android:id="@+id/goGetVip" android:id="@+id/goGetVip"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="20dp" android:layout_marginTop="10dp"
android:layout_marginEnd="17dp" android:layout_marginEnd="17dp"
android:layout_marginBottom="20dp" android:layout_marginBottom="10dp"
android:background="@drawable/givip_bg" android:background="@drawable/givip_bg"
android:paddingStart="10dp" android:paddingStart="10dp"
android:paddingTop="8dp" android:paddingTop="8dp"
@ -263,9 +260,9 @@
android:id="@+id/goSee" android:id="@+id/goSee"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="20dp" android:layout_marginTop="10dp"
android:layout_marginEnd="17dp" android:layout_marginEnd="17dp"
android:layout_marginBottom="20dp" android:layout_marginBottom="10dp"
android:background="@drawable/givip_see_bg" android:background="@drawable/givip_see_bg"
android:paddingStart="10dp" android:paddingStart="10dp"
android:paddingTop="8dp" android:paddingTop="8dp"
@ -315,7 +312,7 @@
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_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="20dp" android:layout_marginBottom="10dp"
/> />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,10 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout 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"
android:id="@+id/rl_item_layout" android:id="@+id/rl_item_layout"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="5dp"> android:layout_marginStart="20dp"
android:layout_marginTop="5dp"
>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -21,19 +24,19 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
android:background="@drawable/vip_item_nochoose_bg" android:background="@drawable/vip_item_nochoose_bg"
android:layout_marginTop="@dimen/dp_10" android:layout_marginTop="10dp"
> >
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="100dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
android:orientation="vertical" android:orientation="vertical"
android:layout_marginTop="20dp" android:layout_marginTop="23dp"
android:layout_marginBottom="20dp" android:layout_marginBottom="20dp"
android:layout_marginStart="49dp" android:layout_marginStart="20dp"
android:layout_marginEnd="49dp" android:layout_marginEnd="20dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
> >
<TextView <TextView
@ -51,6 +54,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginTop="8dp"
> >
<TextView <TextView
@ -70,7 +74,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="#FFF89F25" android:textColor="#FFF89F25"
android:layout_marginStart="5dp" android:layout_marginStart="5dp"
android:text="36.8" android:text=""
android:textSize="18sp" android:textSize="18sp"
android:layout_gravity="center" android:layout_gravity="center"
android:gravity="center" android:gravity="center"
@ -82,9 +86,9 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="#FF9EA3A5" android:textColor="#FF9EA3A5"
android:text="¥36.8/月" android:text=""
android:textSize="14sp" android:textSize="14sp"
android:layout_marginTop="5dp" android:layout_marginTop="8dp"
android:layout_gravity="center" android:layout_gravity="center"
android:gravity="center" android:gravity="center"
android:drawablePadding="@dimen/dp_10" android:drawablePadding="@dimen/dp_10"
@ -105,17 +109,17 @@
<TextView <TextView
android:id="@+id/tvRandomlySend" android:id="@+id/tvRandomlySend"
android:layout_width="match_parent" android:layout_width="84dp"
android:layout_height="match_parent" android:layout_height="15dp"
android:layout_marginStart="7dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="7dp"
android:layout_marginBottom="5dp"
android:ellipsize="end"
android:gravity="center" android:gravity="center"
android:text=""
android:maxWidth="80dp" android:maxWidth="80dp"
android:maxLines="1" android:maxLines="1"
android:ellipsize="end" android:text=""
android:layout_marginStart="7dp"
android:layout_marginEnd="7dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="12sp" android:textSize="12sp"

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 KiB

After

Width:  |  Height:  |  Size: 507 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 KiB

View File

@ -463,7 +463,7 @@
<string name="openqy">开通立即享三大权益</string> <string name="openqy">开通立即享三大权益</string>
<string name="jstime">加速时间</string> <string name="jstime">加速时间</string>
<string name="jstimeStr">不限时间</string> <string name="jstimeStr">不限时间</string>
<string name="VipSerTxt">你的专属客服当前在线 </string> <string name="VipSerTxt">你的专属客服当前在线,</string>
<string name="LinekCustom">点击为你解答</string> <string name="LinekCustom">点击为你解答</string>
<string name="NewNotice">最新通知</string> <string name="NewNotice">最新通知</string>
<string name="vipTimeStrEd">你的会员还有$天到期</string> <string name="vipTimeStrEd">你的会员还有$天到期</string>
@ -473,4 +473,7 @@
<string name="liuliangStrAA">解锁流媒体</string> <string name="liuliangStrAA">解锁流媒体</string>
<string name="liuliangStrEdAAA">智能连接</string> <string name="liuliangStrEdAAA">智能连接</string>
<string name="PAYiNG">¥</string> <string name="PAYiNG">¥</string>
<string name="currentVersionNumber">版本号</string>
<string name="LineChoose">线路选择</string>
<string name="shareNow">立即分享</string>
</resources> </resources>

View File

@ -3,19 +3,16 @@
<!-- <style name="BootstrapTheme" parent="AppThemeLight" />--> <!-- <style name="BootstrapTheme" parent="AppThemeLight" />-->
<style name="Theme.Octopus" parent="Theme.MaterialComponents.DayNight.NoActionBar"> <style name="Theme.Octopus" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. --> <!-- Primary brand color -->
<item name="colorPrimary">@color/purple_500</item> <item name="colorPrimary">@color/white</item>
<item name="colorPrimaryVariant">@color/purple_700</item> <item name="colorPrimaryVariant">@color/white</item>
<item name="colorOnPrimary">@color/white</item> <item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. --> <!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item> <item name="colorSecondary">@color/white</item>
<item name="colorSecondaryVariant">@color/teal_700</item> <item name="colorSecondaryVariant">@color/white</item>
<item name="colorOnSecondary">@color/black</item> <item name="colorOnSecondary">@color/black</item>
<item name="android:textAllCaps">false</item> <item name="android:textAllCaps">false</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
<item name="android:windowAnimationStyle">@style/activityAnim</item> <item name="android:windowAnimationStyle">@style/activityAnim</item>
</style> </style>