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
81 changes: 37 additions & 44 deletions app/src/main/res/layout/activity_about_software.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
android:layout_height="0dp"
android:clipToPadding="false"
android:fillViewport="true"
android:paddingStart="24dp"
android:paddingTop="32dp"
android:paddingEnd="24dp"
android:paddingBottom="32dp"
android:paddingStart="12dp"
android:paddingTop="16dp"
android:paddingEnd="12dp"
android:paddingBottom="16dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -30,23 +30,23 @@

<TextView
android:id="@+id/about_title"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/about"
android:textColor="@color/white"
android:textSize="26sp"
android:textSize="18sp"
android:fontFamily="sans-serif-medium"
tools:text="关于软件" />

<com.google.android.material.card.MaterialCardView
android:id="@+id/bannerCard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:layout_marginTop="12dp"
android:clickable="false"
android:focusable="false"
app:cardBackgroundColor="@android:color/transparent"
app:cardCornerRadius="24dp"
app:cardCornerRadius="16dp"
app:cardUseCompatPadding="false"
app:strokeColor="@color/about_card_stroke"
app:strokeWidth="1dp">
Expand All @@ -67,7 +67,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintDimensionRatio="280:158"
app:layout_constraintDimensionRatio="16:9"
tools:srcCompat="@drawable/about_banner" />

<View
Expand All @@ -85,50 +85,53 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:paddingBottom="20dp"
android:padding="10dp"
app:layout_constraintBottom_toBottomOf="@id/bannerImage"
app:layout_constraintStart_toStartOf="@id/bannerImage"
app:layout_constraintEnd_toEndOf="@id/bannerImage">

<TextView
android:id="@+id/bannerTitle"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/about_banner_title"
android:textColor="@color/white"
android:textSize="22sp"
android:textSize="16sp"
android:fontFamily="sans-serif-medium"
android:maxLines="1"
android:ellipsize="end"
tools:text="DailyNotes" />

<TextView
android:id="@+id/bannerSubtitle"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginTop="2dp"
android:text="@string/about_banner_subtitle"
android:textColor="@color/about_secondary_text"
android:textSize="14sp"
android:textSize="11sp"
android:fontFamily="sans-serif-light"
android:maxLines="1"
android:ellipsize="end"
tools:text="Community Edition" />
</LinearLayout>

<TextView
android:id="@+id/bannerBadge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:layout_margin="8dp"
android:background="@drawable/bg_about_badge"
android:fontFamily="sans-serif-medium"
android:paddingStart="12dp"
android:paddingTop="6dp"
android:paddingEnd="12dp"
android:paddingBottom="6dp"
android:paddingStart="8dp"
android:paddingTop="4dp"
android:paddingEnd="8dp"
android:paddingBottom="4dp"
android:text="@string/about_codename_label"
android:textColor="@color/white"
android:textSize="12sp"
android:textSize="10sp"
android:maxLines="1"
android:ellipsize="end"
app:layout_constraintEnd_toEndOf="@id/bannerImage"
app:layout_constraintTop_toTopOf="@id/bannerImage"
tools:text="代号:Isla" />
Expand All @@ -139,60 +142,50 @@
android:id="@+id/about_quote_line1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:text="正因为会失去,所以才要去珍惜"
android:textAlignment="center"
android:textColor="@color/about_secondary_text"
android:textSize="14sp"
android:fontFamily="sans-serif" />

<TextView
android:id="@+id/about_quote_line2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:gravity="center"
android:text="希望你能好好利用本软件"
android:textAlignment="center"
android:textColor="@color/about_secondary_text"
android:textSize="14sp"
android:fontFamily="sans-serif" />
android:textSize="8sp"
android:fontFamily="sans-serif"
android:maxLines="1"
android:ellipsize="end" />

<include
android:id="@+id/cardSoftwareVersion"
layout="@layout/layout_about_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp" />
android:layout_marginTop="8dp" />

<include
android:id="@+id/cardContributors"
layout="@layout/layout_about_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp" />
android:layout_marginTop="8dp" />

<include
android:id="@+id/cardRepository"
layout="@layout/layout_about_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp" />
android:layout_marginTop="8dp" />

<include
android:id="@+id/cardPolicy"
layout="@layout/layout_about_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp" />
android:layout_marginTop="8dp" />

<include
android:id="@+id/cardPrivacy"
layout="@layout/layout_about_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp" />
android:layout_marginTop="8dp" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
36 changes: 20 additions & 16 deletions app/src/main/res/layout/layout_about_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
app:cardBackgroundColor="@color/about_card_background"
app:cardCornerRadius="20dp"
app:cardCornerRadius="12dp"
app:cardElevation="0dp"
app:strokeColor="@color/about_card_stroke"
app:strokeWidth="0.5dp">
Expand All @@ -18,20 +18,20 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:paddingStart="20dp"
android:paddingTop="18dp"
android:paddingEnd="20dp"
android:paddingBottom="18dp">
android:paddingStart="10dp"
android:paddingTop="10dp"
android:paddingEnd="10dp"
android:paddingBottom="10dp">

<FrameLayout
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_width="32dp"
android:layout_height="32dp"
android:background="@drawable/bg_about_icon_container">

<ImageView
android:id="@+id/icon"
android:layout_width="33dp"
android:layout_height="33dp"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center"
android:contentDescription="@null"
tools:srcCompat="@drawable/ic_launcher_foreground" />
Expand All @@ -40,27 +40,31 @@
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginStart="8dp"
android:layout_weight="1"
android:orientation="vertical">

<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-medium"
android:textColor="@color/white"
android:textSize="16sp"
android:textSize="12sp"
android:maxLines="1"
android:ellipsize="end"
tools:text="主标题" />

<TextView
android:id="@+id/subtitle"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:fontFamily="sans-serif-thin"
android:layout_marginTop="2dp"
android:fontFamily="sans-serif-light"
android:textColor="@color/about_secondary_text"
android:textSize="14sp"
android:textSize="9sp"
android:maxLines="2"
android:ellipsize="end"
tools:text="副文本" />
</LinearLayout>

Expand Down
9 changes: 9 additions & 0 deletions app/src/main/res/values-sw360dp/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- About Page Banner Dimensions for screens >= 360dp width -->
<dimen name="banner_content_padding">22dp</dimen>
<dimen name="banner_badge_margin">18dp</dimen>
<dimen name="banner_badge_padding_horizontal">14dp</dimen>
<dimen name="banner_badge_padding_vertical">7dp</dimen>
<dimen name="banner_badge_text_size">13sp</dimen>
</resources>
9 changes: 9 additions & 0 deletions app/src/main/res/values-sw600dp/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- About Page Banner Dimensions for tablets >= 600dp width -->
<dimen name="banner_content_padding">28dp</dimen>
<dimen name="banner_badge_margin">24dp</dimen>
<dimen name="banner_badge_padding_horizontal">18dp</dimen>
<dimen name="banner_badge_padding_vertical">9dp</dimen>
<dimen name="banner_badge_text_size">15sp</dimen>
</resources>
9 changes: 9 additions & 0 deletions app/src/main/res/values-sw720dp/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- About Page Banner Dimensions for large tablets >= 720dp width -->
<dimen name="banner_content_padding">32dp</dimen>
<dimen name="banner_badge_margin">28dp</dimen>
<dimen name="banner_badge_padding_horizontal">20dp</dimen>
<dimen name="banner_badge_padding_vertical">10dp</dimen>
<dimen name="banner_badge_text_size">16sp</dimen>
</resources>
9 changes: 9 additions & 0 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- About Page Banner Dimensions - Optimized for Square Watch (320x360) -->
<dimen name="banner_content_padding">10dp</dimen>
<dimen name="banner_badge_margin">8dp</dimen>
<dimen name="banner_badge_padding_horizontal">8dp</dimen>
<dimen name="banner_badge_padding_vertical">4dp</dimen>
<dimen name="banner_badge_text_size">10sp</dimen>
</resources>
7 changes: 3 additions & 4 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,18 @@
<string name="about_banner_title">DailyNotes</string>
<string name="about_banner_subtitle">Community Edition</string>
<string name="about_codename_label">代号:Isla</string>
<string name="about_quote">正因为会失去,所以才要去珍惜
希望你能好好利用本软件</string>
<string name="about_quote">正因为会失去,所以才要去珍惜</string>
<string name="about_section_version_title">软件版本</string>
<string name="about_section_version_placeholder">v—</string>
<string name="about_section_version_subtitle">v%1$s</string>
<string name="about_section_version_desc">软件版本卡片</string>
<string name="about_section_contributors_title">贡献者</string>
<string name="about_section_contributors_subtitle">原作者/开发者/美工们</string>
<string name="about_section_contributors_subtitle">开发者/美工们</string>
<string name="about_section_contributors_desc">贡献者卡片</string>
<string name="about_section_repo_title">开源仓库</string>
<string name="about_section_repo_subtitle">在 Github 上查看</string>
<string name="about_section_repo_desc">开源仓库卡片</string>
<string name="about_section_policy_title">EULA与隐私协议</string>
<string name="about_section_policy_title">政策</string>
<string name="about_section_policy_subtitle">阅读协议全文</string>
<string name="about_section_policy_desc">EULA与隐私协议卡片</string>
<string name="about_section_privacy_title">隐私设置</string>
Expand Down
Loading