Permalink
Browse files

Text & settings changes

  • Loading branch information...
1 parent d214c36 commit 4d595af8f8c905626392b5326cde20b699f01f20 @hpique hpique committed Apr 13, 2012
View
6 res/values-de/strings.xml
@@ -88,10 +88,10 @@
<string name="category_memory_title">Speicher</string>
<string name="preference_load_last_title">Laden des letzten Comic</string>
<string name="preference_load_last_summary">Laden des zuletzt gesehenen Comics beim Start</string>
- <string name="preference_acv_listing_summary">Öffnen der Droid Comic Viewer Liste auf dem Android Market</string>
+ <string name="preference_acv_listing_summary">Öffnen der ACV Liste auf dem Google Play</string>
<string name="category_about_title">Über</string>
<string name="preference_version_title">Version</string>
- <string name="preference_version_summary">Droid Comic Viewer v</string>
+ <string name="preference_version_summary">ACV v</string>
<string name="preference_site_title">Internetseite</string>
- <string name="preference_site_summary">Öffnen der Robot Comics Internetseite im Browser</string>
+ <string name="preference_site_summary">Öffnen der Robot Media Internetseite im Browser</string>
</resources>
View
14 res/values-es/strings.xml
@@ -124,15 +124,15 @@
<string name="preference_low_memory_summary">Deshabilitar precarga y transiciones</string>
<string name="preference_manual_title">Manual de usuario</string>
<string name="preference_manual_summary">Abrir el manual de usuario en el navegador</string>
- <string name="preference_acv_listing_title">Ficha en Android Market</string>
- <string name="preference_acv_listing_summary">Abrir la ficha de Droid Comic Viewer en el Android Market</string>
+ <string name="preference_acv_listing_title">Ficha en Google Play</string>
+ <string name="preference_acv_listing_summary">Abrir la ficha de ACV en Google Play</string>
<string name="category_about_title">Acerca de</string>
<string name="preference_version_title">Versión</string>
- <string name="preference_version_summary">Droid Comic Viewer v</string>
+ <string name="preference_version_summary">ACV v</string>
<string name="preference_contact_title">Contacto</string>
- <string name="preference_contact_summary">Enviar un email a Robot Comics</string>
+ <string name="preference_contact_summary">Enviar un email a Robot Media</string>
<string name="preference_site_title">Sitio web</string>
- <string name="preference_site_summary">Abrir el sitio web de Robot Comics en el navegador</string>
+ <string name="preference_site_summary">Abrir el sitio web de Robot Media en el navegador</string>
<string name="preference_subscribe_summary">Recibe noticias sobre ACV y futuros lanzamientos</string>
<string name="category_acv_format_title">Ficheros ACV</string>
<string name="preference_acv_frames_title">Cuadros</string>
@@ -154,7 +154,7 @@
<!-- Share -->
<string name="share_app_title">Lee cómics en tu Android!</string>
- <string name="share_app_message">Prueba Droid Comic Viewer, el mejor visor de comics y manga para Android http://bit.ly/3dlKI5</string>
+ <string name="share_app_message">Prueba ACV, el mejor visor de comics y manga para Android http://goo.gl/FfAWL5</string>
<string name="share_screen_title">Pantalla de @comic</string>
- <string name="share_screen_message">Mira esta pantalla de @comic enviada desde Droid Comic Viewer http://bit.ly/3dlKI5</string>
+ <string name="share_screen_message">Mira esta pantalla de @comic enviada desde ACV http://goo.gl/FfAWL5</string>
</resources>
View
8 res/values-fr/strings.xml
@@ -117,11 +117,11 @@
<string name='preference_acv_listing_title'>Fiche sur le market Android</string>
<string name='preference_acv_listing_summary'>Ouvrir la fiche d\'ACV sur le market</string>
<string name='preference_version_title'>Version</string>
-<string name='preference_version_summary'>Droid Comic Viewer v</string>
+<string name='preference_version_summary'>ACV v</string>
<string name='preference_contact_title'>Contacter</string>
-<string name='preference_contact_summary'>Envoyer un message à Robot Comics</string>
+<string name='preference_contact_summary'>Envoyer un message à Robot Media</string>
<string name='preference_site_title'>Site web</string>
-<string name='preference_site_summary'>Ouvrir le site de Robot Comics dans le navigateur par défaut</string>
+<string name='preference_site_summary'>Ouvrir le site de Robot Media dans le navigateur par défaut</string>
<string name='preference_subscribe_summary'>Recevoir les nouveautés sur ACV et les sorties de BD mobiles.</string>
<string name='category_acv_format_title'>Format ACV</string>
<string name='preference_acv_frames_title'>Cases</string>
@@ -139,7 +139,7 @@
<string name='dialog_email_error_title'>Adresse mail invalide</string>
<string name='dialog_email_error_text'>Veuillez entrer une adresse valide.</string>
<string name='share_app_title'>Lisez des BD sur votre système Android!</string>
-<string name='share_app_message'>Découvrez Droid Comic Viewer, le lecteur #1 de bandes-dessinées et de manga sur Android http://bit.ly/3dlKI5</string>
+<string name='share_app_message'>Découvrez ACV, le lecteur #1 de bandes-dessinées et de manga sur Android http://goo.gl/FfAWL5</string>
<string name='share_screen_title'>Page tirée de @comic</string>
<string name='share_screen_message'>Lis cette page grâce à @comic</string>
</resources>
View
14 res/values-it/strings.xml
@@ -114,14 +114,14 @@
<string name='preference_manual_title'>Manuale utente</string>
<string name='preference_manual_summary'>Apre il manuale utente nel browser</string>
<string name='category_about_title'>Informazioni</string>
-<string name='preference_acv_listing_title'>Pagina Android Market</string>
-<string name='preference_acv_listing_summary'>Apri la pagina di Droid Comic Viewer su Android Market</string>
+<string name='preference_acv_listing_title'>Pagina Google Play</string>
+<string name='preference_acv_listing_summary'>Apri la pagina di ACV su Google Play</string>
<string name='preference_version_title'>Versione</string>
-<string name='preference_version_summary'>Droid Comic Viewer v</string>
+<string name='preference_version_summary'>ACV v</string>
<string name='preference_contact_title'>Contatti</string>
-<string name='preference_contact_summary'>Invia una email a Robot Comics</string>
+<string name='preference_contact_summary'>Invia una email a Robot Media</string>
<string name='preference_site_title'>Sito web</string>
-<string name='preference_site_summary'>Apre il sito di Robot Comics nel browser</string>
+<string name='preference_site_summary'>Apre il sito di Robot Media nel browser</string>
<string name='preference_subscribe_summary'>Ricevi notizie riguardo ACV e future pubblicazioni</string>
<string name='category_acv_format_title'>Formato ACV</string>
<string name='preference_acv_frames_title'>Fotogrammi</string>
@@ -139,7 +139,7 @@
<string name='dialog_email_error_title'>Email non valida</string>
<string name='dialog_email_error_text'>Per favore inserisci un indirizzo email valido.</string>
<string name='share_app_title'>Leggi i fumetti sul tuo Android!</string>
-<string name='share_app_message'>Prova Droid Comic Viewer, il lettore di fumetti e manga #1 per Android http://bit.ly/3dlKI5</string>
+<string name='share_app_message'>Prova ACV, il lettore di fumetti e manga #1 per Android http://goo.gl/FfAWL5</string>
<string name='share_screen_title'>Schermata da @comic</string>
-<string name='share_screen_message'>Guarda questa schermata di @comic, inviata da Droid Comic Viewer http://bit.ly/3dlKI5</string>
+<string name='share_screen_message'>Guarda questa schermata di @comic, inviata da ACV http://goo.gl/FfAWL5</string>
</resources>
View
14 res/values-pl/strings.xml
@@ -133,14 +133,14 @@
<string name='preference_manual_title'>Podręcznik użytkownika</string>
<string name='preference_manual_summary'>Otwórz podręcznik użytkownika w domyślnej przeglądarce</string>
<string name='category_about_title'>O programie</string>
-<string name='preference_acv_listing_title'>Opis w Android Market</string>
-<string name='preference_acv_listing_summary'>Otwórz opis Droid Comic Viewer w witrynie Android Market</string>
+<string name='preference_acv_listing_title'>Opis w Google Play</string>
+<string name='preference_acv_listing_summary'>Otwórz opis ACV w witrynie Google Play</string>
<string name='preference_version_title'>Wersja</string>
-<string name='preference_version_summary'>Droid Comic Viewer wersja</string>
+<string name='preference_version_summary'>ACV wersja</string>
<string name='preference_contact_title'>Kontakt</string>
-<string name='preference_contact_summary'>Wyślij e-maila do Robot Comics</string>
+<string name='preference_contact_summary'>Wyślij e-maila do Robot Media</string>
<string name='preference_site_title'>Strona domowa</string>
-<string name='preference_site_summary'>Otwórz stronę domową Robot Comics w domyślnej przeglądarce</string>
+<string name='preference_site_summary'>Otwórz stronę domową Robot Media w domyślnej przeglądarce</string>
<string name='preference_subscribe_summary'>Otrzymuj wiadomości o ACV i nowych komiksach na telefon</string>
<string name='category_acv_format_title'>Format ACV</string>
<string name='preference_acv_frames_title'>Klatki</string>
@@ -158,7 +158,7 @@
<string name='dialog_email_error_title'>Niepoprawny adres e-mail.</string>
<string name='dialog_email_error_text'>Wpisz poprawny adres e-mail.</string>
<string name='share_app_title'>Czytaj komiksy w systemie Android!</string>
-<string name='share_app_message'>Wypróbuj Droid Comic Viewer, najpopularniejszą aplikację komiksową dla Androida http://bit.ly/3dlKI5</string>
+<string name='share_app_message'>Wypróbuj ACV, najpopularniejszą aplikację komiksową dla Androida http://goo.gl/FfAWL5</string>
<string name='share_screen_title'>Ekran z @comic</string>
-<string name='share_screen_message'>Obejrzyj ten ekran z @comic wysłany za pośrednictwem Droid Comic Viewer http://bit.ly/3dlKI5</string>
+<string name='share_screen_message'>Obejrzyj ten ekran z @comic wysłany za pośrednictwem ACV http://goo.gl/FfAWL5</string>
</resources>
View
14 res/values-pt/strings.xml
@@ -116,14 +116,14 @@
<string name='preference_manual_title'>Manual do usuário</string>
<string name='preference_manual_summary'>Abre o manual do usuário no navegador</string>
<string name='category_about_title'>Sobre</string>
-<string name='preference_acv_listing_title'>Detalhes no Android Market</string>
-<string name='preference_acv_listing_summary'>Abre os detalhes do Droid Comic Viewer no Android Market</string>
+<string name='preference_acv_listing_title'>Detalhes no Google Play</string>
+<string name='preference_acv_listing_summary'>Abre os detalhes do ACV no Google Play</string>
<string name='preference_version_title'>Versão</string>
-<string name='preference_version_summary'>Droid Comic Viewer v</string>
+<string name='preference_version_summary'>ACV v</string>
<string name='preference_contact_title'>Contato</string>
-<string name='preference_contact_summary'>Enviar email para Robot Comics</string>
+<string name='preference_contact_summary'>Enviar email para Robot Media</string>
<string name='preference_site_title'>Site da web</string>
-<string name='preference_site_summary'>Abre o site do Robot Comics no navegador</string>
+<string name='preference_site_summary'>Abre o site do Robot Media no navegador</string>
<string name='preference_subscribe_summary'>Receber notícias sobre o ACV e lançamentos de comics</string>
<string name='category_acv_format_title'>Formato ACV</string>
<string name='preference_acv_frames_title'>Quadros</string>
@@ -141,7 +141,7 @@
<string name='dialog_email_error_title'>Email inválido</string>
<string name='dialog_email_error_text'>Por favor digite um endereço de email válido.</string>
<string name='share_app_title'>Leia comics no seu Android!</string>
-<string name='share_app_message'>Dê uma olhada no Droid Comic Viewer, o #1 leitor de comics e mangá para Android http://bit.ly/3dlKI</string>
+<string name='share_app_message'>Dê uma olhada no ACV, o #1 leitor de comics e mangá para Android http://goo.gl/FfAWL</string>
<string name='share_screen_title'>Tela do @comic</string>
-<string name='share_screen_message'>Dê uma olhada nesta tela do @comic enviada através do Droid Comic Viewer http://bit.ly/3dlKI5</string>
+<string name='share_screen_message'>Dê uma olhada nesta tela do @comic enviada através do ACV http://goo.gl/FfAWL5</string>
</resources>
View
5 res/values/config.xml
@@ -18,7 +18,6 @@
<string name="app_name">ACV</string>
<string name="credits"><b>Lead developer</b>\nHermes Pique\n\n<b>Additional development</b>\nGuillermo Lechuga\n\n<b>High-res launcher icon</b>\nblunden\n\n<b>SD browser icons</b>\nMark James (famfamfam)\n\n<b>Beta testing</b>\nTorX (2)\nTran Lan (2)\nThomas Nixon (2)\nMichael Charlton (1)\n\n<b>Translation</b>\nDavide Borin (Italian)\nClimbatize (French)\nMichał \'Vesper\' Dziewoński (Polish)\nFelippe Montez (Portuguese)</string>
<string name="acv_uri">market://search?q=pname:net.androidcomics.acv</string>
- <string name="site_url">http://www.robotcomics.net/?utm_source=android&amp;utm_medium=site_link&amp;utm_campaign=acv</string>
- <string name="contact_uri">mailto:contact@robotcomics.net</string>
- <string name="manual_uri">http://www.robotcomics.net/android-comic-viewer/user-manual/?utm_source=android&amp;utm_medium=user_manual_link&amp;utm_campaign=acv</string>
+ <string name="site_url">http://www.robotmedia.net/?utm_source=android&amp;utm_medium=site_link&amp;utm_campaign=acv</string>
+ <string name="contact_uri">mailto:acv@robotmedia.net</string>
</resources>
View
41 res/values/strings.xml
@@ -51,9 +51,9 @@
<string name="dialog_no_sd_title">Warning</string>
<string name="dialog_no_sd_text">No SD card was found.\n\nPlease insert or mount your SD card to open comics.</string>
- <string name="dialog_page_progress_title">Loading...</string>
- <string name="dialog_page_progress_text">Loading screen @number. Please wait...</string>
- <string name="dialog_loading_progress_title">Loading...</string>
+ <string name="dialog_page_progress_title">Loading&#8230;</string>
+ <string name="dialog_page_progress_text">Loading screen @number. Please wait&#8230;</string>
+ <string name="dialog_loading_progress_title">Loading&#8230;</string>
<string name="dialog_loading_progress_text">Loading comic archive from SD card.</string>
<string name="dialog_load_error_title">Oops!</string>
<string name="dialog_load_error_text">An error has occurred while loading. If you need help, please contact support@androidcomics.net.</string>
@@ -113,39 +113,20 @@
<string name="preference_default_brightness">Default brightness</string>
<string name="category_memory_title">History</string>
- <string name="preference_load_last_title">Load last comic</string>
- <string name="preference_load_last_summary">Load last viewed comic on startup</string>
<string name="preference_clear_history_title">Clear history</string>
<string name="preference_clear_history_summary">Clear all viewing history</string>
- <string name="category_support_title">Support</string>
<string name="preference_low_memory_title">Low memory mode</string>
<string name="preference_low_memory_summary">Disable preloading and transitions</string>
- <string name="preference_manual_title">User manual</string>
- <string name="preference_manual_summary">Open the user manual in the Browser</string>
- <string name="preference_report_problem_title">Report problem</string>
- <string name="preference_report_problem_summary">Report a problem through Bug Reporter</string>
-
- <string name="dialog_bug_reporter_title"><b>Bug Reporter</b> required</string>
- <string name="dialog_bug_reporter_text">This feature requires the <b>Bug Reporter</b> app.\n\nOpen the Market to install it?</string>
-
+
<string name="category_about_title">About</string>
- <string name="preference_acv_listing_title">Android Market listing</string>
- <string name="preference_acv_listing_summary">Open Droid Comic Viewer listing on the Android Market</string>
+ <string name="preference_acv_listing_title">Google Play listing</string>
+ <string name="preference_acv_listing_summary">Open ACV listing on Google Play</string>
<string name="preference_version_title">Version</string>
- <string name="preference_version_summary">Droid Comic Viewer v</string>
+ <string name="preference_version_summary">ACV v</string>
<string name="preference_contact_title">Contact</string>
- <string name="preference_contact_summary">Email Robot Comics</string>
- <string name="preference_site_title">Website</string>
- <string name="preference_site_summary">Open Robot Comics\' website in the Browser</string>
- <string name="preference_subscribe_summary">Receive news about ACV and mobile comics releases</string>
- <string name="category_acv_format_title">ACV format</string>
- <string name="preference_acv_frames_title">Frames</string>
- <string name="preference_acv_frames_summary">Frame by frame navigation</string>
- <string name="preference_acv_vibration_title">Vibration</string>
- <string name="preference_acv_vibration_summary">Vibration and screen tilt effects</string>
- <string name="preference_acv_autoplay_title">Autoplay</string>
- <string name="preference_acv_autoplay_summary">Enable autoplay sequences</string>
+ <string name="preference_contact_summary">Email Robot Media</string>
+ <string name="preference_subscribe_summary">Receive news about ACV</string>
<!-- Advanced preferences -->
<string name="category_advanced_title">Advanced</string>
@@ -168,9 +149,9 @@
<!-- Share -->
<string name="share_app_title">Read comics in your Android!</string>
- <string name="share_app_message">Check out Droid Comic Viewer, the #1 comics and manga reader for Android http://bit.ly/3dlKI5</string>
+ <string name="share_app_message">Check out ACV, the #1 comics and manga reader for Android http://goo.gl/FfAWL</string>
<string name="share_screen_title">Screen from @comic</string>
- <string name="share_screen_message">Check out this screen from @comic sent from Droid Comic Viewer http://bit.ly/3dlKI5</string>
+ <string name="share_screen_message">Check out this screen from @comic sent from ACV http://goo.gl/FfAWL</string>
<!-- Changelog -->
<string name="dialog_changelog_title">Changelog</string>
View
18 res/xml/about_settings.xml
@@ -16,22 +16,20 @@
-->
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
- <PreferenceScreen android:title="@string/preference_acv_listing_title"
+ <Preference android:key="subscribe" android:title="@string/activity_subscribe_label"
+ android:summary="@string/preference_subscribe_summary">
+ </Preference>
+ <PreferenceScreen android:title="@string/preference_acv_listing_title"
android:summary="@string/preference_acv_listing_summary">
<intent android:action="android.intent.action.VIEW"
android:data="@string/acv_uri" />
</PreferenceScreen>
- <PreferenceScreen android:title="@string/preference_site_title"
- android:summary="@string/preference_site_summary">
+ <PreferenceScreen android:title="@string/preference_contact_title"
+ android:summary="@string/preference_contact_summary">
<intent android:action="android.intent.action.VIEW"
- android:data="@string/site_url" />
+ android:data="@string/contact_uri" />
</PreferenceScreen>
- <Preference android:key="version" android:title="@string/preference_version_title"
+ <Preference android:key="version" android:title="@string/preference_version_title"
android:summary="@string/preference_version_summary">
</Preference>
- <Preference android:key="credits" android:title="@string/activity_credits_label">
- <intent android:action="android.intent.action.MAIN"
- android:targetPackage="net.androidcomics.acv"
- android:targetClass="net.robotmedia.acv.ui.CreditsActivity" />
- </Preference>
</PreferenceScreen>
View
5 res/xml/preferences.xml
@@ -38,11 +38,6 @@
android:targetClass="net.robotmedia.acv.ui.settings.AdvancedSettingsActivity" />
</net.robotmedia.acv.ui.settings.IconPreferenceScreen>
<net.robotmedia.acv.ui.settings.IconPreferenceScreen
- android:title="@string/category_support_title" settings:icon="@android:drawable/ic_menu_help">
- <intent android:action="android.intent.action.MAIN"
- android:targetPackage="net.androidcomics.acv" android:targetClass="net.robotmedia.acv.ui.settings.SupportSettingsActivity" />
- </net.robotmedia.acv.ui.settings.IconPreferenceScreen>
- <net.robotmedia.acv.ui.settings.IconPreferenceScreen
android:title="@string/category_about_title" settings:icon="@android:drawable/ic_menu_info_details">
<intent android:action="android.intent.action.MAIN"
android:targetPackage="net.androidcomics.acv" android:targetClass="net.robotmedia.acv.ui.settings.AboutSettingsActivity" />
View
35 res/xml/support_settings.xml
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright 2009 Robot Media SL
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<PreferenceScreen
- xmlns:android="http://schemas.android.com/apk/res/android">
- <Preference android:key="subscribe" android:title="@string/activity_subscribe_label"
- android:summary="@string/preference_subscribe_summary">
- </Preference>
- <PreferenceScreen android:title="@string/preference_manual_title"
- android:summary="@string/preference_manual_summary">
- <intent android:action="android.intent.action.VIEW"
- android:data="@string/manual_uri" />
- </PreferenceScreen>
- <PreferenceScreen android:title="@string/preference_contact_title"
- android:summary="@string/preference_contact_summary">
- <intent android:action="android.intent.action.VIEW"
- android:data="@string/contact_uri" />
- </PreferenceScreen>
- <Preference android:key="report_problem" android:title="@string/preference_report_problem_title"
- android:summary="@string/preference_report_problem_summary">
- </Preference>
-</PreferenceScreen>
View
35 src/net/robotmedia/acv/ui/settings/AboutSettingsActivity.java
@@ -17,13 +17,20 @@
import net.androidcomics.acv.R;
import net.robotmedia.acv.Constants;
+import net.robotmedia.acv.ui.SubscribeActivity;
+import net.robotmedia.acv.ui.widget.DialogFactory;
+import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.preference.Preference;
+import android.preference.Preference.OnPreferenceClickListener;
public class AboutSettingsActivity extends ExtendedPreferenceActivity {
+ private static final String KEY_SUBSCRIBE = "subscribe";
+ private static final String SOURCE_VALUE = "DroidComicViewer";
+
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -39,6 +46,34 @@ protected void onCreate(Bundle savedInstanceState) {
versionName = "1";
}
version.setSummary(version.getSummary() + versionName);
+
+
+ final Preference subscribe = findPreference(KEY_SUBSCRIBE);
+ subscribe.setOnPreferenceClickListener(new OnPreferenceClickListener() {
+
+ public boolean onPreferenceClick(Preference preference) {
+ Intent myIntent = new Intent(AboutSettingsActivity.this, SubscribeActivity.class);
+ myIntent.putExtra(SubscribeActivity.SOURCE_EXTRA, SOURCE_VALUE);
+ startActivityForResult(myIntent, Constants.SUBSCRIBE_CODE);
+ return true;
+ }
+ });
+
+ }
+
+ @Override
+ public void onActivityResult(int requestCode, int resultCode, Intent data) {
+ super.onActivityResult(requestCode, resultCode, data);
+ if (requestCode == Constants.SUBSCRIBE_CODE) {
+ switch (resultCode) {
+ case RESULT_OK:
+ DialogFactory.showSimpleAlert(this, true, R.string.dialog_subscribe_success_title, R.string.dialog_subscribe_success_text);
+ break;
+ case SubscribeActivity.RESULT_ERROR:
+ DialogFactory.showSimpleAlert(this, false, R.string.dialog_subscribe_error_title, R.string.dialog_subscribe_error_text);
+ break;
+ }
+ }
}
}
View
32 src/net/robotmedia/acv/ui/settings/AboutSettingsFragment.java
@@ -17,13 +17,20 @@
import net.androidcomics.acv.R;
import net.robotmedia.acv.Constants;
+import net.robotmedia.acv.ui.SubscribeActivity;
+import net.robotmedia.acv.ui.widget.DialogFactory;
+import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.preference.Preference;
+import android.preference.Preference.OnPreferenceClickListener;
public class AboutSettingsFragment extends ExtendedPreferenceFragment {
+ private static final String KEY_SUBSCRIBE = "subscribe";
+ private static final String SOURCE_VALUE = "DroidComicViewer";
+
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -39,6 +46,31 @@ public void onCreate(Bundle savedInstanceState) {
versionName = "1";
}
version.setSummary(version.getSummary() + versionName);
+
+ final Preference subscribe = findPreference(KEY_SUBSCRIBE);
+ subscribe.setOnPreferenceClickListener(new OnPreferenceClickListener() {
+
+ public boolean onPreferenceClick(Preference preference) {
+ Intent myIntent = new Intent(AboutSettingsFragment.this.getActivity(), SubscribeActivity.class);
+ myIntent.putExtra(SubscribeActivity.SOURCE_EXTRA, SOURCE_VALUE);
+ startActivityForResult(myIntent, Constants.SUBSCRIBE_CODE);
+ return true;
+ }
+ });
}
+ @Override
+ public void onActivityResult(int requestCode, int resultCode, Intent data) {
+ super.onActivityResult(requestCode, resultCode, data);
+ if (requestCode == Constants.SUBSCRIBE_CODE) {
+ switch (resultCode) {
+ case -1:
+ DialogFactory.showSimpleAlert(this.getActivity(), true, R.string.dialog_subscribe_success_title, R.string.dialog_subscribe_success_text);
+ break;
+ case SubscribeActivity.RESULT_ERROR:
+ DialogFactory.showSimpleAlert(this.getActivity(), false, R.string.dialog_subscribe_error_title, R.string.dialog_subscribe_error_text);
+ break;
+ }
+ }
+ }
}
View
109 src/net/robotmedia/acv/ui/settings/SupportSettingsActivity.java
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright 2009 Robot Media SL
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-package net.robotmedia.acv.ui.settings;
-
-import net.androidcomics.acv.R;
-
-import net.robotmedia.acv.Constants;
-import net.robotmedia.acv.ui.SubscribeActivity;
-import net.robotmedia.acv.ui.widget.DialogFactory;
-import net.robotmedia.acv.utils.AlertUtils;
-import net.robotmedia.acv.utils.IntentUtils;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.pm.PackageManager.NameNotFoundException;
-import android.os.Bundle;
-import android.preference.Preference;
-import android.preference.Preference.OnPreferenceClickListener;
-
-public class SupportSettingsActivity extends ExtendedPreferenceActivity {
-
- private static final String KEY_REPORT_PROBLEM = "report_problem";
- private static final String KEY_SUBSCRIBE = "subscribe";
- private static final String SOURCE_VALUE = "DroidComicViewer";
-
- @Override
- public void onActivityResult(int requestCode, int resultCode, Intent data) {
- super.onActivityResult(requestCode, resultCode, data);
- if (requestCode == Constants.SUBSCRIBE_CODE) {
- switch (resultCode) {
- case RESULT_OK:
- DialogFactory.showSimpleAlert(this, true, R.string.dialog_subscribe_success_title, R.string.dialog_subscribe_success_text);
- break;
- case SubscribeActivity.RESULT_ERROR:
- DialogFactory.showSimpleAlert(this, false, R.string.dialog_subscribe_error_title, R.string.dialog_subscribe_error_text);
- break;
- }
- }
- }
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- addPreferencesFromResource(R.xml.support_settings);
-
- final Preference subscribe = findPreference(KEY_SUBSCRIBE);
- subscribe.setOnPreferenceClickListener(new OnPreferenceClickListener() {
-
- public boolean onPreferenceClick(Preference preference) {
- Intent myIntent = new Intent(SupportSettingsActivity.this, SubscribeActivity.class);
- myIntent.putExtra(SubscribeActivity.SOURCE_EXTRA, SOURCE_VALUE);
- startActivityForResult(myIntent, Constants.SUBSCRIBE_CODE);
- return true;
- }
- });
-
- final Preference pReportProblem = findPreference(KEY_REPORT_PROBLEM);
- pReportProblem.setOnPreferenceClickListener(new OnPreferenceClickListener() {
-
- public boolean onPreferenceClick(Preference preference) {
- reportProblem();
- return true;
- }
- });
-
- }
-
- private static final String ACTION_REPORT_BUG = "net.robotmedia.bugreporter.intent.action.REPORT_BUG";
- private static final String EXTRA_PACKAGE = "net.robotmedia.supportrequest.intent.extra.package";
- private static final String EXTRA_EMAIL = "net.robotmedia.supportrequest.intent.extra.email";
- private static final String EMAIL = "acv@robotcomics.net";
- private static final String PACKAGE_BUG_REPORTER = "net.robotmedia.bugreporter";
-
- private void reportProblem() {
- final Context context = this;
- try {
- getPackageManager().getPackageInfo(PACKAGE_BUG_REPORTER, 0);
- final Intent intent = new Intent(ACTION_REPORT_BUG);
- intent.putExtra(EXTRA_PACKAGE, context.getPackageName());
- intent.putExtra(EXTRA_EMAIL, EMAIL);
- startActivity(intent);
- } catch (NameNotFoundException e) {
- AlertUtils.showYesNoAlert(this, false,
- R.string.dialog_bug_reporter_title,
- R.string.dialog_bug_reporter_text,
- new DialogInterface.OnClickListener() {
-
- @Override
- public void onClick(DialogInterface dialog, int which) {
- IntentUtils.openMarket(context, PACKAGE_BUG_REPORTER);
- }
- }, null);
- }
- }
-
-}
View
108 src/net/robotmedia/acv/ui/settings/SupportSettingsFragment.java
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright 2009 Robot Media SL
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- ******************************************************************************/
-package net.robotmedia.acv.ui.settings;
-
-import net.androidcomics.acv.R;
-import net.robotmedia.acv.Constants;
-import net.robotmedia.acv.ui.SubscribeActivity;
-import net.robotmedia.acv.ui.widget.DialogFactory;
-import net.robotmedia.acv.utils.AlertUtils;
-import net.robotmedia.acv.utils.IntentUtils;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.pm.PackageManager.NameNotFoundException;
-import android.os.Bundle;
-import android.preference.Preference;
-import android.preference.Preference.OnPreferenceClickListener;
-
-public class SupportSettingsFragment extends ExtendedPreferenceFragment {
-
- private static final String KEY_REPORT_PROBLEM = "report_problem";
- private static final String KEY_SUBSCRIBE = "subscribe";
- private static final String SOURCE_VALUE = "DroidComicViewer";
-
- @Override
- public void onActivityResult(int requestCode, int resultCode, Intent data) {
- super.onActivityResult(requestCode, resultCode, data);
- if (requestCode == Constants.SUBSCRIBE_CODE) {
- switch (resultCode) {
- case -1:
- DialogFactory.showSimpleAlert(this.getActivity(), true, R.string.dialog_subscribe_success_title, R.string.dialog_subscribe_success_text);
- break;
- case SubscribeActivity.RESULT_ERROR:
- DialogFactory.showSimpleAlert(this.getActivity(), false, R.string.dialog_subscribe_error_title, R.string.dialog_subscribe_error_text);
- break;
- }
- }
- }
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- addPreferencesFromResource(R.xml.support_settings);
-
- final Preference subscribe = findPreference(KEY_SUBSCRIBE);
- subscribe.setOnPreferenceClickListener(new OnPreferenceClickListener() {
-
- public boolean onPreferenceClick(Preference preference) {
- Intent myIntent = new Intent(SupportSettingsFragment.this.getActivity(), SubscribeActivity.class);
- myIntent.putExtra(SubscribeActivity.SOURCE_EXTRA, SOURCE_VALUE);
- startActivityForResult(myIntent, Constants.SUBSCRIBE_CODE);
- return true;
- }
- });
-
- final Preference pReportProblem = findPreference(KEY_REPORT_PROBLEM);
- pReportProblem.setOnPreferenceClickListener(new OnPreferenceClickListener() {
-
- public boolean onPreferenceClick(Preference preference) {
- reportProblem();
- return true;
- }
- });
-
- }
-
- private static final String ACTION_REPORT_BUG = "net.robotmedia.bugreporter.intent.action.REPORT_BUG";
- private static final String EXTRA_PACKAGE = "net.robotmedia.supportrequest.intent.extra.package";
- private static final String EXTRA_EMAIL = "net.robotmedia.supportrequest.intent.extra.email";
- private static final String EMAIL = "acv@robotcomics.net";
- private static final String PACKAGE_BUG_REPORTER = "net.robotmedia.bugreporter";
-
- private void reportProblem() {
- final Context context = this.getActivity();
- try {
- this.getActivity().getPackageManager().getPackageInfo(PACKAGE_BUG_REPORTER, 0);
- final Intent intent = new Intent(ACTION_REPORT_BUG);
- intent.putExtra(EXTRA_PACKAGE, context.getPackageName());
- intent.putExtra(EXTRA_EMAIL, EMAIL);
- startActivity(intent);
- } catch (NameNotFoundException e) {
- AlertUtils.showYesNoAlert(this.getActivity(), false,
- R.string.dialog_bug_reporter_title,
- R.string.dialog_bug_reporter_text,
- new DialogInterface.OnClickListener() {
-
- @Override
- public void onClick(DialogInterface dialog, int which) {
- IntentUtils.openMarket(context, PACKAGE_BUG_REPORTER);
- }
- }, null);
- }
- }
-
-}

0 comments on commit 4d595af

Please sign in to comment.