docs: 更新README及APP名称

This commit is contained in:
糕小菜 2024-12-16 15:00:52 +08:00
parent c4e4963ed0
commit 232eeb3adf
17 changed files with 144 additions and 88 deletions

View File

@ -2,7 +2,19 @@
<project version="4">
<component name="GitCommitMessageStorage">
<option name="messageStorage">
<MessageStorage />
<MessageStorage>
<option name="commitTemplate">
<CommitTemplate>
<option name="body" value="" />
<option name="changes" value="" />
<option name="closes" value="" />
<option name="scope" value="" />
<option name="skipCi" value="" />
<option name="subject" value="" />
<option name="type" value="feat" />
</CommitTemplate>
</option>
</MessageStorage>
</option>
</component>
</project>

View File

@ -1,6 +1,6 @@
# 星 — 简单的即时通讯应用
# 星 — 简单的即时通讯应用
欢迎使用 **星**,这是一款简单轻量的即时通讯应用,旨在展示如何使用现代 Android 开发技术构建一个基础的聊天应用。该项目实现了基本的聊天功能,并参考 **MVVM 架构**、**Kotlin**、**LiveData** 和 **ObjectBox 数据库**
欢迎使用 **星**,这是一款简单轻量的即时通讯应用,旨在展示如何使用现代 Android 开发技术构建一个基础的聊天应用。该项目实现了基本的聊天功能,并参考 **MVVM 架构**、**Kotlin**、**LiveData** 和 **ObjectBox 数据库**
------

View File

@ -39,6 +39,9 @@
android:theme="@style/Theme.KChatAndroid"
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".ui.activity.setting.UpdateTelephoneActivity"
android:exported="false" />
<activity
android:name=".ui.activity.setting.AccountSecurityActivity"
android:exported="false" />

View File

@ -44,7 +44,7 @@ class ContactsDetailActivity : BaseActivity<ActivityContactsDetailBinding>() {
val contact: Contact by lazy {
getContactInfo(contactId!!)
}
binding.tvContactId.text = "kid: $contactId"
binding.tvContactId.text = "星联号: $contactId"
binding.tvContactSignature.text = contact.signature
if (contact.remark?.isNotEmpty() == true) {
binding.tvRemark.text = contact.remark

View File

@ -51,17 +51,6 @@ class SettingsActivity : BaseActivity<ActivitySettingBinding>(), View.OnClickLis
R.id.item_account_security -> {
val intent = Intent(this, AccountSecurityActivity::class.java)
startActivity(intent)
// val intent = Intent(context, UpdatePasswordActivity::class.java)
//
// val navOptions = NavOptions.Builder()
// .setEnterAnim(R.anim.push_in_from_right) // 从右侧推入
// .setExitAnim(R.anim.push_out_to_left) // 从左侧推出
// .setPopEnterAnim(R.anim.push_in_from_left) // 从左侧推入
// .setPopExitAnim(R.anim.push_out_to_right) // 从右侧推出
// .build()
//
// findNavController().navigate(R.id.action_settings_to_security, null, navOptions)
}
R.id.item_teen_mode -> {

View File

@ -1,6 +1,8 @@
package com.kaixed.kchat.ui.activity.setting
import android.os.Bundle
import android.view.View
import android.widget.Toast
import androidx.activity.enableEdgeToEdge
import com.kaixed.kchat.databinding.ActivityAboutBinding
import com.kaixed.kchat.ui.base.BaseActivity

View File

@ -0,0 +1,25 @@
package com.kaixed.kchat.ui.activity.setting
import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.kaixed.kchat.R
import com.kaixed.kchat.databinding.ActivityUpdateTelephoneBinding
import com.kaixed.kchat.ui.base.BaseActivity
class UpdateTelephoneActivity : BaseActivity<ActivityUpdateTelephoneBinding>() {
override fun inflateBinding(): ActivityUpdateTelephoneBinding =
ActivityUpdateTelephoneBinding.inflate(layoutInflater)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
}
override fun initData() {
}
}

View File

@ -1,6 +1,7 @@
package com.kaixed.kchat.ui.base
import android.os.Bundle
import android.view.View
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.viewbinding.ViewBinding

View File

@ -47,7 +47,7 @@ class MineFragment : BaseFragment<FragmentMineBinding>() {
private fun updateContent() {
val nickname = ConstantsUtil.getNickName()
binding.tvNickname.text = nickname
val kid = "kid: ${getUsername()}"
val kid = "星联号: ${getUsername()}"
binding.tvId.text = kid
Glide.with(requireContext()).load(getAvatarUrl())

View File

@ -6,6 +6,7 @@ import android.net.Uri
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import android.widget.Toast
import androidx.constraintlayout.widget.ConstraintLayout
import com.bumptech.glide.Glide
import com.kaixed.kchat.R

View File

@ -22,83 +22,95 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
<androidx.constraintlayout.utils.widget.ImageFilterView
android:id="@+id/ifv_logo"
android:layout_width="65dp"
android:layout_height="65dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="40dp"
android:src="@mipmap/ic_launcher"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:roundPercent="0.3" />
<TextView
android:id="@+id/tv_app_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="30dp"
android:text="@string/app_name"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/ifv_logo" />
<TextView
android:id="@+id/tv_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="3dp"
android:textColor="@color/black"
android:textSize="15sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_app_name" />
<View
android:id="@+id/view"
android:layout_width="match_parent"
android:layout_height="@dimen/divider_height"
android:layout_marginHorizontal="30dp"
android:layout_marginTop="40dp"
android:background="#E5E5E5"
app:layout_constraintTop_toBottomOf="@id/tv_version" />
<com.kaixed.kchat.ui.widget.CustomItem
android:id="@+id/ci_feat_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintTop_toTopOf="parent">
android:layout_marginHorizontal="30dp"
android:background="@color/white"
app:isBottomDividerVisible="true"
app:itemName="功能介绍"
app:layout_constraintTop_toBottomOf="@id/view" />
<androidx.constraintlayout.utils.widget.ImageFilterView
android:layout_width="65dp"
android:layout_height="65dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="40dp"
android:src="@mipmap/ic_launcher"
app:roundPercent="0.3" />
<com.kaixed.kchat.ui.widget.CustomItem
android:id="@+id/ci_feedback"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="30dp"
android:background="@color/white"
app:isBottomDividerVisible="true"
app:itemName="投诉"
app:layout_constraintTop_toBottomOf="@id/ci_feat_desc" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="30dp"
android:text="@string/app_name"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold" />
<com.kaixed.kchat.ui.widget.CustomItem
android:id="@+id/ci_check_update"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="30dp"
android:background="@color/white"
app:itemName="检查新版本"
app:layout_constraintTop_toBottomOf="@id/ci_feedback" />
<TextView
android:id="@+id/tv_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="3dp"
android:text="Version 0.0.01"
android:textColor="@color/black"
android:textSize="15sp" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/divider_height"
android:layout_marginHorizontal="30dp"
android:layout_marginTop="40dp"
android:background="#E5E5E5" />
<com.kaixed.kchat.ui.widget.CustomItem
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="30dp"
android:background="@color/white"
app:isBottomDividerVisible="true"
app:itemName="功能介绍" />
<com.kaixed.kchat.ui.widget.CustomItem
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="30dp"
android:background="@color/white"
app:isBottomDividerVisible="true"
app:itemName="投诉" />
<com.kaixed.kchat.ui.widget.CustomItem
android:id="@+id/ci_check_update"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="30dp"
android:background="@color/white"
app:itemName="检查新版本" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/divider_height"
android:layout_marginHorizontal="30dp"
android:background="#E5E5E5" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/divider_height"
android:layout_marginHorizontal="30dp"
android:background="#E5E5E5"
app:layout_constraintTop_toBottomOf="@id/ci_check_update" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:text="Copyright © 2024-Present 糕小菜. All Rights Reserved."
android:text="@string/copyright"
android:textSize="11sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"

View File

@ -21,7 +21,7 @@
android:layout_height="wrap_content"
app:isBottomDividerVisible="true"
app:itemDesc="kaixed"
app:itemName="kid号" />
app:itemName="星联号" />
<com.kaixed.kchat.ui.widget.CustomItem
android:id="@+id/ci_telephone"
@ -65,7 +65,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin"
app:itemName="安全中心" />
app:itemName="星联安全中心" />
</LinearLayout>

View File

@ -53,7 +53,6 @@
android:id="@+id/tv_contact_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="kid: kaixed"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="@id/tv_remark"
app:layout_constraintTop_toBottomOf="@id/tv_contact_name" />

View File

@ -123,7 +123,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin"
app:isBottomDividerVisible="true"
app:itemName="关于星" />
app:itemName="关于星" />
<com.kaixed.kchat.ui.widget.CustomItem
android:id="@+id/item_help_feedback"

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ui.activity.setting.UpdateTelephoneActivity">
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -22,6 +22,7 @@
<attr name="itemLeftIcon" format="reference" />
<attr name="itemRedTip" format="boolean" />
<attr name="android:background" />
<attr name="isFinished" format="boolean"/>
</declare-styleable>

View File

@ -1,5 +1,5 @@
<resources>
<string name="app_name"></string>
<string name="app_name"></string>
<string name="signature">平安顺遂,喜乐无忧</string>
<string name="name">kaixed</string>
<string name="setting">设置</string>
@ -7,5 +7,6 @@
<string name="withdraw_message_format">%1$s 撤回了一条消息</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
<string name="copyright">Copyright © 2024-Present 星联. All Rights Reserved.</string>
</resources>