Merge branch 'master' of http://47.96.225.205:8888/r/FirstApp2
# Conflicts:
# app/src/main/AndroidManifest.xml
# app/src/main/java/com/example/firstapp/ui/notifications/NotificationsFragment.kt
| | |
| | | } |
| | | buildFeatures { |
| | | viewBinding true |
| | | dataBinding true |
| | | } |
| | | } |
| | | |
| | |
| | | implementation 'com.github.bumptech.glide:glide:4.12.0' |
| | | annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0' |
| | | |
| | | implementation 'com.squareup.okhttp3:okhttp:4.9.0' |
| | | |
| | | // 支付宝支付SDK |
| | | api 'com.alipay.sdk:alipaysdk-android:+@aar' |
| | | |
| | | implementation 'com.google.android.material:material:1.4.0' |
| | | |
| | | |
| | | } |
| | |
| | | android:theme="@style/Theme.ContentDetail" |
| | | android:exported="false" /> |
| | | <activity |
| | | android:name=".ui.profile.EditProfileActivity" |
| | | android:exported="false"/> |
| | | <activity |
| | | android:name=".ui.invitation.InvitationActivity" |
| | | android:exported="false"/> |
| | | |
| | |
| | | package com.example.firstapp.database.entity |
| | | |
| | | data class ApiResponse<T>( |
| | | val status: Int, |
| | | val code: String, |
| | | val msg: String, |
| | | val info: String, |
| | | val data: T |
| | |
| | | return try { |
| | | // 从网络获取配置 |
| | | val response = apiService.getKeywords() |
| | | if (response.status == 1) { |
| | | if (response.code == "0") { |
| | | // 保存到本地数据库作为缓存 |
| | | saveToLocal(response.data) |
| | | keywordDao.getAllKeywords() |
对比新文件 |
| | |
| | | package com.example.firstapp.database.response |
| | | |
| | | data class AlipayOrderInfoResponse( |
| | | val code: Int, |
| | | val msg: String, |
| | | val data: String |
| | | ) |
对比新文件 |
| | |
| | | package com.example.firstapp.database.response |
| | | |
| | | // 添加数据类 |
| | | data class UserInfo( |
| | | val id: Long, |
| | | val name: String, |
| | | val cover: String, |
| | | val contactTel: String, |
| | | val passTime: String, |
| | | val overTime: String, |
| | | val showed: Boolean |
| | | ) |
| | |
| | | |
| | | import com.example.firstapp.database.entity.ApiResponse |
| | | import com.example.firstapp.database.entity.KeywordConfig |
| | | import com.example.firstapp.database.response.AlipayOrderInfoResponse |
| | | import com.example.firstapp.database.response.ContentResponse |
| | | import com.example.firstapp.database.response.DictResponse |
| | | import com.example.firstapp.database.response.LoginResponse |
| | | import com.example.firstapp.database.response.SecurityResponse |
| | | import com.example.firstapp.database.response.UserInfo |
| | | import okhttp3.MultipartBody |
| | | import okhttp3.RequestBody |
| | | import retrofit2.Retrofit |
| | | import retrofit2.converter.gson.GsonConverterFactory |
| | | import retrofit2.http.GET |
| | | import retrofit2.http.Multipart |
| | | import retrofit2.http.POST |
| | | import retrofit2.http.Part |
| | | import retrofit2.http.Path |
| | | import retrofit2.http.Query |
| | | |
| | | /** |
| | |
| | | |
| | | @GET("config-security/enable-list-all") |
| | | suspend fun getSecurityList(): SecurityResponse |
| | | |
| | | @GET("alipay/pay-order-info") |
| | | suspend fun getPayOrderInfo(): AlipayOrderInfoResponse |
| | | |
| | | @GET("flower/api/supplier/info/{phone}") |
| | | suspend fun getUserInfo(@Path("phone") phone: String): ApiResponse<UserInfo> |
| | | |
| | | @Multipart |
| | | @POST("api/supplier/operation/update") |
| | | suspend fun updateProfile( |
| | | @Part("nickname") nickname: RequestBody, |
| | | @Part avatar: MultipartBody.Part? |
| | | ): ApiResponse<Unit> |
| | | } |
| | | |
| | | // 创建Retrofit实例(单例) |
对比新文件 |
| | |
| | | package com.example.firstapp.pay |
| | | |
| | | import android.app.Activity |
| | | import android.text.TextUtils |
| | | import androidx.lifecycle.Observer |
| | | import com.alipay.sdk.app.PayTask |
| | | import com.example.firstapp.utils.Log |
| | | |
| | | object AliPayHelper { |
| | | fun pay(activity: Activity, orderInfo: String,observer:Observer<PayResult>) { |
| | | |
| | | // 开启线程 |
| | | Thread { |
| | | try { |
| | | var alipayTask = PayTask(activity) |
| | | var payV2 = alipayTask.payV2(orderInfo, true) |
| | | Log.d("AliPayHelper", "payV2: $payV2") |
| | | val payResult = PayResult(payV2) |
| | | |
| | | var result = payV2.get("result") // 支付结果信息 |
| | | var resultStatus = payV2.get("resultStatus") // 支付结果状态码 |
| | | var memo = payV2.get("memo") // 错误信息提示 |
| | | |
| | | Log.d("AliPayHelper", "result: $result") |
| | | Log.d("AliPayHelper", "resultStatus: $resultStatus") |
| | | Log.d("AliPayHelper", "memo: $memo") |
| | | |
| | | observer.onChanged(payResult) |
| | | |
| | | } catch (e: Exception) { |
| | | e.printStackTrace() |
| | | } |
| | | }.start() |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.example.firstapp.pay |
| | | |
| | | import android.app.Activity |
| | | import androidx.lifecycle.Observer |
| | | |
| | | object PayAbility { |
| | | |
| | | |
| | | /** |
| | | * 支付宝支付方法 |
| | | */ |
| | | fun aliPay(activity: Activity, orderInfo: String, observer: Observer<PayResult>) { |
| | | AliPayHelper.pay(activity, orderInfo, observer) |
| | | } |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.example.firstapp.pay |
| | | |
| | | class PayResult constructor(payV2: Map<String,String>) { |
| | | val result = payV2.get("result") // 支付结果信息 |
| | | val resultStatus = payV2.get("resultStatus") // 支付结果状态码 |
| | | val memo = payV2.get("memo") // 错误信息提示 |
| | | } |
| | |
| | | import android.view.LayoutInflater |
| | | import android.view.View |
| | | import android.view.ViewGroup |
| | | import android.widget.TextView |
| | | import androidx.core.content.ContextCompat |
| | | import androidx.fragment.app.Fragment |
| | | import androidx.lifecycle.ViewModelProvider |
| | | import androidx.recyclerview.widget.LinearLayoutManager |
| | | import androidx.recyclerview.widget.RecyclerView |
| | | import com.bumptech.glide.Glide |
| | | import com.example.firstapp.R |
| | | import com.example.firstapp.activity.PickupActivity |
| | | import com.example.firstapp.adapter.ExpressAdapter |
| | | import com.example.firstapp.adapter.FinanceAdapter |
| | | import com.example.firstapp.core.Core |
| | | import com.example.firstapp.databinding.FragmentHomeBinding |
| | | |
| | | class HomeFragment : Fragment() { |
| | |
| | | adapter = financeAdapter |
| | | |
| | | // 设置初始状态 - 添加这行 |
| | | binding.financeContent.visibility = View.GONE |
| | | binding.financeRecycler.visibility = View.GONE |
| | | |
| | | // 设置点击监听 |
| | | financeAdapter.setOnPackageClickListener { group, pack -> |
| | |
| | | |
| | | // 快递标签点击事件 |
| | | tabExpress.setOnClickListener { |
| | | expressContent.visibility = View.VISIBLE |
| | | financeContent.visibility = View.GONE |
| | | expressRecycler.visibility = View.VISIBLE |
| | | financeRecycler.visibility = View.GONE |
| | | tabExpress.setTextColor(ContextCompat.getColor(requireContext(), R.color.tab_selected)) |
| | | tabFinance.setTextColor(ContextCompat.getColor(requireContext(), R.color.gray)) |
| | | others.setTextColor(ContextCompat.getColor(requireContext(), R.color.gray)) |
| | |
| | | |
| | | // 财务标签点击事件 |
| | | tabFinance.setOnClickListener { |
| | | expressContent.visibility = View.GONE |
| | | financeContent.visibility = View.VISIBLE |
| | | expressRecycler.visibility = View.GONE |
| | | financeRecycler.visibility = View.VISIBLE |
| | | tabExpress.setTextColor(ContextCompat.getColor(requireContext(), R.color.gray)) |
| | | tabFinance.setTextColor(ContextCompat.getColor(requireContext(), R.color.tab_selected)) |
| | | others.setTextColor(ContextCompat.getColor(requireContext(), R.color.gray)) |
| | |
| | | |
| | | // 其他标签点击事件 |
| | | others.setOnClickListener { |
| | | expressContent.visibility = View.GONE |
| | | financeContent.visibility = View.GONE |
| | | expressRecycler.visibility = View.GONE |
| | | financeRecycler.visibility = View.GONE |
| | | tabExpress.setTextColor(ContextCompat.getColor(requireContext(), R.color.gray)) |
| | | tabFinance.setTextColor(ContextCompat.getColor(requireContext(), R.color.gray)) |
| | | others.setTextColor(ContextCompat.getColor(requireContext(), R.color.tab_selected)) |
| | |
| | | import android.view.ViewGroup |
| | | import android.widget.EditText |
| | | import android.widget.Toast |
| | | import androidx.activity.result.contract.ActivityResultContracts |
| | | import androidx.appcompat.app.AppCompatActivity |
| | | import androidx.core.content.ContextCompat |
| | | import androidx.fragment.app.Fragment |
| | | import androidx.lifecycle.Observer |
| | | import androidx.lifecycle.lifecycleScope |
| | | import androidx.navigation.fragment.findNavController |
| | | import com.google.android.material.dialog.MaterialAlertDialogBuilder |
| | |
| | | import com.example.firstapp.activity.ContentDetailActivity |
| | | import com.example.firstapp.database.service.RetrofitClient |
| | | import com.example.firstapp.databinding.FragmentNotificationsBinding |
| | | import com.example.firstapp.ui.invitation.InvitationActivity |
| | | import com.example.firstapp.pay.PayAbility |
| | | import com.example.firstapp.ui.reminderOther.ReminderOtherAddActivity2 |
| | | import com.example.firstapp.ui.reminderOther.ReminderSettingsFragmentOther |
| | | import com.example.firstapp.ui.profile.EditProfileActivity |
| | | import com.example.firstapp.utils.Log |
| | | import com.google.android.material.snackbar.Snackbar |
| | | import kotlinx.coroutines.launch |
| | | import com.bumptech.glide.Glide |
| | | import com.example.firstapp.database.response.UserInfo |
| | | |
| | | class NotificationsFragment : Fragment() { |
| | | |
| | |
| | | private var xiaohongshuUrl = "" |
| | | private var contactEmail = "" |
| | | private var shareText = "" |
| | | private var currentUserInfo: UserInfo? = null // 确保使用你的实际数据类 |
| | | |
| | | |
| | | private val editProfileLauncher = registerForActivityResult( |
| | | ActivityResultContracts.StartActivityForResult() |
| | | ) { result -> |
| | | if (result.resultCode == AppCompatActivity.RESULT_OK) { |
| | | result.data?.let { data -> |
| | | // 更新昵称 |
| | | val newNickname = data.getStringExtra("nickname") |
| | | newNickname?.let { |
| | | binding.tvNickname.text = it |
| | | } |
| | | |
| | | // 更新头像 |
| | | val avatarUri = data.getStringExtra("avatar_uri") |
| | | avatarUri?.let { |
| | | Glide.with(requireContext()) |
| | | .load(Uri.parse(it)) |
| | | .circleCrop() |
| | | .into(binding.ivAvatar) |
| | | } |
| | | |
| | | // TODO: 将更新后的信息保存到服务器 |
| | | } |
| | | } |
| | | } |
| | | |
| | | override fun onCreateView( |
| | | inflater: LayoutInflater, |
| | |
| | | } |
| | | |
| | | private fun setupClickListeners() { |
| | | |
| | | // 支付插件 |
| | | binding.payPlugin.setOnClickListener { |
| | | // 跳转到支付插件页面 |
| | | lifecycleScope.launch { |
| | | try { |
| | | val response = RetrofitClient.apiService.getPayOrderInfo() |
| | | var orderInfo=response.data |
| | | Log.d("AliPayHelper","获取订单信息时: ${response}") |
| | | // 这里调用支付宝 |
| | | PayAbility.aliPay(requireActivity(), orderInfo, Observer { |
| | | when (it.resultStatus) { |
| | | "9000" -> { |
| | | // Snackbar.make(binding.root, "支付成功", Snackbar.LENGTH_LONG).show() |
| | | requireActivity().runOnUiThread { |
| | | Toast.makeText(requireContext(), "支付成功", Toast.LENGTH_LONG).show() |
| | | } |
| | | } |
| | | else -> { |
| | | // Snackbar.make(binding.root, "支付失败", Snackbar.LENGTH_LONG).show() |
| | | requireActivity().runOnUiThread { |
| | | Toast.makeText(requireContext(), "支付失败", Toast.LENGTH_LONG).show() |
| | | } |
| | | |
| | | } |
| | | } |
| | | }) |
| | | |
| | | } catch (e: Exception) { |
| | | Log.d("AliPayHelper","获取订单信息时发生错误: ${e.message}") |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | // 设置提醒 |
| | | binding.settingsReminder.setOnClickListener { |
| | | // 跳转到设置提醒页面 |
| | | binding.layoutReminder.setOnClickListener { |
| | | findNavController().navigate(R.id.action_navigation_notifications_to_reminderSettingsFragment) |
| | | } |
| | | |
| | | // 设置其他提醒 暂时不需要 |
| | | // binding.settingsReminderOther.setOnClickListener { |
| | | // // 跳转到设置提醒页面 |
| | | // findNavController().navigate(R.id.action_settings_to_reminderSettingsFragmentOther) |
| | | // } |
| | | // 待办 |
| | | binding.layoutTodo.setOnClickListener { |
| | | // TODO: 实现待办功能 |
| | | Toast.makeText(context, "待办功能开发中", Toast.LENGTH_SHORT).show() |
| | | } |
| | | |
| | | // 好友邀请 |
| | | binding.layoutInvite.setOnClickListener { |
| | | shareToWechat() |
| | | } |
| | | |
| | | // AI助手 |
| | | binding.layoutAi.setOnClickListener { |
| | | // TODO: 实现AI助手功能 |
| | | Toast.makeText(context, "AI助手功能开发中", Toast.LENGTH_SHORT).show() |
| | | } |
| | | |
| | | // 离线模式 |
| | | binding.layoutOffline.setOnClickListener { |
| | | // TODO: 实现离线模式功能 |
| | | Toast.makeText(context, "离线模式功能开发中", Toast.LENGTH_SHORT).show() |
| | | } |
| | | |
| | | // 关于小红书 |
| | | binding.aboutApp.setOnClickListener { |
| | | // 跳转到小红书账号页面 |
| | | binding.layoutAbout.setOnClickListener { |
| | | val intent = Intent(Intent.ACTION_VIEW, Uri.parse(xiaohongshuUrl)) |
| | | startActivity(intent) |
| | | } |
| | | |
| | | // 邮件联系 |
| | | binding.emailContact.setOnClickListener { |
| | | binding.layoutEmail.setOnClickListener { |
| | | showEmailDialog() |
| | | } |
| | | |
| | | // 意见与反馈 |
| | | binding.feedback.setOnClickListener { |
| | | binding.layoutFeedback.setOnClickListener { |
| | | showFeedbackDialog() |
| | | } |
| | | |
| | | // 分享给好友 |
| | | binding.shareToFriends.setOnClickListener { |
| | | val intent = Intent(requireActivity(), InvitationActivity::class.java) |
| | | // 隐私协议 |
| | | binding.layoutPrivacy.setOnClickListener { |
| | | startContentActivity("privacy_policy", "隐私协议") |
| | | startActivity(intent) |
| | | } |
| | | |
| | | // 隐私协议 |
| | | binding.privacyPolicy.setOnClickListener { |
| | | startContentActivity("privacy_policy", "隐私协议") |
| | | // 使用教程 |
| | | binding.layoutTutorial.setOnClickListener { |
| | | startContentActivity("user_guide", "使用教程") |
| | | } |
| | | |
| | | // 如何使用 |
| | | binding.howToUse.setOnClickListener { |
| | | startContentActivity("user_guide", "使用说明") |
| | | // 头像点击老的处理逻辑 |
| | | binding.layoutUserInfo.setOnClickListener { |
| | | currentUserInfo?.let { user -> |
| | | val intent = Intent(requireContext(), EditProfileActivity::class.java).apply { |
| | | putExtra("nickname", user.name) // 使用数据模型中的字段 |
| | | putExtra("avatar_url", user.cover) // 使用正确的URL字段 |
| | | } |
| | | editProfileLauncher.launch(intent) |
| | | } ?: run { |
| | | Toast.makeText(context, "用户信息未加载完成", Toast.LENGTH_SHORT).show() |
| | | } |
| | | } |
| | | |
| | | // VIP续费 |
| | | binding.btnRenew.setOnClickListener { |
| | | Toast.makeText(context, "VIP续费功能开发中", Toast.LENGTH_SHORT).show() |
| | | } |
| | | } |
| | | |
| | |
| | | startActivity(intent) |
| | | } |
| | | |
| | | private suspend fun loadUserInfo() { |
| | | try { |
| | | val response = RetrofitClient.apiService.getUserInfo("17586582287") |
| | | if (response.code == "0" && response.data != null) { |
| | | // 保存用户信息 |
| | | currentUserInfo = response.data |
| | | val userInfo = response.data |
| | | |
| | | // 设置头像 |
| | | Glide.with(this) |
| | | .load(userInfo.cover) |
| | | .placeholder(R.drawable.default_avatar) |
| | | .into(binding.ivAvatar) |
| | | |
| | | // 设置昵称和账号 |
| | | binding.tvNickname.text = userInfo.name |
| | | binding.tvUserId.text = "个人账号:${userInfo.contactTel}" |
| | | |
| | | // 设置VIP信息 |
| | | if (userInfo.showed) { |
| | | binding.ivVip.visibility = View.VISIBLE |
| | | binding.cardVip.visibility = View.VISIBLE |
| | | binding.tvVipExpire.text = "${userInfo.overTime} 到期" |
| | | } else { |
| | | //非会员信息 |
| | | binding.btnRenew.text = "立即开通" |
| | | binding.linearVipContainer.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.gray)) |
| | | binding.cardVip.visibility = View.GONE |
| | | } |
| | | } |
| | | } catch (e: Exception) { |
| | | e.printStackTrace() |
| | | Toast.makeText(context, "获取用户信息失败", Toast.LENGTH_SHORT).show() |
| | | } |
| | | } |
| | | |
| | | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
| | | super.onViewCreated(view, savedInstanceState) |
| | | |
| | | // 加载用户信息 |
| | | lifecycleScope.launch { |
| | | loadUserInfo() |
| | | } |
| | | } |
| | | |
| | | override fun onDestroyView() { |
| | | super.onDestroyView() |
| | | _binding = null |
对比新文件 |
| | |
| | | package com.example.firstapp.ui.profile |
| | | |
| | | import android.Manifest |
| | | import android.app.Activity |
| | | import android.content.Intent |
| | | import android.content.pm.PackageManager |
| | | import android.net.Uri |
| | | import android.os.Build |
| | | import android.os.Bundle |
| | | import android.provider.MediaStore |
| | | import android.view.View |
| | | import android.widget.ProgressBar |
| | | import android.widget.Toast |
| | | import androidx.activity.result.contract.ActivityResultContracts |
| | | import androidx.appcompat.app.AlertDialog |
| | | import androidx.appcompat.app.AppCompatActivity |
| | | import androidx.core.app.ActivityCompat |
| | | import androidx.core.content.ContextCompat |
| | | import androidx.lifecycle.lifecycleScope |
| | | import com.bumptech.glide.Glide |
| | | import com.example.firstapp.databinding.ActivityEditProfileBinding |
| | | import com.example.firstapp.database.service.ApiService |
| | | import kotlinx.coroutines.launch |
| | | import java.io.File |
| | | import okhttp3.MediaType.Companion.toMediaType |
| | | import okhttp3.MultipartBody |
| | | import okhttp3.RequestBody |
| | | import okhttp3.RequestBody.Companion.asRequestBody |
| | | import okhttp3.RequestBody.Companion.toRequestBody |
| | | |
| | | class EditProfileActivity : AppCompatActivity() { |
| | | private lateinit var binding: ActivityEditProfileBinding |
| | | private var selectedImageUri: Uri? = null |
| | | private lateinit var apiService: ApiService |
| | | private var loadingDialog: AlertDialog? = null |
| | | |
| | | private val pickImage = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result -> |
| | | if (result.resultCode == Activity.RESULT_OK) { |
| | | result.data?.data?.let { uri -> |
| | | selectedImageUri = uri |
| | | Glide.with(this) |
| | | .load(uri) |
| | | .circleCrop() |
| | | .into(binding.ivAvatar) |
| | | } |
| | | } |
| | | } |
| | | |
| | | override fun onCreate(savedInstanceState: Bundle?) { |
| | | super.onCreate(savedInstanceState) |
| | | binding = ActivityEditProfileBinding.inflate(layoutInflater) |
| | | setContentView(binding.root) |
| | | |
| | | // 设置状态栏 |
| | | window.statusBarColor = ContextCompat.getColor(this, android.R.color.white) |
| | | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { |
| | | window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR |
| | | } |
| | | |
| | | // 获取传入的数据 |
| | | val currentNickname = intent.getStringExtra("nickname") ?: "" |
| | | val currentAvatarUrl = intent.getStringExtra("avatar_url") |
| | | |
| | | // 设置当前数据 |
| | | binding.etNickname.setText(currentNickname) |
| | | if (!currentAvatarUrl.isNullOrEmpty()) { |
| | | Glide.with(this) |
| | | .load(currentAvatarUrl) |
| | | .circleCrop() |
| | | .into(binding.ivAvatar) |
| | | } |
| | | |
| | | // 设置点击事件 |
| | | binding.btnBack.setOnClickListener { |
| | | finish() |
| | | } |
| | | |
| | | binding.ivAvatar.setOnClickListener { |
| | | checkAndRequestPermission() |
| | | } |
| | | |
| | | binding.btnSaveBottom.setOnClickListener { |
| | | saveAndFinish() |
| | | } |
| | | } |
| | | |
| | | private fun saveAndFinish() { |
| | | lifecycleScope.launch { |
| | | try { |
| | | binding.btnSaveBottom.isEnabled = false |
| | | showLoading() |
| | | |
| | | val newNickname = binding.etNickname.text.toString() |
| | | if (newNickname.isEmpty()) { |
| | | Toast.makeText(this@EditProfileActivity, "昵称不能为空", Toast.LENGTH_SHORT).show() |
| | | return@launch |
| | | } |
| | | |
| | | // 准备文件和参数 |
| | | val nicknameBody = newNickname.toRequestBody("text/plain".toMediaType()) |
| | | |
| | | // 如果选择了新头像,处理文件 |
| | | val avatarPart = selectedImageUri?.let { uri -> |
| | | val inputStream = contentResolver.openInputStream(uri) |
| | | val file = File(cacheDir, "avatar_temp") |
| | | inputStream?.use { input -> |
| | | file.outputStream().use { output -> |
| | | input.copyTo(output) |
| | | } |
| | | } |
| | | |
| | | val requestFile = file.asRequestBody("image/*".toMediaType()) |
| | | MultipartBody.Part.createFormData("avatar", file.name, requestFile) |
| | | } |
| | | |
| | | // 调用更新接口 |
| | | apiService.updateProfile( |
| | | nickname = nicknameBody, |
| | | avatar = avatarPart |
| | | ) |
| | | |
| | | Toast.makeText(this@EditProfileActivity, "保存成功", Toast.LENGTH_SHORT).show() |
| | | finish() |
| | | |
| | | } catch (e: Exception) { |
| | | Toast.makeText(this@EditProfileActivity, "保存失败: ${e.message}", Toast.LENGTH_SHORT).show() |
| | | } finally { |
| | | binding.btnSaveBottom.isEnabled = true |
| | | hideLoading() |
| | | } |
| | | } |
| | | } |
| | | |
| | | private fun checkAndRequestPermission() { |
| | | when { |
| | | ContextCompat.checkSelfPermission( |
| | | this, |
| | | Manifest.permission.READ_EXTERNAL_STORAGE |
| | | ) == PackageManager.PERMISSION_GRANTED -> { |
| | | openGallery() |
| | | } |
| | | else -> { |
| | | ActivityCompat.requestPermissions( |
| | | this, |
| | | arrayOf(Manifest.permission.READ_EXTERNAL_STORAGE), |
| | | PERMISSION_REQUEST_CODE |
| | | ) |
| | | } |
| | | } |
| | | } |
| | | |
| | | override fun onRequestPermissionsResult( |
| | | requestCode: Int, |
| | | permissions: Array<out String>, |
| | | grantResults: IntArray |
| | | ) { |
| | | super.onRequestPermissionsResult(requestCode, permissions, grantResults) |
| | | when (requestCode) { |
| | | PERMISSION_REQUEST_CODE -> { |
| | | if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) { |
| | | openGallery() |
| | | } else { |
| | | Toast.makeText(this, "需要存储权限来选择头像", Toast.LENGTH_SHORT).show() |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | private fun openGallery() { |
| | | val intent = Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI) |
| | | pickImage.launch(intent) |
| | | } |
| | | |
| | | private fun showLoading() { |
| | | if (loadingDialog == null) { |
| | | loadingDialog = AlertDialog.Builder(this) |
| | | .setView(ProgressBar(this)) |
| | | .setCancelable(false) |
| | | .create() |
| | | } |
| | | loadingDialog?.show() |
| | | } |
| | | |
| | | private fun hideLoading() { |
| | | loadingDialog?.dismiss() |
| | | } |
| | | |
| | | private fun String.toRequestBody(mediaType: String): RequestBody { |
| | | return this.toRequestBody(mediaType.toMediaType()) |
| | | } |
| | | |
| | | private fun File.asRequestBody(mediaType: String): RequestBody { |
| | | return this.asRequestBody(mediaType.toMediaType()) |
| | | } |
| | | |
| | | companion object { |
| | | private const val PERMISSION_REQUEST_CODE = 100 |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | init { |
| | | throw UnsupportedOperationException("u can't instantiate me...") |
| | | throw UnsupportedOperationException("u can't instantiate drawable-me...") |
| | | } |
| | | } |
对比新文件 |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:shape="oval"> |
| | | <solid android:color="#CCCCCC" /> |
| | | <size |
| | | android:width="50dp" |
| | | android:height="50dp" /> |
| | | </shape> |
对比新文件 |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <vector xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:width="24dp" |
| | | android:height="24dp" |
| | | android:viewportWidth="24" |
| | | android:viewportHeight="24"> |
| | | |
| | | <path |
| | | android:strokeColor="#FFFFFF" |
| | | android:strokeWidth="2" |
| | | android:fillColor="@android:color/transparent" |
| | | android:pathData="M15,19l-7-7 7-7" /> |
| | | </vector> |
对比新文件 |
| | |
| | | <vector xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:width="48dp" |
| | | android:height="48dp" |
| | | android:viewportWidth="1024" |
| | | android:viewportHeight="1024"> |
| | | <path |
| | | android:pathData="M512,512m-512,0a512,512 0,1 0,1024 0,512 512,0 1,0 -1024,0Z" |
| | | android:fillColor="#1A78EC"/> |
| | | <path |
| | | android:pathData="M515.5,181.1a334.5,334.5 0,0 1,325.9 259.2,49.3 49.3,0 0,1 12,-1.5c32.7,0 59.2,32.8 59.2,73.2s-26.5,73.1 -59.2,73.1a48.6,48.6 0,0 1,-10.5 -1.1,334.4 334.4,0 0,1 -651.3,14.5l-0.9,0.2 -6.1,0.4C151.9,599 125.4,566.3 125.4,525.9c0,-40.4 26.5,-73.2 59.2,-73.2l2.5,0.1A334.3,334.3 0,0 1,515.5 181.1z" |
| | | android:fillColor="#FCF6F6"/> |
| | | <path |
| | | android:pathData="M243.8,250.8m189.1,0l172.1,0q189.1,0 189.1,189.1l0,151.2q0,189.1 -189.1,189.1l-172.1,0q-189.1,0 -189.1,-189.1l0,-151.2q0,-189.1 189.1,-189.1Z" |
| | | android:fillColor="#182560"/> |
| | | <path |
| | | android:pathData="M365.7,402.3m19.9,0l33.3,0q19.9,0 19.9,19.9l0,179.6q0,19.9 -19.9,19.9l-33.3,0q-19.9,0 -19.9,-19.9l0,-179.6q0,-19.9 19.9,-19.9Z" |
| | | android:fillColor="#1A78EC"/> |
| | | <path |
| | | android:pathData="M621.7,402.3m19.9,0l33.3,0q19.9,0 19.9,19.9l0,179.6q0,19.9 -19.9,19.9l-33.3,0q-19.9,0 -19.9,-19.9l0,-179.6q0,-19.9 19.9,-19.9Z" |
| | | android:fillColor="#1A78EC"/> |
| | | </vector> |
对比新文件 |
| | |
| | | <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="M985.2,842.5c-1.7,23.9 -24.2,45.3 -49.5,47.6a4795.6,4795.6 0,0 1,-847.4 0c-25.3,-2.3 -47.8,-23.8 -49.5,-47.6 -13.7,-194 1.8,-388 46.3,-582.1 5.6,-23.9 28.8,-45.1 51.2,-47.1a4253,4253 0,0 1,751.5 0c22.4,2 45.6,23.3 51.2,47.1 44.5,194 59.9,388 46.3,582.1z" |
| | | android:fillColor="#0091FF"/> |
| | | <path |
| | | android:pathData="M887.7,213.3a4266.5,4266.5 0,0 0,-246.9 -14.7c-74.8,115.1 -169.5,235.4 -266.7,353.4 109.5,111.4 227.4,225.8 335.5,332.6a5141.6,5141.6 0,0 0,265.7 -17.2c5.5,-7.4 9.1,-16 9.7,-24.9 13.7,-194 -1.8,-388 -46.3,-582.1 -5.6,-23.9 -28.8,-45.1 -51.2,-47.1z" |
| | | android:strokeAlpha="0.3" |
| | | android:fillColor="#1B6DAB" |
| | | android:fillAlpha="0.3"/> |
| | | <path |
| | | android:pathData="M888.5,213.3A4252.9,4252.9 0,0 0,137.1 213.2c-16.5,1.5 -33.2,13.3 -43.3,28.9 97.2,124.1 238,268.8 383.4,413.4 18.2,18.1 47.8,18.1 66,0 146.7,-145.8 288.7,-291.8 386.2,-416.7 -10.2,-13.9 -25.7,-24.1 -40.9,-25.5z" |
| | | android:fillColor="#42AEFF"/> |
| | | </vector> |
对比新文件 |
| | |
| | | <vector xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:width="128dp" |
| | | android:height="128dp" |
| | | android:viewportWidth="1024" |
| | | android:viewportHeight="1024"> |
| | | <path |
| | | android:pathData="M360.4,557.5l184.9,0 0,30.8 -184.9,0 0,-30.8Z" |
| | | android:fillColor="#00D3D3"/> |
| | | <path |
| | | android:pathData="M360.4,481l308.2,0 0,30.8 -308.2,0 0,-30.8Z" |
| | | android:fillColor="#00D3D3"/> |
| | | <path |
| | | android:pathData="M360.4,404.4l308.2,0 0,30.8 -308.2,0 0,-30.8Z" |
| | | android:fillColor="#00D3D3"/> |
| | | <path |
| | | android:pathData="M512,64c-247.3,0 -447.7,200.5 -447.7,447.7s200.5,447.7 447.7,447.7 447.7,-200.5 447.7,-447.7S759.3,64 512,64zM761.1,620.2c0,34 -27.6,61.6 -61.6,61.6l-154.1,0 0,123.3L422,681.8 329.6,681.8c-34,0 -61.6,-27.6 -61.6,-61.6L267.9,373.6c0,-34 27.6,-61.6 61.6,-61.6l369.8,0c34,0 61.6,27.6 61.6,61.6L761.1,620.2z" |
| | | android:fillColor="#00D3D3"/> |
| | | </vector> |
对比新文件 |
| | |
| | | <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="M249.7,287.7h524.9c82.9,0 149.7,67.4 149.7,149.7L924.3,862.2c0,82.9 -67.4,149.7 -149.7,149.7L249.7,1011.9c-82.9,0 -149.7,-67.4 -149.7,-149.7L99.9,437.2c-0.6,-82.1 66.8,-149.5 149.7,-149.5zM249.7,287.7" |
| | | android:fillColor="#FF5000"/> |
| | | <path |
| | | android:pathData="M399.2,562.8h225.1v449.5L399.2,1012.3L399.2,562.8zM535.3,188.2s154.6,-190.5 199.7,-174.9c0,0 82.9,-48.1 124.9,249.9v24.8h-124.9s21.1,-179.4 -50.2,-149.7L534.5,287.9c0.8,-0.2 0.8,-99.7 0.8,-99.7zM479,188.8S324.4,0.2 279.3,15.8c0,0 -82.9,-47.5 -124.9,247.4v24.8h124.9S258.3,110.6 329.5,139.5l100.1,98.9 50.2,49.6 -0.8,-99.1zM479,188.8" |
| | | android:fillColor="#FFB400"/> |
| | | <path |
| | | android:pathData="M161.8,287.7h699.4c76,0 137.2,61.2 137.2,137.2s-61.8,137.2 -137.2,137.2L161.8,562.2c-76,0 -137.2,-61.2 -137.2,-137.2s61.8,-137.2 137.2,-137.2zM161.8,287.7" |
| | | android:fillColor="#FF6E00"/> |
| | | <path |
| | | android:pathData="M624.2,300v-12.3h-0.6c-6.1,-56.3 -53.9,-100.1 -111.8,-100.1 -58.2,0 -105.7,43.8 -111.8,100.1h-0.6v275h225.1L624.4,300zM624.2,300" |
| | | android:fillColor="#FFC937"/> |
| | | </vector> |
对比新文件 |
| | |
| | | <vector xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:width="51.2dp" |
| | | android:height="32dp" |
| | | android:viewportWidth="1638" |
| | | android:viewportHeight="1024"> |
| | | <path |
| | | android:pathData="M1292.8,384A481.7,481.7 0,0 0,819.2 0C633.5,0 473.6,102.4 396.8,256 198.3,281.6 51.2,441.5 51.2,640A385.1,385.1 0,0 0,435.2 1024h831.9A316.9,316.9 0,0 0,1587.2 703.9c0,-166.3 -134.3,-307.2 -294.4,-319.9m-247.5,-38.1a63.9,63.9 0,0 1,0 90.4L909.6,571.9l135.7,135.7a63.9,63.9 0,0 1,-90.4 90.4L819.2,662.3 683.5,798a63.9,63.9 0,0 1,-90.4 -90.4l135.7,-135.7 -135.7,-135.6a63.9,63.9 0,1 1,90.4 -90.4L819.2,481.5l135.7,-135.6a63.9,63.9 0,0 1,90.4 0z" |
| | | android:fillColor="#1296db"/> |
| | | </vector> |
对比新文件 |
| | |
| | | <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="M464.3,14.4a73.9,73.9 0,0 1,87.7 0,682.2 682.2,0 0,0 164.5,96 1345.9,1345.9 0,0 0,184 42.9A72.6,72.6 0,0 1,957.4 217.3l0.3,0.6h-2.6a2953.9,2953.9 0,0 1,-3.2 305.9c-40.3,324.8 -293.1,499.2 -442.6,499.2 -149.4,0 -448,-247.4 -448,-503l0,-12.7v-4.3l0,-8.6 0,-8.6 0,-17.2c0.3,-121.6 1.7,-241.1 1.8,-249.1l0,-0.4a67.2,67.2 0,0 1,56.3 -64,608 608,0 0,0 178.9,-44.8 430.7,430.7 0,0 0,165.8 -96zM522.6,375c-40.7,0 -73.7,33 -73.7,73.7 0,25.6 13,48.1 32.8,61.3v136.7a42.3,42.3 0,0 0,84.6 0L566.3,510.2c0,-0.7 -0,-1.3 -0.1,-2a73.6,73.6 0,0 0,30.1 -59.4c0,-40.7 -33,-73.7 -73.7,-73.7z" |
| | | android:fillColor="#000000"/> |
| | | </vector> |
对比新文件 |
| | |
| | | <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="M648.2,887.7C648.1,962.8 587.6,1023.8 511.8,1023.8 436.7,1023.8 375.7,963.1 375.5,887.7 375.5,887.7 648.2,887.7 648.2,887.7 648.2,887.7 648.2,887.7 648.2,887.7 648.2,887.7 648.2,887.7 648.2,887.7 648.2,887.7 648.2,887.7 648.2,887.7ZM603,88.6C603,39.8 562.2,0 511.9,0 461.7,0 420.9,39.7 420.9,88.6 420.9,93.5 421.3,98.4 422.1,103.2 296.4,145.8 205.1,254.8 205.1,409.7 205.1,409.7 205.1,580.3 205.1,580.3 205.1,580.3 193.3,728.9 148.9,730.4 122.5,730.4 102.2,750.3 102.2,774.7 102.2,799.3 122.6,819 147.8,819 147.8,819 511.9,819 511.9,819 511.9,819 830.6,819 830.6,819 830.6,819 876.1,819 876.1,819 901.4,819 921.6,799.2 921.6,774.7 921.6,750.1 901.3,730.4 876.1,730.4 830.6,730.4 819.4,580.3 819.4,580.3 819.4,580.3 819.4,409.7 819.4,409.7 819.4,254.7 734.2,145.6 601.8,103.1 602.6,98.4 603,93.5 603,88.6 603,88.6 603,88.6 603,88.6 603,88.6 603,88.6 603,88.6Z" |
| | | android:fillColor="#272636"/> |
| | | </vector> |
对比新文件 |
| | |
| | | <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="M513.1,189.8c-177.9,0 -322.2,144.2 -322.2,322.2 0,177.9 144.2,322.2 322.2,322.2 177.9,0 322.2,-144.2 322.2,-322.2 -0,-177.9 -144.2,-322.2 -322.2,-322.2zM533.8,670c-5.7,5.6 -12.4,8.5 -20.2,8.5 -7.7,0 -14.4,-2.9 -20.2,-8.5 -5.7,-5.6 -8.6,-12.3 -8.6,-19.9 0,-7.6 2.8,-14.3 8.6,-19.9 5.7,-5.6 12.4,-8.5 20.2,-8.5 7.7,0 14.5,2.8 20.2,8.5 5.7,5.7 8.6,12.3 8.6,19.9 0,7.6 -2.9,14.3 -8.6,19.9zM617,446.1c-5,10.6 -16.6,24.4 -34.8,41.4 -8.7,8.6 -16.1,16 -22.2,22.2 -6,6.2 -10.6,11.4 -13.6,15.7 -5.4,8 -8.9,15.8 -10.6,23.4 -1.3,6.6 -2,18.1 -2,34.4 0,5.3 -2.4,9.3 -7.1,12 -4.7,2.7 -9.8,4 -15.4,4 -5.6,0 -10.6,-1.3 -15.2,-3.7 -4.5,-2.5 -6.8,-6.6 -6.8,-12.2 0.3,-12.6 0.8,-23 1.5,-31.2 0.7,-8.2 2.5,-15.9 5.6,-23.2 3,-7.3 7.9,-15 14.6,-23.2 6.7,-8.2 16.1,-18.7 28.2,-31.7 16.1,-16 26.6,-27.7 31.3,-35.4 4.7,-7.6 7.1,-18.8 7.1,-33.4 0,-7.3 -1.3,-14.3 -4,-21 -2.7,-6.6 -6.6,-12.5 -11.6,-17.7 -5,-5.2 -11.4,-9.2 -18.9,-12.2 -7.6,-3 -16.4,-4.5 -26.5,-4.5 -44.7,0 -67.1,26.3 -67.1,78.8 0,13.3 -7.7,19.9 -23.2,19.9 -6.7,0 -12,-1.8 -15.6,-5.5 -3.7,-3.6 -5.5,-8.5 -5.5,-14.4 0,-40.5 11.1,-70.1 33.3,-88.8 22.5,-18.6 49.1,-27.9 79.7,-27.9 30.6,0 56,9 76.2,26.9 20.5,17.3 30.8,40.9 30.8,70.8 -0,13.6 -2.7,25.7 -8.1,36.4z" |
| | | android:fillColor="#d4237a"/> |
| | | <path |
| | | android:pathData="M802.7,4.1H223.5c-120.5,0 -218.2,97.7 -218.2,218.2v579.3c0,120.5 97.7,218.2 218.2,218.2H802.7c120.5,0 218.2,-97.7 218.2,-218.2V222.4c0,-120.5 -97.7,-218.2 -218.2,-218.2zM513.1,890.2c-208.9,0 -378.2,-169.3 -378.2,-378.2 0,-208.9 169.3,-378.2 378.2,-378.2 208.9,0 378.2,169.4 378.2,378.2 -0,208.9 -169.3,378.2 -378.2,378.2z" |
| | | android:fillColor="#d4237a"/> |
| | | </vector> |
对比新文件 |
| | |
| | | <vector xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:width="128dp" |
| | | android:height="128dp" |
| | | android:viewportWidth="1024" |
| | | android:viewportHeight="1024"> |
| | | <path |
| | | android:pathData="M511,831.7c-23.5,0 -45.5,-9.9 -61.6,-27.2L139,468.1c-28.7,-31.3 -29.8,-79.4 -1.6,-111.8l117.6,-135.3c15.7,-18.3 38.7,-28.7 63.2,-28.7H705.3c24,0 47,10.4 62.7,28.7l118.1,135.3c28.2,32.4 27.7,80.5 -1.6,111.8L572.1,804.6c-15.7,17.2 -38.1,27.2 -61.1,27.2z" |
| | | android:fillColor="#F2CB51"/> |
| | | <path |
| | | android:pathData="M506.8,642.6c-5.2,0 -11,-2.1 -15.2,-6.3l-203.8,-209c-7.8,-8.4 -7.8,-21.4 0.5,-29.8 8.4,-7.8 21.4,-7.8 29.8,0.5l189.1,193.8 199.1,-194.4c8.4,-7.8 21.4,-7.8 29.8,0.5 7.8,8.4 7.8,21.4 -0.5,29.8l-214.2,209c-4.2,3.7 -9.4,5.7 -14.6,5.7z" |
| | | android:fillColor="#FFF7E1"/> |
| | | </vector> |
对比新文件 |
| | |
| | | <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="M76.4,82.1m135.9,0l525.5,0q135.9,0 135.9,135.9l0,580.5q0,135.9 -135.9,135.9l-525.5,0q-135.9,0 -135.9,-135.9l0,-580.5q0,-135.9 135.9,-135.9Z" |
| | | android:fillColor="#A5ADF6"/> |
| | | <path |
| | | android:pathData="M642.4,379.2H229.3a41,41 0,0 1,0 -81.9h413.1a41,41 0,1 1,0 81.9zM485.5,611.9h-256a41,41 0,0 1,0 -81.9h256a41,41 0,0 1,0 81.9z" |
| | | android:fillColor="#FFFFFF"/> |
| | | <path |
| | | android:pathData="M738.6,724.7m-221.6,0a221.6,221.6 0,1 0,443.2 0,221.6 221.6,0 1,0 -443.2,0Z" |
| | | android:fillColor="#A5ADF6"/> |
| | | <path |
| | | android:pathData="M738.6,503.1a221.5,221.5 0,0 0,-71.7 431.3h70.8a135.9,135.9 0,0 0,136.1 -135.7v-249.5a220.2,220.2 0,0 0,-135.2 -46.1z" |
| | | android:fillColor="#635DF7"/> |
| | | <path |
| | | android:pathData="M686.1,857a41,41 0,0 1,-31.3 -67.4l60,-70.9v-97.7a41,41 0,0 1,81.9 0v112.6a41,41 0,0 1,-9.7 26.4l-69.6,82.4a41,41 0,0 1,-31.3 14.6z" |
| | | android:fillColor="#FFFFFF"/> |
| | | </vector> |
对比新文件 |
| | |
| | | <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="M726.5,457.5c-6.7,-0.1 -13.4,0 -20,-0.1 -2.4,0 -3,1.1 -3,3.2 0.1,5.1 0.1,10.1 0.1,15.2v0c0.1,4.9 0,9.8 0.1,14.6 0,3.9 0.7,4.7 4.5,4.7 7.1,0.1 14.3,0 21.4,0.1 2.7,0 3.7,-1.3 3.7,-3.8 -0.1,-9.2 -0.1,-18.3 -0.2,-27.5a6.8,6.8 0,0 0,-6.5 -6.5z" |
| | | android:fillColor="#FF2E4D"/> |
| | | <path |
| | | android:pathData="M849.9,51.2h-675.8c-67.9,0 -122.9,55 -122.9,122.9v675.8c0,67.9 55,122.9 122.9,122.9h675.8c67.9,0 122.9,-55 122.9,-122.9L972.8,174.1c0,-67.9 -55,-122.9 -122.9,-122.9zM250.8,505.7c-0.7,10.6 -1.4,21.3 -2.6,31.8 -2.1,18.4 -6.2,36.3 -14.6,52.9 -2.2,4.1 -5.1,7.8 -8.2,12.5 -1.9,-3.9 -3.4,-7 -4.8,-10.1a3203.6,3203.6 0,0 1,-14.8 -33.6c-0.5,-1.2 -0.9,-2.9 -0.4,-4 3.2,-6.8 3.4,-14.1 3.9,-21.4 0.6,-9.2 1.4,-18.2 2,-27.4 0.5,-7 0.8,-14 1.4,-21 0.7,-8.1 1.5,-16.2 2.2,-24.2 0.1,-2 1,-2.6 2.8,-2.6 11.1,0 22.1,0 33.2,-0.1 2.4,0 3,1 2.9,3.2 -1,14.6 -1.9,29.3 -2.9,43.9zM322.1,593.1c-0.7,9.5 -5.1,17.5 -12.6,23.5 -5.4,4.4 -11.7,6.2 -18.7,6.1 -5.9,0 -11.7,-0.1 -17.5,0 -2,0 -3.3,-0.6 -4.1,-2.6 -3.4,-7.7 -6.9,-15.3 -10.3,-23 -0.5,-1.1 -0.7,-2.3 -1.1,-3.5 -1.6,-4.1 -1.6,-4.3 3,-4.4h13.9c5.9,0 8.5,-2.5 8.6,-8.6 0.1,-4.6 0.1,-9.1 0.1,-13.7L283.3,494.2c0.1,0.2 0.2,0.2 0.3,0.2L283.6,408.6c0,-4.3 0.1,-4.4 4.4,-4.4h29.2c5.1,0 5.2,0.1 5.2,5.4 0,27.2 0,54.4 0.1,81.5 0.1,23.9 0.3,47.8 0.3,71.6 0,10.1 0.1,20.3 -0.7,30.3zM397.7,564.2c-5,11.6 -10.2,23 -15.3,34.5 -0.5,1.1 -1.2,2.3 -2.4,4.4v0c-3,-4.5 -6.1,-8.2 -8.1,-12.4 -2.8,-6.1 -4.5,-12.8 -7.4,-19 -3,-6.7 -4.2,-13.9 -5.6,-20.9 -1.2,-6 -1.4,-12.3 -1.8,-18.3 -1.2,-15.4 -2.2,-30.8 -3.4,-46.1a2450,2450 0,0 0,-2.1 -25.2c-0.1,-1.5 0.2,-2.2 1.9,-2.2 11.5,0 23,-0.1 34.5,-0.2 2.2,0 3,1 3.1,3 0.3,4.7 0.5,9.3 0.9,14 0.3,3.8 0.7,7.7 1,11.4 0.5,5.4 1,10.8 1.4,16.1 0.5,6.9 0.5,13.8 1.5,20.6 1.3,10.4 0.3,21.1 3.9,31.3 0.9,2.4 -1,6.1 -2.2,8.9zM481.9,586.2c-2.9,6.7 -6,13.2 -9,19.8 -1.6,3.7 -3.2,7.5 -4.8,11.3 -1.9,4.5 -3.1,5.4 -7.9,5.4h-22.3c-7.5,0 -15,0.2 -22.5,-0.1 -3.6,-0.1 -7.1,-1.3 -10.6,-2 -1.8,-0.4 -2.2,-1.4 -1.4,-3.1a3709.7,3709.7 0,0 0,13.5 -29.2c1,-2.2 1.9,-4.7 3,-6.9 0.3,-0.6 1.4,-1.3 2,-1.1 12.4,3.2 25.1,2.8 37.8,2.6a874.6,874.6 0,0 1,20.1 0c3.2,0 3.5,0.5 2.2,3.4zM485.8,564.3a4.5,4.5 0,0 1,-2.7 1.4c-13.9,0.1 -27.9,0.1 -41.8,-0.1 -4.2,-0.1 -8.6,-1.1 -11.7,-4.3 -3.4,-3.4 -5,-7.4 -3.3,-11.9a897.5,897.5 0,0 1,9.6 -24.1c3.9,-9.2 7.8,-18.3 12.1,-28.2 -2.3,-0.1 -3.7,-0.3 -5,-0.3 -4.1,-0.1 -8.2,0.3 -12.3,-0.2 -4.5,-0.5 -9,-1 -12.5,-4.8 -3.4,-3.7 -3.9,-8 -2.6,-12.3 2.2,-6.8 5,-13.4 7.8,-20 2.7,-6.2 5.7,-12.2 8.5,-18.2 3,-6.5 5.9,-13.1 8.8,-19.6a1362,1362 0,0 0,7.7 -17.3c0.7,-1.8 1.9,-2.5 3.9,-2.5 10.9,0.1 21.9,0 32.9,0 3.6,0 3.7,0.4 2.3,3.7 -6.3,14.6 -12.7,29.2 -19,43.8a11.5,11.5 0,0 0,-1.2 4.9c0.2,3.9 1,4.5 5.1,4.5 8.2,0.1 16.4,0 24.4,0 1.6,0 3.4,0.2 5,0.3 2.3,0.1 2.6,1.1 1.6,3.1a2455.2,2455.2 0,0 0,-13.4 29.2c-3,6.9 -5.9,13.9 -8.9,20.8a1530.2,1530.2 0,0 1,-6.2 13.8c-1.9,4.2 -0.6,6.3 4.2,6.4 6,0 12,0.1 18.1,0 2.1,0 3.1,0.6 2.1,2.9 -3.6,8.3 -7.2,16.6 -10.8,24.9 -0.7,1.5 -1.4,3.1 -2.4,4.4zM620.6,623h-125.3c-1.7,-0.2 -3.5,-0.2 -5.9,-0.2v-0c0.9,-2.6 1.4,-4.4 2.2,-6.1 4.7,-10.3 9.4,-20.5 14.1,-30.8 1,-2.3 2.5,-2.9 4.8,-2.9h28.7c4.5,0 4.8,-0.2 4.8,-4.7L543.7,461.7c0,-4 -0.1,-4.1 -4.1,-4.1 -6.1,0 -12.3,-0.1 -18.4,0 -2.3,0 -3.3,-0.5 -3.3,-3.1 0.1,-11 0.1,-21.9 0.1,-32.9 0,-3.9 0.1,-3.9 3.9,-3.9h73c4.2,0 8.6,0.1 12.8,0 2,0 2.8,0.8 2.7,2.9 -0.1,11.4 -0.1,22.8 -0.1,34.3 0,2 -0.7,2.8 -2.8,2.8 -6.6,-0.1 -13.1,0.1 -19.8,0.1 -2.3,0 -3.3,1.1 -3.3,3.5 0.1,18.4 0.1,36.7 0.1,55.1 0,20.9 0,41.7 0.1,62.7 0,3.8 0.4,4.2 4.2,4.2h31.4c3.4,0 3.9,0.4 3.9,3.8 0.1,11 0,21.9 0.1,32.9 -0,2.9 -1.6,3.2 -3.7,3.2zM819.3,588.1c-0.1,16.4 -11,29.2 -26.4,32.9 -4.3,1.1 -8.8,1.4 -13.2,1.5 -6.8,0.2 -13.7,0.1 -20.6,0.1 -4.2,0 -5.4,-0.8 -7,-4.7 -3.3,-8 -6.8,-15.9 -10.3,-23.9l-0.7,-1.6c-1.2,-3.1 -0.8,-3.6 2.5,-3.6 9.4,-0.1 19,0.2 28.4,-0.3 5.7,-0.3 8,-2.9 8.2,-8.6 0.2,-11 -0.3,-22.1 -0.1,-33.1 0.1,-5.5 -6.8,-11.4 -11.7,-11.7a32.8,32.8 0,0 0,-2.7 -0.1c-18.7,0 -37.5,0 -56.3,0.1 -5.3,0 -5.7,0.5 -5.7,5.9l0.2,77.6c0,4.1 -0.1,4.2 -4.2,4.2h-31.2c-4,0 -4.3,-0.3 -4.3,-4.3v-39.9c0.1,0.1 0.1,0.1 0.2,0.1v-41c0,-2.8 -1.9,-2.9 -3.8,-2.9 -10.2,0.1 -20.4,0.3 -30.6,0.3 -6.9,0 -6.2,0.8 -6.3,-6.4 -0.1,-9.9 0,-19.9 0,-29.8 0,-3.6 0.4,-4.1 3.9,-4.1 10.7,-0.1 21.3,0 32,-0.1 4.1,0 4.3,-0.2 4.4,-4.2 0.1,-9.9 -0.1,-19.8 0,-29.7 0,-2.5 -1,-3.2 -3.4,-3.2 -6.8,0.1 -13.8,-0.1 -20.6,0 -2.2,0 -2.9,-0.7 -2.9,-2.9 0.1,-11.3 0.1,-22.5 -0.1,-33.7 0,-2.7 1,-3.3 3.4,-3.3 6.3,0.1 12.6,0 19,0 4.2,0 4.5,-0.3 4.5,-4.7 0,-2.6 0.1,-5.2 0,-7.9 -0.1,-2.5 1,-3.2 3.3,-3.2 9.1,0.1 18.2,0.1 27.3,0.1h5c3.9,0 4,0 4.2,4.1 0.1,2.4 -0.2,4.9 -0.1,7.3 0.1,3.4 1,4.3 4.3,4.4 5.7,0.1 11.3,0.1 17,0.1 14.6,0.1 27.4,5.1 37,16.3 5.4,6.2 8.7,13.8 9.2,22.1 0.5,8.5 0.2,17 0.3,25.5 0,3.2 0.2,6.4 0.4,9.5 0.1,3.2 0.9,4 4.1,3.9a48.6,48.6 0,0 1,19 3.2c13,5 21,14.2 23.6,28a44.4,44.4 0,0 1,0.7 8.3c0.1,17.9 0.1,35.8 -0.1,53.7zM810.1,453.6c-5.9,3.9 -12.2,3.8 -19.4,3.7 -2.2,0 -5.2,0.1 -8.1,-0.1 -0.7,-0.1 -2,-1 -2.1,-1.6 -0.7,-8.8 -1.8,-17.8 1.4,-26.4 2.8,-7.6 9.6,-12 17.6,-12.2a20,20 0,0 1,19.3 14.3c2.3,8.3 -1.6,17.4 -8.7,22.2z" |
| | | android:fillColor="#FF2E4D"/> |
| | | </vector> |
对比新文件 |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:orientation="vertical"> |
| | | |
| | | <!-- 标题栏(保持不变) --> |
| | | <RelativeLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="56dp" |
| | | android:background="@android:color/white"> |
| | | |
| | | <ImageButton |
| | | android:id="@+id/btn_back" |
| | | android:layout_width="48dp" |
| | | android:layout_height="48dp" |
| | | android:layout_centerVertical="true" |
| | | android:background="?attr/selectableItemBackgroundBorderless" |
| | | android:src="@drawable/ic_back" |
| | | android:contentDescription="返回"/> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_centerInParent="true" |
| | | android:text="资料编辑" |
| | | android:textColor="@android:color/black" |
| | | android:textSize="18sp"/> |
| | | </RelativeLayout> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:background="#EEEEEE"/> |
| | | |
| | | <!-- 内容区域 --> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical" |
| | | android:padding="16dp"> |
| | | |
| | | <!-- 昵称行 --> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="horizontal" |
| | | android:gravity="center_vertical" |
| | | android:paddingVertical="12dp"> |
| | | |
| | | <TextView |
| | | android:layout_width="80dp" |
| | | android:layout_height="wrap_content" |
| | | android:text="昵称" |
| | | android:textColor="#333333" |
| | | android:textSize="16sp"/> |
| | | |
| | | <!-- 使用 View 作为间隔 --> |
| | | <View |
| | | android:layout_width="0dp" |
| | | android:layout_height="0dp" |
| | | android:layout_weight="1" |
| | | android:background="@android:color/transparent"/> |
| | | |
| | | <EditText |
| | | android:id="@+id/et_nickname" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:minWidth="120dp" |
| | | android:background="@null" |
| | | android:hint="请输入昵称" |
| | | android:textSize="16sp" |
| | | android:padding="8dp" |
| | | android:gravity="end"/> <!-- 文本右对齐 --> |
| | | </LinearLayout> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1dp" |
| | | android:background="#EEEEEE"/> |
| | | |
| | | <!-- 头像行 --> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="horizontal" |
| | | android:gravity="center_vertical" |
| | | android:paddingVertical="16dp"> |
| | | |
| | | <TextView |
| | | android:layout_width="80dp" |
| | | android:layout_height="wrap_content" |
| | | android:text="头像" |
| | | android:textColor="#333333" |
| | | android:textSize="16sp"/> |
| | | |
| | | <!-- 使用 View 作为间隔 --> |
| | | <View |
| | | android:layout_width="0dp" |
| | | android:layout_height="0dp" |
| | | android:layout_weight="1" |
| | | android:background="@android:color/transparent"/> |
| | | |
| | | <com.google.android.material.imageview.ShapeableImageView |
| | | android:id="@+id/iv_avatar" |
| | | android:layout_width="50dp" |
| | | android:layout_height="50dp" |
| | | android:scaleType="centerCrop" |
| | | android:src="@drawable/default_avatar"/> |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | android:layout_weight="1"/> |
| | | |
| | | <Button |
| | | android:id="@+id/btn_save_bottom" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_margin="16dp" |
| | | android:backgroundTint="@color/cardview_dark_background" |
| | | android:text="保存" |
| | | android:textColor="@android:color/white"/> |
| | | |
| | | |
| | | |
| | | </LinearLayout> |
对比新文件 |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical" |
| | | android:padding="16dp"> |
| | | |
| | | <EditText |
| | | android:id="@+id/edit_nickname" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:hint="输入新昵称" |
| | | android:inputType="text" |
| | | android:maxLines="1" /> |
| | | |
| | | </LinearLayout> |
| | |
| | | android:layout_height="wrap_content" |
| | | android:layout_margin="16dp"> |
| | | |
| | | <!-- 快递内容 --> |
| | | <androidx.cardview.widget.CardView |
| | | android:id="@+id/expressContent" |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:id="@+id/express_recycler" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:cardBackgroundColor="@color/light_blue_50" |
| | | app:cardCornerRadius="8dp" |
| | | app:cardElevation="0dp"> |
| | | android:padding="8dp"/> |
| | | |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:id="@+id/express_recycler" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:padding="8dp"/> |
| | | |
| | | </androidx.cardview.widget.CardView> |
| | | |
| | | <!-- 财务内容 --> |
| | | <androidx.cardview.widget.CardView |
| | | android:id="@+id/financeContent" |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:id="@+id/finance_recycler" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:cardBackgroundColor="@color/light_blue_50" |
| | | app:cardCornerRadius="8dp" |
| | | app:cardElevation="0dp"> |
| | | |
| | | <androidx.recyclerview.widget.RecyclerView |
| | | android:id="@+id/finance_recycler" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:padding="8dp"/> |
| | | |
| | | </androidx.cardview.widget.CardView> |
| | | android:padding="8dp"/> |
| | | |
| | | </FrameLayout> |
| | | |
| | |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:fillViewport="true"> |
| | | android:background="@android:color/white" |
| | | android:fillViewport="true" |
| | | android:paddingBottom="56dp"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical"> |
| | | |
| | | <!-- 标题栏 --> |
| | | <TextView |
| | | <!-- 顶部广告位 - 减小高度 --> |
| | | <ImageView |
| | | android:id="@+id/iv_banner" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="#FFE4C4" |
| | | android:gravity="center" |
| | | android:padding="16dp" |
| | | android:text="终身会员" |
| | | android:textColor="@android:color/black" |
| | | android:textSize="20sp" |
| | | android:textStyle="bold" /> |
| | | android:layout_height="32dp" |
| | | android:scaleType="centerCrop" /> |
| | | |
| | | <!-- 功能区标题 --> |
| | | <!-- 用户信息区域 - 减小padding --> |
| | | <RelativeLayout |
| | | android:id="@+id/layout_user_info" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:padding="12dp"> |
| | | |
| | | <com.google.android.material.imageview.ShapeableImageView |
| | | android:id="@+id/iv_avatar" |
| | | android:layout_width="50dp" |
| | | android:layout_height="50dp" |
| | | android:scaleType="centerCrop" |
| | | app:shapeAppearanceOverlay="@style/CircleImageView" /> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_vip" |
| | | android:layout_width="24dp" |
| | | android:layout_height="24dp" |
| | | android:layout_alignBottom="@id/tv_nickname" |
| | | android:layout_marginStart="8dp" |
| | | android:layout_toEndOf="@id/tv_nickname" |
| | | android:contentDescription="VIP标识" |
| | | android:src="@drawable/me_vip" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_nickname" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginStart="16dp" |
| | | android:layout_toEndOf="@id/iv_avatar" |
| | | android:textColor="@android:color/black" |
| | | android:textSize="18sp" |
| | | android:textStyle="bold" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_user_id" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_below="@id/tv_nickname" |
| | | android:layout_marginStart="16dp" |
| | | android:layout_marginTop="4dp" |
| | | android:layout_toEndOf="@id/iv_avatar" |
| | | android:textColor="@android:color/darker_gray" |
| | | android:textSize="14sp" /> |
| | | </RelativeLayout> |
| | | |
| | | <!-- VIP会员卡片 - 减小margin和padding --> |
| | | <androidx.cardview.widget.CardView |
| | | android:id="@+id/card_vip" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginHorizontal="12dp" |
| | | android:layout_marginVertical="8dp" |
| | | app:cardCornerRadius="8dp" |
| | | app:cardElevation="4dp"> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/linearVipContainer" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="@android:color/black" |
| | | android:orientation="horizontal" |
| | | android:padding="12dp"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="0dp" |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" |
| | | android:orientation="vertical"> |
| | | |
| | | <!-- 第一行:VIP标题 + 有效期 --> |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="horizontal" |
| | | android:gravity="center_vertical"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:text="VIP会员 " |
| | | android:textColor="#B8741A" |
| | | android:textSize="18sp" |
| | | android:textStyle="bold"/> |
| | | |
| | | <!-- 添加间隔 --> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_vip_expire" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:textColor="#FFD700" |
| | | android:textSize="14sp"/> |
| | | </LinearLayout> |
| | | |
| | | <!-- 第二行:续费提示(上移调整) --> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="4dp" |
| | | android:text="续费畅享更多会员权益" |
| | | android:textColor="#B8741A" |
| | | android:textSize="12sp" |
| | | android:textStyle="bold"/> |
| | | </LinearLayout> |
| | | |
| | | <Button |
| | | android:id="@+id/btn_renew" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:backgroundTint="#7A441E" |
| | | android:text="立即续费" |
| | | android:textColor="#FFFFFF" /> |
| | | </LinearLayout> |
| | | </androidx.cardview.widget.CardView> |
| | | |
| | | <!-- 功能区域标题 - 调整margin --> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="16dp" |
| | | android:paddingHorizontal="16dp" |
| | | android:paddingVertical="8dp" |
| | | android:layout_columnSpan="4" |
| | | android:layout_marginStart="12dp" |
| | | android:layout_marginTop="12dp" |
| | | android:layout_marginBottom="4dp" |
| | | android:text="功能" |
| | | android:textColor="@android:color/darker_gray" |
| | | android:textSize="14sp" |
| | | android:textColor="#333333" |
| | | android:textSize="15sp" |
| | | android:textStyle="bold" /> |
| | | |
| | | <!-- 设置选项 --> |
| | | <LinearLayout |
| | | <!-- 功能图标网格 - 减小padding和调整间距 --> |
| | | <GridLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:orientation="vertical"> |
| | | android:columnCount="4" |
| | | android:paddingHorizontal="8dp" |
| | | android:paddingVertical="4dp"> |
| | | |
| | | <!-- 设置提醒 --> |
| | | <!-- 会员 --> |
| | | <RelativeLayout |
| | | android:id="@+id/settings_reminder" |
| | | style="@style/SettingsItem" |
| | | android:id="@+id/memberVip" |
| | | style="@style/PluginPay" |
| | | android:padding="16dp"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_centerVertical="true" |
| | | android:text="设置提醒" |
| | | android:text="会员" |
| | | android:textColor="@android:color/black" |
| | | android:textSize="16sp" /> |
| | | |
| | |
| | | android:src="@drawable/right_forward" /> |
| | | </RelativeLayout> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0.5dp" |
| | | android:layout_marginHorizontal="16dp" |
| | | android:background="#E0E0E0" /> |
| | | <!-- 支付 --> |
| | | <RelativeLayout |
| | | android:id="@+id/payPlugin" |
| | | style="@style/PluginPay" |
| | | android:padding="16dp"> |
| | | |
| | | <!-- 设置其他提醒 暂时不需要 --> |
| | | <!-- <RelativeLayout--> |
| | | <!-- android:id="@+id/settings_reminder_other"--> |
| | | <!-- style="@style/SettingsItem"--> |
| | | <!-- android:padding="16dp">--> |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_centerVertical="true" |
| | | android:text="支付" |
| | | android:textColor="@android:color/black" |
| | | android:textSize="16sp" /> |
| | | |
| | | <!-- <TextView--> |
| | | <!-- android:layout_width="wrap_content"--> |
| | | <!-- android:layout_height="wrap_content"--> |
| | | <!-- android:layout_centerVertical="true"--> |
| | | <!-- android:text="设置其他提醒"--> |
| | | <!-- android:textColor="@android:color/black"--> |
| | | <!-- android:textSize="16sp" />--> |
| | | <ImageView |
| | | android:layout_width="24dp" |
| | | android:layout_height="24dp" |
| | | android:layout_alignParentEnd="true" |
| | | android:layout_centerVertical="true" |
| | | android:src="@drawable/right_forward" /> |
| | | </RelativeLayout> |
| | | |
| | | <!-- <ImageView--> |
| | | <!-- android:layout_width="24dp"--> |
| | | <!-- android:layout_height="24dp"--> |
| | | <!-- android:layout_alignParentEnd="true"--> |
| | | <!-- android:layout_centerVertical="true"--> |
| | | <!-- android:src="@drawable/right_forward" />--> |
| | | <!-- </RelativeLayout>--> |
| | | <!-- 设置提醒 --> |
| | | <LinearLayout |
| | | android:id="@+id/layout_reminder" |
| | | style="@style/FunctionIconStyle"> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0.5dp" |
| | | android:layout_marginHorizontal="16dp" |
| | | android:background="#E0E0E0" /> |
| | | <ImageView |
| | | style="@style/FunctionImageStyle" |
| | | android:src="@drawable/me_set_reminder" /> |
| | | |
| | | <!-- 联系与反馈 --> |
| | | <TextView |
| | | style="@style/FunctionTextStyle" |
| | | android:text="设置提醒" /> |
| | | </LinearLayout> |
| | | |
| | | <!-- 待办 --> |
| | | <LinearLayout |
| | | android:id="@+id/layout_todo" |
| | | style="@style/FunctionIconStyle"> |
| | | |
| | | <ImageView |
| | | style="@style/FunctionImageStyle" |
| | | android:src="@drawable/me_wait_todo" /> |
| | | |
| | | <TextView |
| | | style="@style/FunctionTextStyle" |
| | | android:text="待办" /> |
| | | </LinearLayout> |
| | | |
| | | <!-- 好友邀请 --> |
| | | <LinearLayout |
| | | android:id="@+id/layout_invite" |
| | | style="@style/FunctionIconStyle"> |
| | | |
| | | <ImageView |
| | | style="@style/FunctionImageStyle" |
| | | android:src="@drawable/me_friend_invitation" /> |
| | | |
| | | <TextView |
| | | style="@style/FunctionTextStyle" |
| | | android:text="好友邀请" /> |
| | | </LinearLayout> |
| | | |
| | | <!-- AI助手 --> |
| | | <LinearLayout |
| | | android:id="@+id/layout_ai" |
| | | style="@style/FunctionIconStyle"> |
| | | |
| | | <ImageView |
| | | style="@style/FunctionImageStyle" |
| | | android:src="@drawable/me_ai_assistant" /> |
| | | |
| | | <TextView |
| | | style="@style/FunctionTextStyle" |
| | | android:text="AI助手" /> |
| | | </LinearLayout> |
| | | |
| | | <!-- 离线模式 --> |
| | | <LinearLayout |
| | | android:id="@+id/layout_offline" |
| | | style="@style/FunctionIconStyle"> |
| | | |
| | | <ImageView |
| | | style="@style/FunctionImageStyle" |
| | | android:src="@drawable/me_offline_mode" /> |
| | | |
| | | <TextView |
| | | style="@style/FunctionTextStyle" |
| | | android:text="离线模式" /> |
| | | </LinearLayout> |
| | | |
| | | <!-- 联系与反馈标题 - 调整margin --> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="16dp" |
| | | android:paddingHorizontal="16dp" |
| | | android:paddingVertical="8dp" |
| | | android:layout_columnSpan="4" |
| | | android:layout_marginStart="12dp" |
| | | android:layout_marginTop="12dp" |
| | | android:layout_marginBottom="4dp" |
| | | android:text="联系与反馈" |
| | | android:textColor="@android:color/darker_gray" |
| | | android:textSize="14sp" |
| | | android:textColor="#333333" |
| | | android:textSize="15sp" |
| | | android:textStyle="bold" /> |
| | | |
| | | <!-- 关于小红书 --> |
| | | <RelativeLayout |
| | | android:id="@+id/about_app" |
| | | style="@style/SettingsItem" |
| | | android:padding="16dp"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_centerVertical="true" |
| | | android:text="关于小红书" |
| | | android:textColor="@android:color/black" |
| | | android:textSize="16sp" /> |
| | | <LinearLayout |
| | | android:id="@+id/layout_about" |
| | | style="@style/FunctionIconStyle"> |
| | | |
| | | <ImageView |
| | | android:layout_width="24dp" |
| | | android:layout_height="24dp" |
| | | android:layout_alignParentEnd="true" |
| | | android:layout_centerVertical="true" |
| | | android:src="@drawable/right_forward" /> |
| | | </RelativeLayout> |
| | | style="@style/FunctionImageStyle" |
| | | android:src="@drawable/me_xiaohongshu" /> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0.5dp" |
| | | android:layout_marginHorizontal="16dp" |
| | | android:background="#E0E0E0" /> |
| | | <TextView |
| | | style="@style/FunctionTextStyle" |
| | | android:text="关于小红书" /> |
| | | </LinearLayout> |
| | | |
| | | <!-- 邮件联系 --> |
| | | <RelativeLayout |
| | | android:id="@+id/email_contact" |
| | | style="@style/SettingsItem" |
| | | android:padding="16dp"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_centerVertical="true" |
| | | android:text="邮件联系" |
| | | android:textColor="@android:color/black" |
| | | android:textSize="16sp" /> |
| | | <LinearLayout |
| | | android:id="@+id/layout_email" |
| | | style="@style/FunctionIconStyle"> |
| | | |
| | | <ImageView |
| | | android:layout_width="24dp" |
| | | android:layout_height="24dp" |
| | | android:layout_alignParentEnd="true" |
| | | android:layout_centerVertical="true" |
| | | android:src="@drawable/right_forward" /> |
| | | </RelativeLayout> |
| | | style="@style/FunctionImageStyle" |
| | | android:src="@drawable/me_email" /> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0.5dp" |
| | | android:layout_marginHorizontal="16dp" |
| | | android:background="#E0E0E0" /> |
| | | <TextView |
| | | style="@style/FunctionTextStyle" |
| | | android:text="邮件联系" /> |
| | | </LinearLayout> |
| | | |
| | | <!-- 意见与反馈 --> |
| | | <RelativeLayout |
| | | android:id="@+id/feedback" |
| | | style="@style/SettingsItem" |
| | | android:padding="16dp"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_centerVertical="true" |
| | | android:text="意见与反馈" |
| | | android:textColor="@android:color/black" |
| | | android:textSize="16sp" /> |
| | | <LinearLayout |
| | | android:id="@+id/layout_feedback" |
| | | style="@style/FunctionIconStyle"> |
| | | |
| | | <ImageView |
| | | android:layout_width="24dp" |
| | | android:layout_height="24dp" |
| | | android:layout_alignParentEnd="true" |
| | | android:layout_centerVertical="true" |
| | | android:src="@drawable/right_forward" /> |
| | | </RelativeLayout> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0.5dp" |
| | | android:layout_marginHorizontal="16dp" |
| | | android:background="#E0E0E0" /> |
| | | |
| | | <!-- 分享给好友 --> |
| | | <RelativeLayout |
| | | android:id="@+id/share_to_friends" |
| | | style="@style/SettingsItem" |
| | | android:padding="16dp"> |
| | | style="@style/FunctionImageStyle" |
| | | android:src="@drawable/me_feedback" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_centerVertical="true" |
| | | android:text="分享给好友" |
| | | android:textColor="@android:color/black" |
| | | android:textSize="16sp" /> |
| | | style="@style/FunctionTextStyle" |
| | | android:text="意见与反馈" /> |
| | | </LinearLayout> |
| | | |
| | | <ImageView |
| | | android:layout_width="24dp" |
| | | android:layout_height="24dp" |
| | | android:layout_alignParentEnd="true" |
| | | android:layout_centerVertical="true" |
| | | android:src="@drawable/right_forward" /> |
| | | </RelativeLayout> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0.5dp" |
| | | android:layout_marginHorizontal="16dp" |
| | | android:background="#E0E0E0" /> |
| | | |
| | | <!-- 其他区域标题 --> |
| | | <!-- 其他标题 - 调整margin --> |
| | | <TextView |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="16dp" |
| | | android:paddingHorizontal="16dp" |
| | | android:paddingVertical="8dp" |
| | | android:layout_columnSpan="4" |
| | | android:layout_marginStart="12dp" |
| | | android:layout_marginTop="12dp" |
| | | android:layout_marginBottom="4dp" |
| | | android:text="其他" |
| | | android:textColor="@android:color/darker_gray" |
| | | android:textSize="14sp" |
| | | android:textColor="#333333" |
| | | android:textSize="15sp" |
| | | android:textStyle="bold" /> |
| | | |
| | | <!-- 隐私协议 --> |
| | | <RelativeLayout |
| | | android:id="@+id/privacy_policy" |
| | | style="@style/SettingsItem" |
| | | android:padding="16dp"> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_centerVertical="true" |
| | | android:text="隐私协议" |
| | | android:textColor="@android:color/black" |
| | | android:textSize="16sp" /> |
| | | <LinearLayout |
| | | android:id="@+id/layout_privacy" |
| | | style="@style/FunctionIconStyle"> |
| | | |
| | | <ImageView |
| | | android:layout_width="24dp" |
| | | android:layout_height="24dp" |
| | | android:layout_alignParentEnd="true" |
| | | android:layout_centerVertical="true" |
| | | android:src="@drawable/right_forward" /> |
| | | </RelativeLayout> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0.5dp" |
| | | android:layout_marginHorizontal="16dp" |
| | | android:background="#E0E0E0" /> |
| | | |
| | | <!-- 如何使用 --> |
| | | <RelativeLayout |
| | | android:id="@+id/how_to_use" |
| | | style="@style/SettingsItem" |
| | | android:padding="16dp"> |
| | | style="@style/FunctionImageStyle" |
| | | android:src="@drawable/me_privacy" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_centerVertical="true" |
| | | android:text="如何使用" |
| | | android:textColor="@android:color/black" |
| | | android:textSize="16sp" /> |
| | | style="@style/FunctionTextStyle" |
| | | android:text="隐私协议" /> |
| | | </LinearLayout> |
| | | |
| | | <!-- 使用教程 --> |
| | | <LinearLayout |
| | | android:id="@+id/layout_tutorial" |
| | | style="@style/FunctionIconStyle"> |
| | | |
| | | <ImageView |
| | | android:layout_width="24dp" |
| | | android:layout_height="24dp" |
| | | android:layout_alignParentEnd="true" |
| | | android:layout_centerVertical="true" |
| | | android:src="@drawable/right_forward" /> |
| | | </RelativeLayout> |
| | | style="@style/FunctionImageStyle" |
| | | android:src="@drawable/me_tutorial" /> |
| | | |
| | | </LinearLayout> |
| | | <TextView |
| | | style="@style/FunctionTextStyle" |
| | | android:text="使用教程" /> |
| | | </LinearLayout> |
| | | |
| | | </GridLayout> |
| | | |
| | | <!-- 底部间距缩小 --> |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="8dp" /> |
| | | |
| | | </LinearLayout> |
| | | </ScrollView> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" |
| | | <!-- strokeColor黑色边框颜色 --> <!--strokeWidth 边框宽度 --> |
| | | <com.google.android.material.card.MaterialCardView |
| | | xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginHorizontal="12dp" |
| | | android:layout_marginVertical="6dp" |
| | | app:cardCornerRadius="8dp" |
| | | app:cardElevation="2dp"> |
| | | app:cardElevation="2dp" |
| | | app:cardBackgroundColor="@android:color/white" |
| | | app:strokeColor="#FF000000" |
| | | app:strokeWidth="2dp"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content"/> |
| | | </LinearLayout> |
| | | </androidx.cardview.widget.CardView> |
| | | </com.google.android.material.card.MaterialCardView> |
| | |
| | | android:id="@+id/tv_create_time" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:textSize="12sp" |
| | | android:textSize="10sp" |
| | | android:textColor="#666666" |
| | | android:layout_marginTop="4dp"/> |
| | | </LinearLayout> |
| | |
| | | <item name="fullscreenBackgroundColor">@color/light_blue_900</item> |
| | | <item name="fullscreenTextColor">@color/light_blue_A400</item> |
| | | </style> |
| | | <!-- Base application theme. --> |
| | | <style name="Base.Theme.FirstApp" parent="Theme.Material3.DayNight.NoActionBar"> |
| | | <!-- Customize your dark theme here. --> |
| | | <!-- <item name="colorPrimary">@color/my_dark_primary</item> --> |
| | | </style> |
| | | </resources> |
对比新文件 |
| | |
| | | <resources xmlns:tools="http://schemas.android.com/tools"> |
| | | |
| | | <style name="Theme.FirstApp" parent="Base.Theme.FirstApp"> |
| | | <!-- Transparent system bars for edge-to-edge. --> |
| | | <item name="android:navigationBarColor">@android:color/transparent</item> |
| | | <item name="android:statusBarColor">@android:color/transparent</item> |
| | | <item name="android:windowLightStatusBar">?attr/isLightTheme</item> |
| | | </style> |
| | | </resources> |
| | |
| | | <color name="light_blue_A200">#FF40C4FF</color> |
| | | <color name="light_blue_A400">#FF00B0FF</color> |
| | | <color name="black_overlay">#66000000</color> |
| | | <color name="gray">#757575</color> |
| | | <color name="gray">#757575</color> <!-- 标准灰色 #808080 主要用到到会员模块--> |
| | | <color name="light_blue_50">#E1F5FE</color> |
| | | <color name="tab_selected">#FF039BE5</color> |
| | | <color name="light_blue_new">#02A7F0</color> |
| | |
| | | <string name="app_name">智信管家</string> |
| | | <string name="title_home">首页</string> |
| | | <string name="title_dashboard">数据统计</string> |
| | | <string name="title_notifications">设置</string> |
| | | <string name="title_notifications">我的</string> |
| | | |
| | | |
| | | <string name="notification_content">智信管家APP</string> |
| | |
| | | <string name="dummy_button">Dummy Button</string> |
| | | <string name="dummy_content">DUMMY\nCONTENT</string> |
| | | <string name="title_activity_reminder_other_add2">添加纪念日</string> |
| | | |
| | | |
| | | |
| | | <string-array name="day_types"> |
| | |
| | | <item>月</item> |
| | | <item>年</item> |
| | | </string-array> |
| | | <string name="title_activity_member">MemberActivity</string> |
| | | <!-- Strings used for fragments for navigation --> |
| | | <string name="first_fragment_label">First Fragment</string> |
| | | <string name="second_fragment_label">Second Fragment</string> |
| | | <string name="next">Next</string> |
| | | <string name="previous">Previous</string> |
| | | |
| | | |
| | | <string name="lorem_ipsum"> |
| | | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam in scelerisque sem. Mauris |
| | | volutpat, dolor id interdum ullamcorper, risus dolor egestas lectus, sit amet mattis purus |
| | | dui nec risus. Maecenas non sodales nisi, vel dictum dolor. Class aptent taciti sociosqu ad |
| | | litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse blandit eleifend |
| | | diam, vel rutrum tellus vulputate quis. Aliquam eget libero aliquet, imperdiet nisl a, |
| | | ornare ex. Sed rhoncus est ut libero porta lobortis. Fusce in dictum tellus.\n\n |
| | | Suspendisse interdum ornare ante. Aliquam nec cursus lorem. Morbi id magna felis. Vivamus |
| | | egestas, est a condimentum egestas, turpis nisl iaculis ipsum, in dictum tellus dolor sed |
| | | neque. Morbi tellus erat, dapibus ut sem a, iaculis tincidunt dui. Interdum et malesuada |
| | | fames ac ante ipsum primis in faucibus. Curabitur et eros porttitor, ultricies urna vitae, |
| | | molestie nibh. Phasellus at commodo eros, non aliquet metus. Sed maximus nisl nec dolor |
| | | bibendum, vel congue leo egestas.\n\n |
| | | Sed interdum tortor nibh, in sagittis risus mollis quis. Curabitur mi odio, condimentum sit |
| | | amet auctor at, mollis non turpis. Nullam pretium libero vestibulum, finibus orci vel, |
| | | molestie quam. Fusce blandit tincidunt nulla, quis sollicitudin libero facilisis et. Integer |
| | | interdum nunc ligula, et fermentum metus hendrerit id. Vestibulum lectus felis, dictum at |
| | | lacinia sit amet, tristique id quam. Cras eu consequat dui. Suspendisse sodales nunc ligula, |
| | | in lobortis sem porta sed. Integer id ultrices magna, in luctus elit. Sed a pellentesque |
| | | est.\n\n |
| | | Aenean nunc velit, lacinia sed dolor sed, ultrices viverra nulla. Etiam a venenatis nibh. |
| | | Morbi laoreet, tortor sed facilisis varius, nibh orci rhoncus nulla, id elementum leo dui |
| | | non lorem. Nam mollis ipsum quis auctor varius. Quisque elementum eu libero sed commodo. In |
| | | eros nisl, imperdiet vel imperdiet et, scelerisque a mauris. Pellentesque varius ex nunc, |
| | | quis imperdiet eros placerat ac. Duis finibus orci et est auctor tincidunt. Sed non viverra |
| | | ipsum. Nunc quis augue egestas, cursus lorem at, molestie sem. Morbi a consectetur ipsum, a |
| | | placerat diam. Etiam vulputate dignissim convallis. Integer faucibus mauris sit amet finibus |
| | | convallis.\n\n |
| | | Phasellus in aliquet mi. Pellentesque habitant morbi tristique senectus et netus et |
| | | malesuada fames ac turpis egestas. In volutpat arcu ut felis sagittis, in finibus massa |
| | | gravida. Pellentesque id tellus orci. Integer dictum, lorem sed efficitur ullamcorper, |
| | | libero justo consectetur ipsum, in mollis nisl ex sed nisl. Donec maximus ullamcorper |
| | | sodales. Praesent bibendum rhoncus tellus nec feugiat. In a ornare nulla. Donec rhoncus |
| | | libero vel nunc consequat, quis tincidunt nisl eleifend. Cras bibendum enim a justo luctus |
| | | vestibulum. Fusce dictum libero quis erat maximus, vitae volutpat diam dignissim. |
| | | </string> |
| | | |
| | | |
| | | </resources> |
| | |
| | | <item name="android:focusable">true</item> |
| | | </style> |
| | | |
| | | <style name="PluginPay"> |
| | | <item name="android:layout_width">match_parent</item> |
| | | <item name="android:layout_height">wrap_content</item> |
| | | <item name="android:padding">16dp</item> |
| | | <item name="android:background">?android:attr/selectableItemBackground</item> |
| | | <item name="android:clickable">true</item> |
| | | <item name="android:focusable">true</item> |
| | | </style> |
| | | |
| | | <style name="Widget.Theme.FirstApp.ActionBar.Fullscreen" parent="Widget.AppCompat.ActionBar"> |
| | | <item name="android:background">@color/black_overlay</item> |
| | | </style> |
| | |
| | | <item name="android:background">@color/black_overlay</item> |
| | | <item name="android:buttonBarStyle">?android:attr/buttonBarStyle</item> |
| | | </style> |
| | | |
| | | <!-- 功能图标样式 --> |
| | | <style name="FunctionIconStyle"> |
| | | <item name="android:layout_width">0dp</item> |
| | | <item name="android:layout_height">wrap_content</item> |
| | | <item name="android:layout_columnWeight">1</item> |
| | | <item name="android:gravity">center</item> |
| | | <item name="android:orientation">vertical</item> |
| | | <item name="android:padding">8dp</item> |
| | | </style> |
| | | |
| | | <style name="FunctionImageStyle"> |
| | | <item name="android:layout_width">50dp</item> |
| | | <item name="android:layout_height">50dp</item> |
| | | <item name="android:padding">6dp</item> |
| | | </style> |
| | | |
| | | <style name="FunctionTextStyle"> |
| | | <item name="android:layout_width">wrap_content</item> |
| | | <item name="android:layout_height">wrap_content</item> |
| | | <item name="android:layout_marginTop">2dp</item> |
| | | <item name="android:textSize">11sp</item> |
| | | <item name="android:textColor">@android:color/black</item> |
| | | </style> |
| | | |
| | | <style name="CircleImageView"> |
| | | <item name="cornerFamily">rounded</item> |
| | | <item name="cornerSize">50%</item> |
| | | </style> |
| | | </resources> |
| | |
| | | <item name="windowActionBar">false</item> |
| | | <item name="windowNoTitle">true</item> |
| | | </style> |
| | | <!-- Base application theme. --> |
| | | <style name="Base.Theme.FirstApp" parent="Theme.Material3.DayNight.NoActionBar"> |
| | | <!-- Customize your light theme here. --> |
| | | <!-- <item name="colorPrimary">@color/my_light_primary</item> --> |
| | | </style> |
| | | </resources> |
| | |
| | | <domain-config cleartextTrafficPermitted="true"> |
| | | <domain includeSubdomains="true">47.96.225.205</domain> |
| | | <domain includeSubdomains="true">192.168.1.213</domain> |
| | | <domain includeSubdomains="true">192.168.1.198</domain> |
| | | <domain includeSubdomains="true">192.168.1.199</domain> |
| | | <!-- 可添加其他域名或IP(如192.168.0.101) --> |
| | | <!-- 如果本地服务使用自签名证书,需在 network_security_config.xml 中信任该证书:--> |
| | | <!-- <trust-anchors>--> |