Skip to content

Commit

Permalink
Merge pull request #473 from RedrockMobile/why/feature/about_us
Browse files Browse the repository at this point in the history
✨ “关于我们”页面添加备案号
  • Loading branch information
RQ527 authored Mar 31, 2024
2 parents 8f8d482 + d287037 commit db43dc1
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ const val SP_SIGN_REMIND = "signRemind"

const val APP_WEBSITE = "https://m.app.redrock.team"

// 工信部网站
const val ICP_WEBSITE = "https://beian.miit.gov.cn/"

const val ABOUT_US_WEBSITE = "https://redrock.team"

//小控件课表及事务
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ import com.mredrock.cyxbs.api.update.BuildConfig
import com.mredrock.cyxbs.api.update.IAppUpdateService
import com.mredrock.cyxbs.common.config.APP_WEBSITE
import com.mredrock.cyxbs.common.config.DIR_LOG
import com.mredrock.cyxbs.common.config.ICP_WEBSITE
import com.mredrock.cyxbs.common.config.OKHTTP_LOCAL_LOG
import com.mredrock.cyxbs.common.service.ServiceManager
import com.mredrock.cyxbs.common.ui.BaseViewModelActivity
import com.mredrock.cyxbs.common.utils.extensions.toast
import com.mredrock.cyxbs.common.utils.getAppVersionName
import com.mredrock.cyxbs.lib.utils.extensions.setOnSingleClickListener
import com.mredrock.cyxbs.mine.R
import com.mredrock.cyxbs.mine.util.ui.DebugUpdateDialog
import com.mredrock.cyxbs.mine.util.ui.DynamicRVAdapter
Expand All @@ -45,6 +47,7 @@ class AboutActivity : BaseViewModelActivity<AboutViewModel>() {
private val mine_about_tv_copy_right by R.id.mine_about_tv_copy_right.view<TextView>()
private val mine_about_version by R.id.mine_about_version.view<TextView>()
private val mine_about_tv_already_up_to_date by R.id.mine_about_tv_already_up_to_date.view<TextView>()
private val icpInfoTv by R.id.mine_about_tv_icp_info.view<TextView>()


private val mTvProtocol by R.id.mine_about_user_protocol.view<TextView>()
Expand Down Expand Up @@ -72,7 +75,8 @@ class AboutActivity : BaseViewModelActivity<AboutViewModel>() {
setAppVersionName()

bindUpdate()
mine_about_rl_website.setOnClickListener { clickWebsite() }
mine_about_rl_website.setOnClickListener { clickWebsite(APP_WEBSITE) }
icpInfoTv.setOnSingleClickListener { clickWebsite(ICP_WEBSITE) }
mine_about_rl_share.setOnClickListener { onShareClick() }
mine_about_rl_update.setOnClickListener { clickUpdate() }
mine_about_rl_function.setOnClickListener { clickFeatureIntroduction() }
Expand Down Expand Up @@ -169,8 +173,8 @@ class AboutActivity : BaseViewModelActivity<AboutViewModel>() {
}
}

private fun clickWebsite() {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(APP_WEBSITE))
private fun clickWebsite(url: String) {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
startActivity(intent)
}

Expand Down
18 changes: 15 additions & 3 deletions module_mine/src/main/res/layout/mine_activity_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
android:id="@+id/mine_about_press"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginBottom="5dp"
android:text="@string/mine_about_1"
android:textColor="@color/common_about_colors_declared_below"
android:textSize="11sp"
Expand All @@ -75,14 +75,26 @@
android:id="@+id/mine_about_tv_copy_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="30dp"
android:layout_marginBottom="5dp"
android:text="@string/mine_about_copyright"
android:textColor="@color/common_about_colors_declared_below"
android:textSize="11sp"
app:layout_constraintBottom_toBottomOf="@+id/mine_about_iv"
app:layout_constraintBottom_toTopOf="@+id/mine_about_tv_icp_info"
app:layout_constraintEnd_toEndOf="@+id/mine_about_press"
app:layout_constraintStart_toStartOf="@+id/mine_about_press" />

<TextView
android:id="@+id/mine_about_tv_icp_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="40dp"
android:text="@string/mine_about_icp_info"
android:textColor="@color/common_mine_about_text_color_blue"
android:textSize="11sp"
app:layout_constraintBottom_toBottomOf="@+id/mine_about_iv"
app:layout_constraintEnd_toEndOf="@id/mine_about_tv_copy_right"
app:layout_constraintStart_toStartOf="@id/mine_about_tv_copy_right" />


<LinearLayout
android:id="@+id/mine_about_user_protocol_and_privacy"
Expand Down
1 change: 1 addition & 0 deletions module_mine/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
<string name="mine_about_update">版本更新</string>
<string name="mine_about_1">红岩网校工作站出品</string>
<string name="mine_about_copyright">CopyRight © 2015&#8211;2021 All Rights Reserved</string>
<string name="mine_about_icp_info">ICP备案号: 渝ICP备17002788号-7A</string>
<string name="mine_sign_store_back">store back</string>

<!--密码与安全-->
Expand Down

0 comments on commit db43dc1

Please sign in to comment.