remove the About activity

This commit is contained in:
tibbi 2017-03-10 22:54:53 +01:00
parent c9de559fac
commit 6497dd1a16
14 changed files with 16 additions and 357 deletions

View file

@ -19,7 +19,7 @@
</activity>
<activity
android:name=".activities.AboutActivity"
android:name="com.simplemobiletools.commons.activities.AboutActivity"
android:label="@string/about"
android:parentActivityName=".activities.MainActivity"/>

View file

@ -1,101 +0,0 @@
package com.simplemobiletools.filemanager.activities
import android.content.ActivityNotFoundException
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.text.Html
import android.text.method.LinkMovementMethod
import android.view.View
import com.simplemobiletools.filemanager.BuildConfig
import com.simplemobiletools.filemanager.R
import com.simplemobiletools.filemanager.extensions.config
import kotlinx.android.synthetic.main.activity_about.*
import java.util.*
class AboutActivity : SimpleActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_about)
setupEmail()
setupCopyright()
setupRateUs()
setupInvite()
setupLicense()
setupFacebook()
setupGPlus()
}
private fun setupEmail() {
val email = getString(R.string.email)
val appName = getString(R.string.app_name)
val href = "<a href=\"mailto:$email?subject=$appName\">$email</a>"
about_email.text = Html.fromHtml(href)
about_email.movementMethod = LinkMovementMethod.getInstance()
}
private fun setupCopyright() {
val versionName = BuildConfig.VERSION_NAME
val year = Calendar.getInstance().get(Calendar.YEAR)
val copyrightText = String.format(getString(R.string.copyright), versionName, year)
about_copyright.text = copyrightText
}
private fun setupRateUs() {
if (config.isFirstRun) {
about_rate_us.visibility = View.GONE
} else {
about_rate_us.setOnClickListener {
val uri = Uri.parse("market://details?id=$packageName")
try {
startActivity(Intent(Intent.ACTION_VIEW, uri))
} catch (ignored: ActivityNotFoundException) {
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(getStoreUrl())))
}
}
}
}
fun setupInvite() {
about_invite.setOnClickListener {
val text = String.format(getString(R.string.share_text), getString(R.string.app_name), getStoreUrl())
Intent().apply {
action = Intent.ACTION_SEND
putExtra(Intent.EXTRA_SUBJECT, getString(R.string.app_name))
putExtra(Intent.EXTRA_TEXT, text)
type = "text/plain"
startActivity(Intent.createChooser(this, getString(R.string.invite_via)))
}
}
}
fun setupLicense() {
about_license.setOnClickListener {
val intent = Intent(applicationContext, LicenseActivity::class.java)
startActivity(intent)
}
}
fun setupFacebook() {
about_facebook.setOnClickListener {
var link = "https://www.facebook.com/simplemobiletools"
try {
packageManager.getPackageInfo("com.facebook.katana", 0)
link = "fb://page/150270895341774"
} catch (ignored: Exception) {
}
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(link)))
}
}
fun setupGPlus() {
about_gplus.setOnClickListener {
val link = "https://plus.google.com/communities/104880861558693868382"
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(link)))
}
}
private fun getStoreUrl() = "https://play.google.com/store/apps/details?id=$packageName"
}

View file

@ -13,8 +13,11 @@ import com.simplemobiletools.commons.extensions.getInternalStoragePath
import com.simplemobiletools.commons.extensions.hasWriteStoragePermission
import com.simplemobiletools.commons.extensions.storeStoragePaths
import com.simplemobiletools.commons.extensions.toast
import com.simplemobiletools.commons.helpers.LICENSE_KOTLIN
import com.simplemobiletools.commons.helpers.LICENSE_MULTISELECT
import com.simplemobiletools.commons.models.FileDirItem
import com.simplemobiletools.commons.views.Breadcrumbs
import com.simplemobiletools.filemanager.BuildConfig
import com.simplemobiletools.filemanager.PATH
import com.simplemobiletools.filemanager.R
import com.simplemobiletools.filemanager.SCROLL_STATE
@ -85,17 +88,16 @@ class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Br
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {
return when (item.itemId) {
R.id.settings -> {
startActivity(Intent(applicationContext, SettingsActivity::class.java))
true
}
R.id.about -> {
startActivity(Intent(applicationContext, AboutActivity::class.java))
true
}
else -> super.onOptionsItemSelected(item)
when (item.itemId) {
R.id.settings -> startActivity(Intent(this, SettingsActivity::class.java))
R.id.about -> launchAbout()
else -> return super.onOptionsItemSelected(item)
}
return true
}
fun launchAbout() {
startAboutActivity(R.string.app_name, LICENSE_KOTLIN or LICENSE_MULTISELECT, BuildConfig.VERSION_NAME)
}
/*override fun onBackPressed() {

View file

@ -1,105 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
android:id="@+id/about_scrollview"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<RelativeLayout
android:id="@+id/about_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/activity_margin"
android:paddingLeft="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin">
<TextView
android:id="@+id/about_website"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autoLink="web"
android:text="@string/website"/>
<TextView
android:id="@+id/about_email_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/about_website"
android:layout_marginTop="@dimen/activity_margin"
android:text="@string/email_label"/>
<TextView
android:id="@+id/about_email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/about_email_label"
android:paddingBottom="@dimen/activity_margin"
android:text="@string/email"/>
<TextView
android:id="@+id/about_invite"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/about_email"
android:paddingBottom="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin"
android:text="@string/invite_friends_underlined"
android:textColor="@color/colorPrimary"/>
<TextView
android:id="@+id/about_rate_us"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/about_invite"
android:paddingBottom="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin"
android:text="@string/rate_us_underlined"
android:textColor="@color/colorPrimary"/>
<TextView
android:id="@+id/about_license"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/about_rate_us"
android:paddingBottom="@dimen/activity_margin"
android:paddingTop="@dimen/activity_margin"
android:text="@string/third_party_licences_underlined"
android:textColor="@color/colorPrimary"/>
<TextView
android:id="@+id/about_follow_us"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/about_license"
android:paddingBottom="@dimen/social_padding"
android:paddingTop="@dimen/activity_margin"
android:text="@string/follow_us"/>
<ImageView
android:id="@+id/about_facebook"
android:layout_width="@dimen/social_logo"
android:layout_height="@dimen/social_logo"
android:layout_below="@+id/about_follow_us"
android:src="@mipmap/facebook"/>
<ImageView
android:id="@+id/about_gplus"
android:layout_width="@dimen/social_logo"
android:layout_height="@dimen/social_logo"
android:layout_below="@+id/about_follow_us"
android:layout_marginLeft="@dimen/social_padding"
android:layout_toRightOf="@+id/about_facebook"
android:src="@mipmap/gplus"/>
<TextView
android:id="@+id/about_copyright"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_below="@+id/about_gplus"
android:gravity="center_horizontal|bottom"
android:paddingTop="@dimen/activity_margin"
android:text="v1.0\nCopyright © Simple Mobile Tools 2016"/>
</RelativeLayout>
</ScrollView>

View file

@ -59,18 +59,6 @@
<string name="add_to_favorites">Add to favorites</string>
<string name="remove_from_favorites">Remove from favorites</string>
<!-- About -->
<string name="about">Über</string>
<string name="website">Weitere einfache Apps, sowie Quellcode findest du auf:\nhttp://simplemobiletools.com</string>
<string name="email_label">Sende Feedback oder Vorschläge an:</string>
<string name="third_party_licences_underlined"><u>Drittanbieter Lizenzen</u></string>
<string name="invite_friends_underlined"><u>Lade Freunde ein</u></string>
<string name="share_text">Hey, wirf mal einen Blick auf %1$s unter %2$s</string>
<string name="invite_via">Einladen per</string>
<string name="rate_us_underlined"><u>Bewerte uns im Play Store</u></string>
<string name="follow_us">Folge uns:</string>
<string name="copyright">v %1$s\nCopyright © Simple Mobile Tools %2$d</string>
<!-- Settings -->
<string name="settings">Einstellungen</string>
<string name="dark_theme">Dunkles Design</string>
@ -99,7 +87,5 @@
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/library/src/main/res
https://github.com/SimpleMobileTools/Simple-File-Picker/tree/master/library/src/main/res
https://github.com/SimpleMobileTools/Simple-File-Properties/tree/master/library/src/main/res
-->
</resources>

View file

@ -59,18 +59,6 @@
<string name="add_to_favorites">Add to favorites</string>
<string name="remove_from_favorites">Remove from favorites</string>
<!-- About -->
<string name="about">Acerca de Simple File Manager</string>
<string name="website">Más aplicaciones simples y su código fuente en:\nhttp://simplemobiletools.com</string>
<string name="email_label">Envíe sus comentarios y sugerencias a:</string>
<string name="third_party_licences_underlined"><u>Licencias de terceros</u></string>
<string name="invite_friends_underlined"><u>Invitar a amigos</u></string>
<string name="share_text">Hola, venga y échele un vistazo a %1$s en %2$s</string>
<string name="invite_via">Invitar vía</string>
<string name="rate_us_underlined"><u>Evalúenos en Google Play Store</u></string>
<string name="follow_us">Síganos:</string>
<string name="copyright">v %1$s\nCopyright © Simple Mobile Tools %2$d</string>
<!-- Settings -->
<string name="settings">Opciones</string>
<string name="dark_theme">Tema oscuro</string>
@ -99,7 +87,5 @@
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/library/src/main/res
https://github.com/SimpleMobileTools/Simple-File-Picker/tree/master/library/src/main/res
https://github.com/SimpleMobileTools/Simple-File-Properties/tree/master/library/src/main/res
-->
</resources>

View file

@ -54,24 +54,12 @@
<item quantity="other">%1$d éléments</item>
</plurals>
<!-- Favoris -->
<!-- Favorites -->
<string name="favorites">Favoris</string>
<string name="add_to_favorites">Ajouter aux favoris</string>
<string name="remove_from_favorites">Enlever des favoris</string>
<!-- À propos -->
<string name="about">À propos</string>
<string name="website">Plus d\'apps simples et le code source à :\nhttp://simplemobiletools.com</string>
<string name="email_label">Envoyez des retours et suggestions à :</string>
<string name="third_party_licences_underlined"><u>Licences tierces</u></string>
<string name="invite_friends_underlined"><u>Inviter des amis</u></string>
<string name="share_text">Hey, come check out %1$s at %2$s</string>
<string name="invite_via">Inviter via</string>
<string name="rate_us_underlined"><u>Notez nous sur le Play Store</u></string>
<string name="follow_us">Suivez nous :</string>
<string name="copyright">v %1$s\nCopyright © Simple Mobile Tools %2$d</string>
<!-- Paramètres -->
<!-- Settings -->
<string name="settings">Paramètres</string>
<string name="dark_theme">Thème sombre</string>
<string name="show_hidden">Montrer les fichiers et dossiers cachés</string>
@ -99,7 +87,5 @@
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/library/src/main/res
https://github.com/SimpleMobileTools/Simple-File-Picker/tree/master/library/src/main/res
https://github.com/SimpleMobileTools/Simple-File-Properties/tree/master/library/src/main/res
-->
</resources>

View file

@ -59,18 +59,6 @@
<string name="add_to_favorites">Add to favorites</string>
<string name="remove_from_favorites">Remove from favorites</string>
<!-- About -->
<string name="about">Informazioni</string>
<string name="website">Altre semplici app e codici sorgenti in:\nhttp://simplemobiletools.com</string>
<string name="email_label">Invia la tua opinione o i tuoi suggerimenti a:</string>
<string name="third_party_licences_underlined"><u>Licenze di terze parti</u></string>
<string name="invite_friends_underlined"><u>Invita amici</u></string>
<string name="share_text">Hey, dai un\'occhiata a %1$s su %2$s</string>
<string name="invite_via">Invita via</string>
<string name="rate_us_underlined"><u>Dacci un voto sul Play Store</u></string>
<string name="follow_us">Seguici:</string>
<string name="copyright">v %1$s\nCopyright © Simple Mobile Tools %2$d</string>
<!-- Settings -->
<string name="settings">Impostazioni</string>
<string name="dark_theme">Tema scuro</string>
@ -99,7 +87,5 @@
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/library/src/main/res
https://github.com/SimpleMobileTools/Simple-File-Picker/tree/master/library/src/main/res
https://github.com/SimpleMobileTools/Simple-File-Properties/tree/master/library/src/main/res
-->
</resources>

View file

@ -59,18 +59,6 @@
<string name="add_to_favorites">Add to favorites</string>
<string name="remove_from_favorites">Remove from favorites</string>
<!-- About -->
<string name="about">アプリについて</string>
<string name="website">もっとシンプルなアプリとソースコードは:\nhttp://simplemobiletools.com</string>
<string name="email_label">ご意見やご提案をお送りください:</string>
<string name="third_party_licences_underlined"><u>サードパーティー ライセンス</u></string>
<string name="invite_friends_underlined"><u>友達を招待</u></string>
<string name="share_text">%2$s で %1$s を確認してください</string>
<string name="invite_via">招待...</string>
<string name="rate_us_underlined"><u>Play ストアで評価してください</u></string>
<string name="follow_us">フォローしてください:</string>
<string name="copyright">v %1$s\nCopyright © Simple Mobile Tools %2$d</string>
<!-- Settings -->
<string name="settings">設定</string>
<string name="dark_theme">ダークテーマ</string>
@ -99,7 +87,5 @@
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/library/src/main/res
https://github.com/SimpleMobileTools/Simple-File-Picker/tree/master/library/src/main/res
https://github.com/SimpleMobileTools/Simple-File-Properties/tree/master/library/src/main/res
-->
</resources>

View file

@ -59,18 +59,6 @@
<string name="add_to_favorites">Adicionar aos favoritos</string>
<string name="remove_from_favorites">Remover dos favoritos</string>
<!-- About -->
<string name="about">Acerca</string>
<string name="website">Mais aplicações Simple e código fonte em:\nhttp://simplemobiletools.com</string>
<string name="email_label">Envie os seus comentários ou sugestões para:</string>
<string name="third_party_licences_underlined"><u>Licenças de terceiros</u></string>
<string name="invite_friends_underlined"><u>Convidar amigos</u></string>
<string name="share_text">Olá, experimenta %1$s em %2$s</string>
<string name="invite_via">Convidar via</string>
<string name="rate_us_underlined"><u>Avalie-nos na Play Store</u></string>
<string name="follow_us">Siga-nos:</string>
<string name="copyright">V %1$s\nCopyright © Simple Mobile Tools %2$d</string>
<!-- Settings -->
<string name="settings">Definições</string>
<string name="dark_theme">Tema escuro</string>
@ -97,9 +85,7 @@
</string>
<!--
Não encontrou todas as cadeias a traduzir? Existem mais algumas em:
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/library/src/main/res
https://github.com/SimpleMobileTools/Simple-File-Picker/tree/master/library/src/main/res
https://github.com/SimpleMobileTools/Simple-File-Properties/tree/master/library/src/main/res
-->
</resources>

View file

@ -59,18 +59,6 @@
<string name="add_to_favorites">Добавить в избранное</string>
<string name="remove_from_favorites">Убрать из избранного</string>
<!-- About -->
<string name="about">О приложении</string>
<string name="website">Исходный код можно найти по адресу:\nhttp://simplemobiletools.com</string>
<string name="email_label">Отправить отзывы или предложения:</string>
<string name="third_party_licences_underlined"><u>Лицензии третьих сторон</u></string>
<string name="invite_friends_underlined"><u>Предложить другу</u></string>
<string name="share_text">Попробуй %1$s по ссылке %2$s</string>
<string name="invite_via">Предложить с помощью</string>
<string name="rate_us_underlined"><u>Оценить нас в Google Play</u></string>
<string name="follow_us">Подписаться на нас:</string>
<string name="copyright">v %1$s\nCopyright © Simple Mobile Tools %2$d</string>
<!-- Settings -->
<string name="settings">Настройки</string>
<string name="dark_theme">Темная тема</string>
@ -99,7 +87,5 @@
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/library/src/main/res
https://github.com/SimpleMobileTools/Simple-File-Picker/tree/master/library/src/main/res
https://github.com/SimpleMobileTools/Simple-File-Properties/tree/master/library/src/main/res
-->
</resources>

View file

@ -59,18 +59,6 @@
<string name="add_to_favorites">Lägg till favoriter</string>
<string name="remove_from_favorites">Ta bort från favoriter</string>
<!-- About -->
<string name="about">Om</string>
<string name="website">Fler enkla appar och källkod här:\nhttp://simplemobiletools.com</string>
<string name="email_label">Skicka feedback och förslag till:</string>
<string name="third_party_licences_underlined"><u>Tredjepartslicenser</u></string>
<string name="invite_friends_underlined"><u>Bjud in vänner</u></string>
<string name="share_text">Hej, ta en titt på %1$s på %2$s</string>
<string name="invite_via">Bjud in via</string>
<string name="rate_us_underlined"><u>Betygsätt oss i Play Butiken</u></string>
<string name="follow_us">Följ oss:</string>
<string name="copyright">v %1$s\nCopyright © Simple Mobile Tools %2$d</string>
<!-- Settings -->
<string name="settings">Inställningar</string>
<string name="dark_theme">Mörkt tema</string>
@ -99,7 +87,5 @@
<!--
Haven't found some strings? There's more at
https://github.com/SimpleMobileTools/Simple-Commons/tree/master/library/src/main/res
https://github.com/SimpleMobileTools/Simple-File-Picker/tree/master/library/src/main/res
https://github.com/SimpleMobileTools/Simple-File-Properties/tree/master/library/src/main/res
-->
</resources>

View file

@ -59,18 +59,6 @@
<string name="add_to_favorites">Favorilere ekle</string>
<string name="remove_from_favorites">Favorilerden kaldır</string>
<!-- About -->
<string name="about">Hakkında</string>
<string name="website">Daha basit uygulamalar ve kaynak kodu:\nhttp://simplemobiletools.com</string>
<string name="email_label">Görüşlerinizi veya önerilerinizi şu adrese gönderin:</string>
<string name="third_party_licences_underlined"><u>Üçüncü taraf lisansları</u></string>
<string name="invite_friends_underlined"><u>Arkadaşlarını davet et</u></string>
<string name="share_text">Kontrol et %1$s at %2$s</string>
<string name="invite_via">Üzerinden davet et</string>
<string name="rate_us_underlined"><u>Play Store\'da oy verin</u></string>
<string name="follow_us">Bizi takip et:</string>
<string name="copyright">v %1$s\nTelif Hakkı © Basit Mobil Araçlar %2$d</string>
<!-- Settings -->
<string name="settings">Ayarlar</string>
<string name="dark_theme">Koyu tema</string>

View file

@ -59,19 +59,6 @@
<string name="add_to_favorites">Add to favorites</string>
<string name="remove_from_favorites">Remove from favorites</string>
<!-- About -->
<string name="about">About</string>
<string name="website">More simple apps and source code at:\nhttp://simplemobiletools.com</string>
<string name="email_label">Send your feedback or suggestions to:</string>
<string name="email" translatable="false">hello@simplemobiletools.com</string>
<string name="third_party_licences_underlined"><u>Third party licences</u></string>
<string name="invite_friends_underlined"><u>Invite friends</u></string>
<string name="share_text">Hey, come check out %1$s at %2$s</string>
<string name="invite_via">Invite via</string>
<string name="rate_us_underlined"><u>Rate us in the Play Store</u></string>
<string name="follow_us">Follow us:</string>
<string name="copyright">v %1$s\nCopyright © Simple Mobile Tools %2$d</string>
<!-- Settings -->
<string name="settings">Settings</string>
<string name="dark_theme">Dark theme</string>