Skip to content

Commit

Permalink
add version to about
Browse files Browse the repository at this point in the history
  • Loading branch information
newhinton committed Apr 9, 2024
1 parent 37cbdf0 commit 9867cca
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ class AboutActivity : AppCompatActivity() {
binding.toolbar.title = "";
setSupportActionBar(binding.toolbar)

binding.version.text = BuildConfig.VERSION_NAME

binding.help.setOnClickListener {
openURL("https://github.com/newhinton/Timed-Silence/issues")
}


binding.donate.setOnClickListener {
openURL("https://github.com/sponsors/newhinton")
openURL("https://felixnuesse.de/donate")
}

binding.copyright.setOnClickListener {
Expand Down
31 changes: 24 additions & 7 deletions app/src/main/res/layout/activity_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,33 @@
app:layout_constraintTop_toBottomOf="@+id/toolbar"
app:srcCompat="@drawable/ic_launcher_foreground" />

<TextView
android:id="@+id/textView"
<LinearLayout
android:id="@+id/titleLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/toolbar"
app:layout_constraintTop_toBottomOf="@+id/imageView" />
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView">

<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textColor="?attr/colorOnBackground" />

<TextView
android:id="@+id/version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:alpha="0.5"
android:text="v0.0.0"
android:textColor="?attr/colorOnBackground"
android:textAppearance="@style/TextAppearance.AppCompat.Large" />
</LinearLayout>

<TextView
android:id="@+id/textView3"
Expand All @@ -49,7 +66,7 @@
android:text="@string/made_by"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView" />
app:layout_constraintTop_toBottomOf="@+id/titleLayout" />

<TextView
android:id="@+id/textView4"
Expand Down

0 comments on commit 9867cca

Please sign in to comment.