Skip to content

Commit

Permalink
show version in more
Browse files Browse the repository at this point in the history
  • Loading branch information
shadow578 committed Aug 8, 2021
1 parent ed6e0b1 commit 27f01dc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ class MoreFragment : BaseFragment() {
MoreViewModel::class.java
)

// show app version
b.appVersion.text = BuildConfig.VERSION_NAME

// about button
b.about.setOnClickListener { model.openAboutPage(requireActivity()) }

Expand Down
17 changes: 16 additions & 1 deletion app/src/main/res/layout/fragment_more.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,30 @@
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_splash_foreground" />

<!-- app version -->
<!-- app name -->
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/app_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textColor="?attr/colorOnSurface"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="@id/app_icon"
app:layout_constraintRight_toRightOf="@id/app_icon"
app:layout_constraintTop_toBottomOf="@id/app_icon" />

<!-- app version -->
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/app_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="12sp"
app:layout_constraintLeft_toLeftOf="@id/app_name"
app:layout_constraintRight_toRightOf="@id/app_name"
app:layout_constraintTop_toBottomOf="@id/app_name"
tools:text="1.0" />

<!-- options -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
Expand Down

0 comments on commit 27f01dc

Please sign in to comment.