Skip to content

Commit

Permalink
Add library version to about screen
Browse files Browse the repository at this point in the history
Fixes #1448
  • Loading branch information
pyricau committed Jul 11, 2019
1 parent eded1c9 commit 3d26bbb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import android.widget.ListView
import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.core.text.HtmlCompat
import com.squareup.leakcanary.core.BuildConfig
import com.squareup.leakcanary.core.R
import leakcanary.internal.activity.LeakActivity
import leakcanary.internal.activity.db.LeakingInstanceTable
Expand Down Expand Up @@ -37,11 +38,11 @@ internal class GroupListScreen : Screen() {
true
}

menu.add(R.string.leak_canary_about_title)
menu.add(R.string.leak_canary_about_menu)
.setOnMenuItemClickListener {
val dialog = AlertDialog.Builder(context)
.setIcon(ContextCompat.getDrawable(context, R.drawable.leak_canary_icon))
.setTitle(R.string.leak_canary_about_title)
.setTitle(resources.getString(R.string.leak_canary_about_title, BuildConfig.LIBRARY_VERSION))
.setMessage(
HtmlCompat.fromHtml(
resources.getString(R.string.leak_canary_about_message),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
~ limitations under the License.
-->
<resources>
<string name="leak_canary_about_title">About LeakCanary</string>
<string name="leak_canary_about_title">About LeakCanary %s</string>
<string name="leak_canary_about_message"><![CDATA[<a href="https://github.com/square/leakcanary">LeakCanary</a>
ist eine Memory-Leak-Detection Bibliothek für Android, erstellt von
<a href="https://twitter.com/Piwai">Pierre-Yves Ricau</a> und open-sourced von <a href="https://square.github.io">Square</a>.<br><br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
~ limitations under the License.
-->
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
<string name="leak_canary_about_title">About LeakCanary</string>
<string name="leak_canary_about_menu">About LeakCanary</string>
<string name="leak_canary_about_title">About LeakCanary %s</string>
<string name="leak_canary_about_message"><![CDATA[<a href="https://github.com/square/leakcanary">LeakCanary</a>
is a memory leak detection library for Android, created by
<a href="https://twitter.com/Piwai">Pierre-Yves Ricau</a> and open sourced by <a href="https://square.github.io">Square</a>.<br><br>
Expand Down

0 comments on commit 3d26bbb

Please sign in to comment.