From 14835e58c552fe5a44ddac601de317d361e84561 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 17 Jul 2026 11:59:22 +0000 Subject: [PATCH 1/2] Flesh out the About screen with description and get-involved links Add a personal description of the project, plus dedicated cards linking to the GitHub repository (for contributors) and Transifex (for translators). The description sits above the two link sections, and everything is styled as frosted-glass cards to match the app's modern dialog look. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01MzQN7qXezLdBA2RKNhFrBo --- .../be/robinj/distrohopper/AboutActivity.java | 45 +++++++- .../res/drawable/about_card_background.xml | 10 ++ app/src/main/res/drawable/ic_about_github.xml | 10 ++ .../main/res/drawable/ic_about_translate.xml | 10 ++ app/src/main/res/layout/activity_about.xml | 101 ++++++++++++++++++ app/src/main/res/values/strings.xml | 7 ++ 6 files changed, 182 insertions(+), 1 deletion(-) create mode 100644 app/src/main/res/drawable/about_card_background.xml create mode 100644 app/src/main/res/drawable/ic_about_github.xml create mode 100644 app/src/main/res/drawable/ic_about_translate.xml diff --git a/app/src/main/java/be/robinj/distrohopper/AboutActivity.java b/app/src/main/java/be/robinj/distrohopper/AboutActivity.java index 397cc93f..bf26631e 100644 --- a/app/src/main/java/be/robinj/distrohopper/AboutActivity.java +++ b/app/src/main/java/be/robinj/distrohopper/AboutActivity.java @@ -1,8 +1,10 @@ package be.robinj.distrohopper; import android.content.Context; +import android.content.Intent; import android.content.pm.PackageInfo; import android.media.MediaPlayer; +import android.net.Uri; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; import android.text.Html; @@ -36,7 +38,34 @@ protected void onCreate (Bundle savedInstanceState) tvDevUrl.setMovementMethod (LinkMovementMethod.getInstance ()); tvDevEmail.setMovementMethod (LinkMovementMethod.getInstance ()); - + + View linkGithub = this.findViewById (R.id.linkGithub); + View linkTransifex = this.findViewById (R.id.linkTransifex); + + linkGithub.setOnClickListener + ( + new View.OnClickListener () + { + @Override + public void onClick (View view) + { + AboutActivity.this.openUrl (AboutActivity.this.getString (R.string.about_github_url)); + } + } + ); + + linkTransifex.setOnClickListener + ( + new View.OnClickListener () + { + @Override + public void onClick (View view) + { + AboutActivity.this.openUrl (AboutActivity.this.getString (R.string.about_transifex_url)); + } + } + ); + final Context context = this.getBaseContext (); ivLogo.setOnClickListener @@ -70,6 +99,20 @@ public void onClick (View view) } + private void openUrl (String url) + { + try + { + this.startActivity (new Intent (Intent.ACTION_VIEW, Uri.parse (url))); + } + catch (Exception ex) + { + ExceptionHandler exh = new ExceptionHandler (ex); + exh.show (this); + } + } + + @Override protected void onStart () { diff --git a/app/src/main/res/drawable/about_card_background.xml b/app/src/main/res/drawable/about_card_background.xml new file mode 100644 index 00000000..4ddbed57 --- /dev/null +++ b/app/src/main/res/drawable/about_card_background.xml @@ -0,0 +1,10 @@ + + + + + + + diff --git a/app/src/main/res/drawable/ic_about_github.xml b/app/src/main/res/drawable/ic_about_github.xml new file mode 100644 index 00000000..fcb0866b --- /dev/null +++ b/app/src/main/res/drawable/ic_about_github.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_about_translate.xml b/app/src/main/res/drawable/ic_about_translate.xml new file mode 100644 index 00000000..ad396408 --- /dev/null +++ b/app/src/main/res/drawable/ic_about_translate.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml index c73873f5..0d48eea2 100644 --- a/app/src/main/res/layout/activity_about.xml +++ b/app/src/main/res/layout/activity_about.xml @@ -112,6 +112,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1256b6b8..893f77fa 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -19,6 +19,13 @@ Themes Logs Developed by Robin Jacobs + I started DistroHopper back in high school as a (far too) young Linux enthusiast who wanted something resembling the Linux desktop on his first smartphone. I hope 15+ years later of on-and-off development you still enjoy what I started back then :-) + Contribute on GitHub + DistroHopper is open source — browse the code, report issues, or send a pull request. + Help translate + Speak another language? Help translate DistroHopper on Transifex. + https://github.com/RobinJ1995/DistroHopper + https://explore.transifex.com/distrohopper/ Back About Apply From 2f038cab003e3e08358ecb47b44244945417ee12 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 17 Jul 2026 13:12:20 +0000 Subject: [PATCH 2/2] Rewrite AboutActivity in Kotlin Convert AboutActivity from Java to Kotlin to match the rest of the codebase's ongoing migration, preserving all behaviour: version display, developer links, the logo easter egg, and the new GitHub/Transifex links. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01MzQN7qXezLdBA2RKNhFrBo --- .../be/robinj/distrohopper/AboutActivity.java | 127 ------------------ .../be/robinj/distrohopper/AboutActivity.kt | 72 ++++++++++ 2 files changed, 72 insertions(+), 127 deletions(-) delete mode 100644 app/src/main/java/be/robinj/distrohopper/AboutActivity.java create mode 100644 app/src/main/java/be/robinj/distrohopper/AboutActivity.kt diff --git a/app/src/main/java/be/robinj/distrohopper/AboutActivity.java b/app/src/main/java/be/robinj/distrohopper/AboutActivity.java deleted file mode 100644 index bf26631e..00000000 --- a/app/src/main/java/be/robinj/distrohopper/AboutActivity.java +++ /dev/null @@ -1,127 +0,0 @@ -package be.robinj.distrohopper; - -import android.content.Context; -import android.content.Intent; -import android.content.pm.PackageInfo; -import android.media.MediaPlayer; -import android.net.Uri; -import android.os.Bundle; -import androidx.appcompat.app.AppCompatActivity; -import android.text.Html; -import android.text.method.LinkMovementMethod; -import android.view.View; -import android.widget.ImageView; -import android.widget.TextView; - - -public class AboutActivity extends AppCompatActivity -{ - @Override - protected void onCreate (Bundle savedInstanceState) - { - super.onCreate (savedInstanceState); - setContentView (R.layout.activity_about); - InsetsHelper.applySystemBarsPadding (this); - - try - { - PackageInfo pkgInfo = this.getPackageManager ().getPackageInfo (this.getPackageName (), 0); - - TextView tvDevUrl = (TextView) this.findViewById (R.id.tvDevUrl); - TextView tvDevEmail = (TextView) this.findViewById (R.id.tvDevEmail); - TextView tvVersion = (TextView) this.findViewById (R.id.tvVersion); - ImageView ivLogo = (ImageView) this.findViewById (R.id.ivLogo); - - tvDevUrl.setText (Html.fromHtml ("RobinJ.be", Html.FROM_HTML_MODE_LEGACY)); - tvDevEmail.setText (Html.fromHtml ("distrohopper@robinj.be", Html.FROM_HTML_MODE_LEGACY)); - tvVersion.setText ("v" + pkgInfo.versionName); - - tvDevUrl.setMovementMethod (LinkMovementMethod.getInstance ()); - tvDevEmail.setMovementMethod (LinkMovementMethod.getInstance ()); - - View linkGithub = this.findViewById (R.id.linkGithub); - View linkTransifex = this.findViewById (R.id.linkTransifex); - - linkGithub.setOnClickListener - ( - new View.OnClickListener () - { - @Override - public void onClick (View view) - { - AboutActivity.this.openUrl (AboutActivity.this.getString (R.string.about_github_url)); - } - } - ); - - linkTransifex.setOnClickListener - ( - new View.OnClickListener () - { - @Override - public void onClick (View view) - { - AboutActivity.this.openUrl (AboutActivity.this.getString (R.string.about_transifex_url)); - } - } - ); - - final Context context = this.getBaseContext (); - - ivLogo.setOnClickListener - ( - new View.OnClickListener () - { - private short clicked = 0; - private MediaPlayer player; - - @Override - public void onClick (View view) - { - if (++this.clicked % 3 == 0) - { - if (this.player == null) - this.player = MediaPlayer.create (context, R.raw.ubuntu); - else - this.player.seekTo (0); - - player.start (); - } - } - } - ); - } - catch (Exception ex) - { - ExceptionHandler exh = new ExceptionHandler (ex); - exh.show (this); - } - } - - - private void openUrl (String url) - { - try - { - this.startActivity (new Intent (Intent.ACTION_VIEW, Uri.parse (url))); - } - catch (Exception ex) - { - ExceptionHandler exh = new ExceptionHandler (ex); - exh.show (this); - } - } - - - @Override - protected void onStart () - { - super.onStart (); - } - - @Override - protected void onStop () - { - super.onStop (); - } -} diff --git a/app/src/main/java/be/robinj/distrohopper/AboutActivity.kt b/app/src/main/java/be/robinj/distrohopper/AboutActivity.kt new file mode 100644 index 00000000..a7251f65 --- /dev/null +++ b/app/src/main/java/be/robinj/distrohopper/AboutActivity.kt @@ -0,0 +1,72 @@ +package be.robinj.distrohopper + +import android.content.Intent +import android.media.MediaPlayer +import android.net.Uri +import android.os.Bundle +import android.text.Html +import android.text.method.LinkMovementMethod +import android.view.View +import android.widget.ImageView +import android.widget.TextView +import androidx.appcompat.app.AppCompatActivity + +class AboutActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + this.setContentView(R.layout.activity_about) + InsetsHelper.applySystemBarsPadding(this) + + try { + val pkgInfo = this.packageManager.getPackageInfo(this.packageName, 0) + + val tvDevUrl = this.findViewById(R.id.tvDevUrl) + val tvDevEmail = this.findViewById(R.id.tvDevEmail) + val tvVersion = this.findViewById(R.id.tvVersion) + val ivLogo = this.findViewById(R.id.ivLogo) + + tvDevUrl.text = Html.fromHtml("RobinJ.be", Html.FROM_HTML_MODE_LEGACY) + tvDevEmail.text = Html.fromHtml("distrohopper@robinj.be", Html.FROM_HTML_MODE_LEGACY) + tvVersion.text = "v" + pkgInfo.versionName + + tvDevUrl.movementMethod = LinkMovementMethod.getInstance() + tvDevEmail.movementMethod = LinkMovementMethod.getInstance() + + this.findViewById(R.id.linkGithub).setOnClickListener { + this.openUrl(this.getString(R.string.about_github_url)) + } + this.findViewById(R.id.linkTransifex).setOnClickListener { + this.openUrl(this.getString(R.string.about_transifex_url)) + } + + val context = this.baseContext + + ivLogo.setOnClickListener(object : View.OnClickListener { + private var clicked = 0 + private var player: MediaPlayer? = null + + override fun onClick(view: View) { + if (++this.clicked % 3 == 0) { + val player = this.player + ?: MediaPlayer.create(context, R.raw.ubuntu).also { this.player = it } + + player.seekTo(0) + player.start() + } + } + }) + } catch (ex: Exception) { + val exh = ExceptionHandler(ex) + exh.show(this) + } + } + + private fun openUrl(url: String) { + try { + this.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url))) + } catch (ex: Exception) { + val exh = ExceptionHandler(ex) + exh.show(this) + } + } +}