From 2d4b308e393c8b0df64fe95f826d1a5f6ea7895b Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Thu, 11 Mar 2021 22:08:27 +0800 Subject: Add a WebView for those who do not have Chrome installed. --- app/src/main/AndroidManifest.xml | 8 +- .../infinityforreddit/AppComponent.java | 3 + .../activities/LinkResolverActivity.java | 14 +- .../activities/WebViewActivity.java | 173 +++++++++++++++++++++ app/src/main/res/layout/activity_login.xml | 3 +- app/src/main/res/layout/activity_web_view.xml | 32 ++++ app/src/main/res/menu/web_view_activity.xml | 15 ++ app/src/main/res/values-de/strings.xml | 1 - app/src/main/res/values-es/strings.xml | 1 - app/src/main/res/values-fr/strings.xml | 1 - app/src/main/res/values-hi/strings.xml | 1 - app/src/main/res/values-hr/strings.xml | 1 - app/src/main/res/values-it/strings.xml | 1 - app/src/main/res/values-ja/strings.xml | 1 - app/src/main/res/values-nl/strings.xml | 1 - app/src/main/res/values-pl/strings.xml | 1 - app/src/main/res/values-pt-rBR/strings.xml | 1 - app/src/main/res/values-tr-rTR/strings.xml | 1 - app/src/main/res/values-zh-rCN/strings.xml | 1 - app/src/main/res/values/strings.xml | 3 +- 20 files changed, 243 insertions(+), 20 deletions(-) create mode 100644 app/src/main/java/ml/docilealligator/infinityforreddit/activities/WebViewActivity.java create mode 100644 app/src/main/res/layout/activity_web_view.xml create mode 100644 app/src/main/res/menu/web_view_activity.xml (limited to 'app') diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index e93c9c10..29a65fea 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -32,7 +32,13 @@ android:theme="@style/AppTheme" android:usesCleartextTraffic="true" tools:replace="android:label"> - + + android:layout_height="match_parent" /> diff --git a/app/src/main/res/layout/activity_web_view.xml b/app/src/main/res/layout/activity_web_view.xml new file mode 100644 index 00000000..36fd3f06 --- /dev/null +++ b/app/src/main/res/layout/activity_web_view.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/menu/web_view_activity.xml b/app/src/main/res/menu/web_view_activity.xml new file mode 100644 index 00000000..ad064161 --- /dev/null +++ b/app/src/main/res/menu/web_view_activity.xml @@ -0,0 +1,15 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 3368e0bc..c405ace2 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -212,7 +212,6 @@ "Monat" "Jahr" "Gesamter Zeitraum" - "Kein Browser gefunden" "Es gibt keine App, die diese Teilen-Aktion unterstützt" "Archivierter Beitrag. Abstimmung nicht verfügbar." "Archivierter Beitrag. Kommentieren nicht verfügbar." diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index b9a5e7b9..8b3a7dc8 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -214,7 +214,6 @@ Toca para reintentar." "Mes" "Año" "Todo el tiempo" - "No se encontró un navegador" "No se encontró ninguna aplicación para compartir" "Publicación archivada. Votar no está disponible" "Publicación archivada. Comentar no está disponible " diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 87e351b7..f51f28cc 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -225,7 +225,6 @@ Appuyez pour réessayer." "Mois" "Année" "Tout le temps" - "Aucun navigatuer trouvé" "Il n'y a pas d'application qui peut gérer l'action de partage" diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml index 3353c3fe..f3ea32bd 100644 --- a/app/src/main/res/values-hi/strings.xml +++ b/app/src/main/res/values-hi/strings.xml @@ -234,7 +234,6 @@ Behavior --> "असामयिक" - "कोई ब्राउजर नहीं मिला" "कोई ऐसी एप्प उपलब्ध नहीं है जो साझा कर सके " "संग्रहित पोस्ट। वोट अनुपलब्ध।" "संग्रहित पोस्ट। टिप्पणी अनुपलब्ध।" diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index 306d9802..eaa6d80f 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -211,7 +211,6 @@ "Mjesec" "Godina" "Svo vrijeme" - "Preglednik nije pronađen" "Nema aplikacije koja može podijeliti ovo" "Arhivirana objava. Glasanje nedostupno." "Arhivirana objava. Komentiranje nedostupno." diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 59e82ed3..ee8edb6d 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -218,7 +218,6 @@ Clicca per riprovare." "Mese" "Anno" "Sempre" - "Nessun browser trovato" "Non esiste un'app in grado di gestire l'azione di condivisione" "Post archiviato. Non è possibile votare." "Post archiviato. Non è possibile commentare." diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 706ffd70..3644aafb 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -236,7 +236,6 @@ "1ヶ月" "1年" "全て" - "ブラウザが見つかりませんでした" "共有に使用できるアプリが見つかりませんでした" "アーカイブされた投稿です。評価は無効です。" "アーカイブされた投稿です。コメントは無効です。" diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 7a75292a..128e0f2e 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -205,7 +205,6 @@ Maand Jaar Aller Tijden - Geen browser gevonden Er is geen app die de deelactie aankan Gearchiveerd post. Stem niet beschikbaar. Gearchiveerd post. Opmerking niet beschikbaar. diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 4fe0ac4f..92837f0e 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -210,7 +210,6 @@ "Miesiąc" "Rok" "Od początku" - "Nie znaleziono przeglądarki" "Brak aplikacji zdolnej do udostępnienia" "Post zarchiwizowany. Nie można dać upvote." "Post zarchiwizowany. Nie można skomentować." diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 5aa3a923..2bf69360 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -213,7 +213,6 @@ Toque para tentar novamente." "Mês" "Ano" "Desde o começo" - "Nenhum navegador encontrado" "Não há nenhum app que possa realizar a ação compartilhada" "Post arquivado. Não é possível votar." "Post arquivado. Não é possível comentar." diff --git a/app/src/main/res/values-tr-rTR/strings.xml b/app/src/main/res/values-tr-rTR/strings.xml index a607773a..485d3d66 100644 --- a/app/src/main/res/values-tr-rTR/strings.xml +++ b/app/src/main/res/values-tr-rTR/strings.xml @@ -220,7 +220,6 @@ Tekrar denemek için tıklayın." "Ay" "Yıl" "Tüm Zamanlar" - "Tarayıcı bulunamadı" "Paylaşma eylemini gerçekleştirebilecek uygulama yok" "Arşivlenmiş gönderi. Oy kullanım dışı." "Arşivlenmiş gönderi. Yorum kullanım dışı." diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 85441699..3e85b7c7 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -218,7 +218,6 @@ "月" "年" "所有时间" - "未找到浏览器" "找不到共享的app" "帖子已存档,无法投票" "帖子已存档,无法评论" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 3295d811..6a5a6c85 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -79,6 +79,8 @@ Save to Database Read All Messages Add to Multireddit + Share Link + Copy Link Error occurred when parsing the JSON response Error Retrieving the token @@ -256,7 +258,6 @@ Year All Time - No browser found There is no app that can handle the share action Archived post. Vote unavailable. -- cgit v1.2.3