[Android] Add a feedback link in the About screen
Nicolas Pomepuy
git at videolan.org
Fri May 17 16:09:24 CEST 2019
vlc-android | branch: master | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Fri Apr 26 11:06:15 2019 +0200| [1089035388c1e5271ecc2212cea4f9e9c8fa237d] | committer: Geoffrey Métais
Add a feedback link in the About screen
> https://code.videolan.org/videolan/vlc-android/commit/1089035388c1e5271ecc2212cea4f9e9c8fa237d
---
vlc-android/res/layout/about_main.xml | 10 ++++++++++
vlc-android/res/values/strings.xml | 4 +++-
vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.kt | 5 +++++
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/vlc-android/res/layout/about_main.xml b/vlc-android/res/layout/about_main.xml
index 1de68b830..ce124d33b 100644
--- a/vlc-android/res/layout/about_main.xml
+++ b/vlc-android/res/layout/about_main.xml
@@ -83,6 +83,16 @@
android:text="@string/about_link"
android:textSize="14sp" />
+ <TextView
+ android:id="@+id/feedback"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="15dp"
+ android:layout_weight="0.27"
+ android:gravity="center"
+ android:text="@string/feedback_link"
+ android:textSize="14sp" />
+
<TextView
android:id="@+id/main_revision"
android:layout_width="fill_parent"
diff --git a/vlc-android/res/values/strings.xml b/vlc-android/res/values/strings.xml
index b5d549ff3..067b8d636 100644
--- a/vlc-android/res/values/strings.xml
+++ b/vlc-android/res/values/strings.xml
@@ -257,10 +257,12 @@
<string name="about">About</string>
<string name="about_text">VLC for Android™ is a port of VLC media player, the popular open source media player. The Android™ version can read most files and network streams.</string>
<string name="about_link" translatable="false"> <a href="https://www.videolan.org/vlc/">https://www.videolan.org/vlc/</a></string>
- <string name="about_copyright" translatable="false">Copyleft © 1996–2018 by VideoLAN.\n</string>
<string name="authors" translatable="false">Edward Wang, Sébastien Toque, Adrien Maglo, Jean-Baptiste Kempf, Ludovic Fauvet, Rafaël Carré, Alexandre Perraud, Michael Merg, Martin Storsjö, Rémi Duraffort, Dominique Martinet, Jean-Philippe André, Felix Abecassis, Christoph Miebach, Hugo Beauzée-Luyssen, Felix Paul Kühne, John Mooring, Pavol Rusnak, Rohit Yadav, Tanguy Pruvot, Thomas Clavier, Asad Mehmood, Garret Kelly, Philipp Dreimann, Walter Heck, Thomas Guillem, Geoffrey Métais, Habib Kazemi, Nicolas Pomepuy</string>
+ <string name="feedback_link" translatable="false"><a href="https://forum.videolan.org/viewforum.php?f=35">%s</a></string>
+ <string name="about_copyright" translatable="false">Copyleft © 1996–2019 by VideoLAN.\n</string>
<string name="vlc_authors">and VLC Authors.</string>
<string name="compiled_by">This version of VLC is compiled by:</string>
+ <string name="feedback_forum">Feedback forum</string>
<!-- Preferences -->
<string name="preferences">Settings</string>
diff --git a/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.kt b/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.kt
index 20aa18347..d1b60692d 100644
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.kt
@@ -41,6 +41,7 @@ import android.os.Looper
import android.renderscript.*
import android.text.Html
import android.text.TextUtils
+import android.text.method.LinkMovementMethod
import android.view.*
import android.view.animation.Animation
import android.view.animation.AnimationSet
@@ -205,6 +206,10 @@ object UiTools {
val link = v.findViewById<TextView>(R.id.main_link)
link.text = Html.fromHtml(v.context.getString(R.string.about_link))
+ val feedback : TextView= v.findViewById(R.id.feedback)
+ feedback.text = Html.fromHtml(v.getContext().getString(R.string.feedback_link, v.getContext().getString(R.string.feedback_forum)));
+ feedback.movementMethod = LinkMovementMethod.getInstance();
+
val revision = v.context.getString(R.string.build_revision) + " VLC: " + v.context.getString(R.string.build_vlc_revision)
val builddate = v.context.getString(R.string.build_time)
val builder = v.context.getString(R.string.build_host)
More information about the Android
mailing list