Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
<activity
android:name=".view.activities.FreeMakeNote"
android:exported="false" />
<activity
android:name=".view.activities.AboutContributorsActivity"
android:exported="false" />
<activity
android:name=".view.activities.AboutSoftware"
android:exported="false" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
package com.haodustudio.DailyNotes.view.activities

import android.os.Bundle
import android.view.LayoutInflater
import androidx.core.content.ContextCompat
import com.haodustudio.DailyNotes.R
import com.haodustudio.DailyNotes.databinding.ActivityAboutContributorsBinding
import com.haodustudio.DailyNotes.databinding.LayoutContributorCardBinding
import com.haodustudio.DailyNotes.view.activities.base.BaseActivity
import java.util.Calendar

class AboutContributorsActivity : BaseActivity() {

private val binding by lazy { ActivityAboutContributorsBinding.inflate(layoutInflater) }

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(binding.root)

setupCoreContributors()
setupFooter()
}

private fun setupCoreContributors() {
val inflater = LayoutInflater.from(this)
val coreMembers = listOf(
CoreContributor(
name = "好读游独",
roleText = getString(R.string.contributors_core_role_major),
avatarRes = R.drawable.avatar_contributor_haoduyoudu
),
CoreContributor(
name = "HikaruQwQ",
roleText = getString(R.string.contributors_core_role_ce_lead),
avatarRes = R.drawable.avatar_contributor_hikaruqwq
),
CoreContributor(
name = "huanli233",
roleText = getString(R.string.contributors_core_role_support),
avatarRes = R.drawable.avatar_contributor_huanli233
)
)

binding.coreContributorsContainer.removeAllViews()
coreMembers.forEach { contributor ->
val cardBinding = LayoutContributorCardBinding.inflate(inflater, binding.coreContributorsContainer, false)
cardBinding.name.text = contributor.name
cardBinding.role.text = contributor.roleText
val avatar = ContextCompat.getDrawable(this, contributor.avatarRes)
if (avatar != null) {
cardBinding.avatar.setImageDrawable(avatar)
} else {
cardBinding.avatar.setImageResource(R.drawable.ic_avatar_placeholder)
}
binding.coreContributorsContainer.addView(cardBinding.root)
}
}

private fun setupFooter() {
val currentYear = Calendar.getInstance().get(Calendar.YEAR)
binding.footerCopyright.text = getString(R.string.contributors_footer_copyright, currentYear)
}

private data class CoreContributor(
val name: String,
val roleText: String,
val avatarRes: Int
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class AboutSoftware : BaseActivity() {
icon.setImageResource(R.drawable.usergroup)
root.contentDescription = getString(R.string.about_section_contributors_desc)
root.setOnClickListener {
openRemoteAsset("/static/about_thanks_img.png", zoomEnabled = false)
openContributorsPage()
}
}

Expand Down Expand Up @@ -112,6 +112,10 @@ class AboutSoftware : BaseActivity() {
startActivity(viewerIntent)
}

private fun openContributorsPage() {
startActivity(Intent(this, AboutContributorsActivity::class.java))
}

private fun openExternalUrl(url: String) {
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
if (intent.resolveActivity(packageManager) != null) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_avatar_placeholder.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?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:fillColor="#FF666666"
android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zm0,2c-2.67,0 -8,1.34 -8,4v1c0,0.55 0.45,1 1,1h14c0.55,0 1,-0.45 1,-1v-1c0,-2.66 -5.33,-4 -8,-4z" />
</vector>
Binary file added app/src/main/res/drawable/ic_haodustudio_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/src/main/res/drawable/ic_main_setting.png
Binary file not shown.
Binary file removed app/src/main/res/drawable/ic_user_img_arts.webp
Binary file not shown.
Binary file not shown.
Binary file removed app/src/main/res/drawable/ic_user_img_mengxi.webp
Binary file not shown.
117 changes: 117 additions & 0 deletions app/src/main/res/layout/activity_about_contributors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/about_background"
tools:context=".view.activities.AboutContributorsActivity">

<androidx.core.widget.NestedScrollView
android:id="@+id/contributors_scroll"
android:layout_width="0dp"
android:layout_height="0dp"
android:clipToPadding="false"
android:fillViewport="true"
android:paddingStart="@dimen/contributors_screen_padding_horizontal"
android:paddingTop="@dimen/contributors_screen_padding_vertical"
android:paddingEnd="@dimen/contributors_screen_padding_horizontal"
android:paddingBottom="@dimen/contributors_screen_padding_vertical"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">

<LinearLayout
android:id="@+id/contributors_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">

<TextView
android:id="@+id/page_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-medium"
android:text="@string/contributors_page_title"
android:textColor="@color/white"
android:textSize="@dimen/contributors_heading_text_size"
tools:text="贡献者" />

<LinearLayout
android:id="@+id/coreContributorsContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/contributors_card_margin_top"
android:orientation="vertical" />

<TextView
android:id="@+id/art_team_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/contributors_subsection_margin_top"
android:text="@string/contributors_art_team_title"
android:textColor="@color/about_secondary_text"
android:textSize="@dimen/contributors_section_title_text_size"
android:fontFamily="sans-serif-medium"
tools:text="设计团队" />

<TextView
android:id="@+id/art_team_members"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="@string/contributors_art_team_members"
android:textColor="@color/about_secondary_text"
android:textSize="@dimen/contributors_body_text_size"
android:fontFamily="sans-serif"
tools:text="名单" />

<LinearLayout
android:id="@+id/footer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/contributors_subsection_margin_top"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="@dimen/contributors_footer_padding">

<ImageView
android:id="@+id/footerLogo"
android:layout_width="@dimen/contributors_footer_logo_size"
android:layout_height="@dimen/contributors_footer_logo_size"
android:contentDescription="@string/contributors_footer_logo_desc"
android:src="@drawable/ic_haodustudio_logo"
android:scaleType="centerInside" />

<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/contributors_avatar_text_margin_start"
android:layout_weight="1"
android:orientation="vertical">

<TextView
android:id="@+id/footerAttribution"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/contributors_footer_attribution"
android:textColor="@color/about_secondary_text"
android:textSize="@dimen/contributors_footer_text_size"
android:fontFamily="sans-serif"
tools:text="本软件部分图标来源于 MUI / TDesign Icon" />

<TextView
android:id="@+id/footerCopyright"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:textColor="@color/about_secondary_text"
android:textSize="@dimen/contributors_footer_text_size"
android:fontFamily="sans-serif"
tools:text="©HaoduStudio 2021 - 2025" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_about_software.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
android:layout_height="wrap_content"
android:text="@string/about"
android:textColor="@color/white"
android:textSize="18sp"
android:textSize="16sp"
android:fontFamily="sans-serif-medium"
tools:text="关于软件" />

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/layout_about_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@

<ImageView
android:id="@+id/icon"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_width="18dp"
android:layout_height="18dp"
android:layout_gravity="center"
android:contentDescription="@null"
tools:srcCompat="@drawable/ic_launcher_foreground" />
Expand Down
64 changes: 64 additions & 0 deletions app/src/main/res/layout/layout_contributor_card.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/contributors_card_margin_top"
android:clickable="false"
android:focusable="false"
app:cardBackgroundColor="@color/about_card_background"
app:cardCornerRadius="@dimen/contributors_card_corner_radius"
app:cardElevation="0dp"
app:strokeColor="@color/about_card_stroke"
app:strokeWidth="0.5dp">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="@dimen/contributors_card_padding"
android:paddingTop="@dimen/contributors_card_padding"
android:paddingEnd="@dimen/contributors_card_padding"
android:paddingBottom="@dimen/contributors_card_padding">

<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/avatar"
android:layout_width="@dimen/contributors_avatar_size"
android:layout_height="@dimen/contributors_avatar_size"
android:contentDescription="@null"
tools:src="@drawable/ic_avatar_placeholder" />

<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/contributors_avatar_text_margin_start"
android:layout_weight="1"
android:orientation="vertical">

<TextView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-medium"
android:textColor="@color/white"
android:textSize="@dimen/contributors_heading_text_size"
android:maxLines="1"
android:ellipsize="end"
tools:text="贡献者名称" />

<TextView
android:id="@+id/role"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:fontFamily="sans-serif-light"
android:textColor="@color/about_secondary_text"
android:textSize="@dimen/contributors_body_text_size"
android:maxLines="1"
android:ellipsize="end"
tools:text="贡献者角色" />
</LinearLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
24 changes: 24 additions & 0 deletions app/src/main/res/values-sw360dp/dimens_contributors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="contributors_screen_padding_horizontal">12dp</dimen>
<dimen name="contributors_screen_padding_vertical">16dp</dimen>
<dimen name="contributors_heading_text_size">16sp</dimen>
<dimen name="contributors_section_title_text_size">11sp</dimen>
<dimen name="contributors_body_text_size">10sp</dimen>
<dimen name="contributors_card_corner_radius">12dp</dimen>
<dimen name="contributors_card_padding">12dp</dimen>
<dimen name="contributors_card_margin_top">8dp</dimen>
<dimen name="contributors_section_margin_top">16dp</dimen>
<dimen name="contributors_subsection_margin_top">20dp</dimen>
<dimen name="contributors_list_margin_top">8dp</dimen>
<dimen name="contributors_avatar_size">48dp</dimen>
<dimen name="contributors_avatar_text_margin_start">12dp</dimen>
<dimen name="contributors_oss_avatar_size">40dp</dimen>
<dimen name="contributors_oss_item_padding">8dp</dimen>
<dimen name="contributors_footer_logo_size">36dp</dimen>
<dimen name="contributors_footer_padding">12dp</dimen>
<dimen name="contributors_footer_text_size">9sp</dimen>
<dimen name="contributors_open_source_title_text_size">12sp</dimen>
<dimen name="contributors_progress_margin_top">12dp</dimen>
<dimen name="contributors_progress_indicator_size">32dp</dimen>
</resources>
24 changes: 24 additions & 0 deletions app/src/main/res/values/dimens_contributors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="contributors_screen_padding_horizontal">8dp</dimen>
<dimen name="contributors_screen_padding_vertical">12dp</dimen>
<dimen name="contributors_heading_text_size">14sp</dimen>
<dimen name="contributors_section_title_text_size">10sp</dimen>
<dimen name="contributors_body_text_size">9sp</dimen>
<dimen name="contributors_card_corner_radius">10dp</dimen>
<dimen name="contributors_card_padding">8dp</dimen>
<dimen name="contributors_card_margin_top">6dp</dimen>
<dimen name="contributors_section_margin_top">12dp</dimen>
<dimen name="contributors_subsection_margin_top">14dp</dimen>
<dimen name="contributors_list_margin_top">6dp</dimen>
<dimen name="contributors_avatar_size">36dp</dimen>
<dimen name="contributors_avatar_text_margin_start">10dp</dimen>
<dimen name="contributors_oss_avatar_size">32dp</dimen>
<dimen name="contributors_oss_item_padding">5dp</dimen>
<dimen name="contributors_footer_logo_size">28dp</dimen>
<dimen name="contributors_footer_padding">8dp</dimen>
<dimen name="contributors_footer_text_size">7sp</dimen>
<dimen name="contributors_open_source_title_text_size">10sp</dimen>
<dimen name="contributors_progress_margin_top">8dp</dimen>
<dimen name="contributors_progress_indicator_size">24dp</dimen>
</resources>
11 changes: 11 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@
<string name="about_network_unavailable">无网络连接</string>
<string name="about_feature_placeholder">敬请期待</string>

<string name="contributors_page_title">贡献者</string>
<string name="contributors_core_section_title">核心开发成员</string>
<string name="contributors_core_role_major">大版本开发者</string>
<string name="contributors_core_role_ce_lead">CE主要开发者</string>
<string name="contributors_core_role_support">超级木桶饭</string>
<string name="contributors_art_team_title">特别感谢 Art Team 的美工们~</string>
<string name="contributors_art_team_members">卡比、许祁颢、DonG、侍冰、Wick、婉静自然、Oroxi、老瑜、苏柒、二贰猫</string>
<string name="contributors_footer_logo_desc">HaoduStudio 标志</string>
<string name="contributors_footer_attribution">本软件部分图标来源于 MUI / TDesign Icon</string>
<string name="contributors_footer_copyright">©HaoduStudio 2021 - %1$d</string>

<string name="please_write_one_note_at_least">请至少写一篇手帐</string>
<string name="update_complete">更新完成</string>

Expand Down
Loading