diff --git a/ultrasonic/src/main/assets/html/de/index.html b/ultrasonic/src/main/assets/html/de/index.html deleted file mode 100644 index cba4bb7a..00000000 --- a/ultrasonic/src/main/assets/html/de/index.html +++ /dev/null @@ -1,48 +0,0 @@ - - - About Ultrasonic - - - - - - -

Ultrasonic

- -

- Mit Ultrasonic können Sie mit dem Subsonic Media Streamer ganz einfach Musik von Ihrem Heimcomputer auf Ihr Android-Handy streamen oder - herunterladen. Die Subsonic-Server-Software erfordert eine zusätzliche, von Ultrasonic getrennte Konfiguration. Für weitere Informationen oder - zur Installation der Subsonic-Server-Software auf Ihrem Computer besuchen Sie bitte subsonic.org. Die Basisversion - von Subsonic ist kostenlos. Wenn Sie Subsonic zum ersten Mal installieren, sind die Premium-Funktionen 30 Tage lang verfügbar, so dass Sie sie - ausprobieren können, bevor Sie sich für ein Upgrade entscheiden. Klicken Sie hier, um - ein Upgrade auf Subsonic Premium durchzuführen. -

- -

- Standardmäßig ist Ultrasonic nicht konfiguriert. Wenn Sie Ihren eigenen Server eingerichtet haben, gehen Sie bitte zu Einstellungen und - ändern Sie die Konfiguration so, dass er mit Ihrem eigenen Computer verbunden wird. -

- -

- -

- -

- Wenn Sie mit Ultrasonic zufrieden sind, klicken Sie bitte auf "Spenden", um die weitere Entwicklung zu unterstützen. Diese Spende ist von der - Subsonic-Server-Software getrennt und gewährt Ihnen keinen Zugang zu den Premium-Funktionen von Subsonic. -

- -
- - - - -
- -

- Um Feature-Anfragen oder Fehlerberichte einzureichen, besuchen Sie bitte das Ultrasonic für Android Forum. - Der Quellcode von Ultrasonic ist unter github.com verfügbar und unter den Bedingungen der GNU General Public License Version 3 (GPLv3) lizenziert. -

- - - diff --git a/ultrasonic/src/main/assets/html/en/index.html b/ultrasonic/src/main/assets/html/en/index.html deleted file mode 100644 index 8680d88b..00000000 --- a/ultrasonic/src/main/assets/html/en/index.html +++ /dev/null @@ -1,52 +0,0 @@ - - - About Ultrasonic - - - - -

Ultrasonic

- -

- With Ultrasonic you can easily stream or download music from your - home computer to your Android phone using the Subsonic media streamer. - The Subsonic server software requires additional configuration separate - from Ultrasonic. For more information or to install the Subsonic server - software on your computer, please visit - subsonic.org. The basic version of - Subsonic is free. When you first install Subsonic, the premium features - are available for 30 days so you can try them out before deciding to - upgrade. Click - here to upgrade - to Subsonic Premium. -

- -

- By default, Ultrasonic is not configured. Once you've set up your own - server, please go to Settings and change the configuration so - that it connects to your own computer. -

- -

- If you are pleased with Ultrasonic, please click "Donate" to help - further development. This donation is separate from the Subsonic server - software and does not grant you access to the premium features of - Subsonic. -

- -
- - - - -
- -

- To submit feature requests or file bug reports, please visit the - Ultrasonic for Android - forum. - Source code for Ultrasonic is available at - github.com. -

- - diff --git a/ultrasonic/src/main/assets/html/fr/index.html b/ultrasonic/src/main/assets/html/fr/index.html deleted file mode 100644 index b786767d..00000000 --- a/ultrasonic/src/main/assets/html/fr/index.html +++ /dev/null @@ -1,61 +0,0 @@ - - - Aide de Ultrasonic - - - - - - -

Bienvenue dans Ultrasonic

- -

- Avec Ultrasonic, vous pouvez facilement écouter ou télécharger de la musique à partir de votre ordinateur personnel sur votre appareil Android - (et bien d'autres choses sont possibles). -

- -

- Pour installer le serveur Subsonic sur votre ordinateur, visitez subsonic.org. - Celui-ci est disponible pour Windows, Mac, Linux et Unix. -

- -

- Par défaut, cette application n'est pas configurée. Après avoir configuré votre - serveur personnel, veuillez accéder aux Paramètres et modifier la configuration afin de vous connecter à votre propre ordinateur ou vos appareils mobiles. -

- -

- Vous pouvez utiliser cette application gratuitement pendant 30 jours. - Ensuite, vous devrez effectuer un don au projet Subsonic. - En tant que donateur, vous obtiendrez les bénéfices suivants: -

- - -

- Le montant suggéré pour le don est de 20€, mais n'importe quel montant est traité et accepté. -

- -

- Cliquez sur le bouton suivants pour accéder à PayPal, d'où vous pourrez payer soit par carte de crédit, soit en utilisant votre compte PayPal. - Une fois le don reçu et traité, vous recevrez votre clé d'activation par e-mail. -

- -
- - - - -
- -

- Pour plus d'information, veuiller visitez subsonic.org. Le code source de Ultrasonic est disponible à l'adresse suivante : github.com. -

- - - diff --git a/ultrasonic/src/main/assets/html/img/paypal.png b/ultrasonic/src/main/assets/html/img/paypal.png deleted file mode 100644 index 65632937..00000000 Binary files a/ultrasonic/src/main/assets/html/img/paypal.png and /dev/null differ diff --git a/ultrasonic/src/main/assets/html/img/ultrasonic.png b/ultrasonic/src/main/assets/html/img/ultrasonic.png deleted file mode 100644 index 77218d6c..00000000 Binary files a/ultrasonic/src/main/assets/html/img/ultrasonic.png and /dev/null differ diff --git a/ultrasonic/src/main/assets/html/style.css b/ultrasonic/src/main/assets/html/style.css deleted file mode 100644 index 9c1d55f2..00000000 --- a/ultrasonic/src/main/assets/html/style.css +++ /dev/null @@ -1,11 +0,0 @@ -/* -* Taken from http://yui.yahooapis.com/2.8.0r4/build/fonts/fonts.css -*/ -body { - font: 13px / 1.231 arial, helvetica, clean, sans-serif; -} - -table { - font-size:inherit; - font:100%; -} \ No newline at end of file diff --git a/ultrasonic/src/main/java/org/moire/ultrasonic/fragment/AboutFragment.java b/ultrasonic/src/main/java/org/moire/ultrasonic/fragment/AboutFragment.java deleted file mode 100644 index dd8d735d..00000000 --- a/ultrasonic/src/main/java/org/moire/ultrasonic/fragment/AboutFragment.java +++ /dev/null @@ -1,149 +0,0 @@ -package org.moire.ultrasonic.fragment; - -import android.graphics.Bitmap; -import android.os.Bundle; -import android.view.KeyEvent; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.webkit.WebView; -import android.webkit.WebViewClient; -import android.widget.Button; -import android.widget.ImageView; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.fragment.app.Fragment; -import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; - -import org.jetbrains.annotations.NotNull; -import org.moire.ultrasonic.R; -import org.moire.ultrasonic.util.Util; - -/** - * Displays online help and about information in a WebView - */ -public class AboutFragment extends Fragment { - - private WebView webView; - private ImageView backButton; - private ImageView forwardButton; - private SwipeRefreshLayout swipeRefresh; - - @Override - public void onCreate(@Nullable Bundle savedInstanceState) { - Util.applyTheme(this.getContext()); - super.onCreate(savedInstanceState); - } - - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - return inflater.inflate(R.layout.help, container, false); - } - - @Override - public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { - - swipeRefresh = view.findViewById(R.id.help_refresh); - swipeRefresh.setEnabled(false); - - webView = view.findViewById(R.id.help_contents); - webView.getSettings().setJavaScriptEnabled(true); - webView.setWebViewClient(new HelpClient()); - - if (savedInstanceState != null) - { - webView.restoreState(savedInstanceState); - } - else - { - webView.loadUrl(getResources().getString(R.string.help_url)); - } - - backButton = view.findViewById(R.id.help_back); - backButton.setOnClickListener(new Button.OnClickListener() - { - @Override - public void onClick(View view) - { - webView.goBack(); - } - }); - - ImageView stopButton = view.findViewById(R.id.help_stop); - stopButton.setOnClickListener(new Button.OnClickListener() - { - @Override - public void onClick(View view) - { - webView.stopLoading(); - swipeRefresh.setRefreshing(false); - } - }); - - forwardButton = view.findViewById(R.id.help_forward); - forwardButton.setOnClickListener(new Button.OnClickListener() - { - @Override - public void onClick(View view) - { - webView.goForward(); - } - }); - - // TODO: Nicer Back key handling? - webView.setFocusableInTouchMode(true); - webView.requestFocus(); - webView.setOnKeyListener( new View.OnKeyListener() - { - @Override - public boolean onKey( View v, int keyCode, KeyEvent event ) - { - if (keyCode == KeyEvent.KEYCODE_BACK) - { - if (webView.canGoBack()) - { - webView.goBack(); - return true; - } - } - return false; - } - } ); - } - - @Override - public void onSaveInstanceState(@NotNull Bundle state) - { - webView.saveState(state); - super.onSaveInstanceState(state); - } - - private final class HelpClient extends WebViewClient - { - @Override - public void onPageStarted(WebView view, String url, Bitmap favicon) { - swipeRefresh.setRefreshing(true); - super.onPageStarted(view, url, favicon); - } - - @Override - public void onPageFinished(WebView view, String url) - { - swipeRefresh.setRefreshing(false); - String versionName = Util.getVersionName(getContext()); - String title = String.format("%s (%s)", view.getTitle(), versionName); - - FragmentTitle.Companion.setTitle(AboutFragment.this, title); - - backButton.setEnabled(view.canGoBack()); - forwardButton.setEnabled(view.canGoForward()); - } - - @Override - public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) - { - Util.toast(getContext(), description); - } - } -} diff --git a/ultrasonic/src/main/kotlin/org/moire/ultrasonic/fragment/AboutFragment.kt b/ultrasonic/src/main/kotlin/org/moire/ultrasonic/fragment/AboutFragment.kt new file mode 100644 index 00000000..4408c941 --- /dev/null +++ b/ultrasonic/src/main/kotlin/org/moire/ultrasonic/fragment/AboutFragment.kt @@ -0,0 +1,74 @@ +/* + * AboutFragment.kt + * Copyright (C) 2009-2021 Ultrasonic developers + * + * Distributed under terms of the GNU GPLv3 license. + */ + +package org.moire.ultrasonic.fragment + +import android.content.Intent +import android.net.Uri +import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import android.widget.Button +import android.widget.TextView +import androidx.fragment.app.Fragment +import java.util.Locale +import org.moire.ultrasonic.R +import org.moire.ultrasonic.fragment.FragmentTitle.Companion.setTitle +import org.moire.ultrasonic.util.Util.applyTheme +import org.moire.ultrasonic.util.Util.getVersionName + +/** + * Displays the About page + */ +class AboutFragment : Fragment() { + private var titleText: TextView? = null + private var webPageButton: Button? = null + private var reportBugButton: Button? = null + + override fun onCreate(savedInstanceState: Bundle?) { + applyTheme(this.context) + super.onCreate(savedInstanceState) + } + + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + return inflater.inflate(R.layout.help, container, false) + } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + titleText = view.findViewById(R.id.help_title) + webPageButton = view.findViewById(R.id.help_webpage) + reportBugButton = view.findViewById(R.id.help_report) + + val versionName = getVersionName(requireContext()) + val title = String.format( + Locale.getDefault(), + "%s (%s)", + getString(R.string.common_appname), + versionName + ) + + setTitle(this@AboutFragment, title) + titleText?.text = title + + webPageButton?.setOnClickListener { + startActivity( + Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.about_webpage_url))) + ) + } + + reportBugButton?.setOnClickListener { + startActivity( + Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.about_report_url))) + ) + } + } +} diff --git a/ultrasonic/src/main/res/layout/help.xml b/ultrasonic/src/main/res/layout/help.xml index b06b9b00..56084a0a 100644 --- a/ultrasonic/src/main/res/layout/help.xml +++ b/ultrasonic/src/main/res/layout/help.xml @@ -1,46 +1,47 @@ + a:layout_width="fill_parent" + a:layout_height="fill_parent"> - + - - - + - - - +