From 5a62e99ac9511335722a466853fe7c8c5eebb8b3 Mon Sep 17 00:00:00 2001 From: Hussein Maher Date: Sat, 28 May 2011 00:21:14 +0200 Subject: [PATCH] Arabic reshaper for translation - remove unused imports --- gen/com/quran/labs/androidquran/R.java | 342 +++++++++--------- .../labs/androidquran/QuranActivity.java | 3 +- .../labs/androidquran/QuranDataActivity.java | 4 +- .../androidquran/TranslationActivity.java | 4 +- 4 files changed, 176 insertions(+), 177 deletions(-) diff --git a/gen/com/quran/labs/androidquran/R.java b/gen/com/quran/labs/androidquran/R.java index 33ecbf936d..85254f2b82 100644 --- a/gen/com/quran/labs/androidquran/R.java +++ b/gen/com/quran/labs/androidquran/R.java @@ -1,171 +1,171 @@ -/* AUTO-GENERATED FILE. DO NOT MODIFY. - * - * This class was automatically generated by the - * aapt tool from the resource data it found. It - * should not be modified by hand. - */ - -package com.quran.labs.androidquran; - -public final class R { - public static final class attr { - } - public static final class drawable { - public static final int about=0x7f020000; - public static final int bookmarks=0x7f020001; - public static final int download=0x7f020002; - public static final int gallery_seekbar=0x7f020003; - public static final int help=0x7f020004; - public static final int icon=0x7f020005; - public static final int jump=0x7f020006; - public static final int list=0x7f020007; - public static final int lock=0x7f020008; - public static final int remove_bookmark=0x7f020009; - public static final int settings=0x7f02000a; - public static final int splash=0x7f02000b; - public static final int sura_icon=0x7f02000c; - public static final int translation=0x7f02000d; - public static final int unlock=0x7f02000e; - } - public static final class id { - public static final int btnBookmark=0x7f080012; - public static final int btnEmailUs=0x7f080002; - public static final int btnGetTranslations=0x7f08001f; - public static final int btnHelpBack=0x7f08000a; - public static final int cancelButton=0x7f08000c; - public static final int display_name=0x7f080006; - public static final int download_list=0x7f080005; - public static final int expLayout=0x7f08000e; - public static final int gallery=0x7f08000f; - public static final int is_downloaded=0x7f080007; - public static final int jumpButton=0x7f08000d; - public static final int lstBookmarks=0x7f080004; - public static final int menu_item_about_us=0x7f080025; - public static final int menu_item_bookmarks=0x7f080027; - public static final int menu_item_bookmarks_add=0x7f080029; - public static final int menu_item_bookmarks_remove=0x7f08002a; - public static final int menu_item_bookmarks_view=0x7f080028; - public static final int menu_item_get_translations=0x7f08002d; - public static final int menu_item_help=0x7f08002c; - public static final int menu_item_jump=0x7f080024; - public static final int menu_item_settings=0x7f080026; - public static final int menu_item_translations=0x7f08002b; - public static final int pageImageView=0x7f080016; - public static final int pageScrollView=0x7f080017; - public static final int page_field=0x7f08000b; - public static final int page_info=0x7f08001c; - public static final int pagetitle=0x7f080010; - public static final int results_list=0x7f080020; - public static final int search_area=0x7f08001e; - public static final int splashview=0x7f080023; - public static final int suraSeek=0x7f080013; - public static final int sura_icon_img=0x7f080019; - public static final int sura_info=0x7f08001b; - public static final int sura_number=0x7f080018; - public static final int sura_title=0x7f08001a; - public static final int suralist=0x7f080014; - public static final int toolbar=0x7f080011; - public static final int translationText=0x7f08001d; - public static final int txtAbout=0x7f080003; - public static final int txtCopyRights=0x7f080001; - public static final int txtDevelopedBy=0x7f080000; - public static final int txtHelp=0x7f080009; - public static final int txtHelpTitle=0x7f080008; - public static final int txtPageNotFound=0x7f080015; - public static final int verseLocation=0x7f080022; - public static final int verseText=0x7f080021; - } - public static final class layout { - public static final int about_us=0x7f030000; - public static final int bookmarks_list=0x7f030001; - public static final int download_list=0x7f030002; - public static final int download_row=0x7f030003; - public static final int help=0x7f030004; - public static final int jump_to=0x7f030005; - public static final int quran_error=0x7f030006; - public static final int quran_exp=0x7f030007; - public static final int quran_list=0x7f030008; - public static final int quran_page=0x7f030009; - public static final int quran_row=0x7f03000a; - public static final int quran_translation=0x7f03000b; - public static final int search=0x7f03000c; - public static final int search_result=0x7f03000d; - public static final int splash_screen=0x7f03000e; - } - public static final class menu { - public static final int option_menu=0x7f070000; - } - public static final class plurals { - /** Shown above search results when we receive a search request. - */ - public static final int search_results=0x7f060000; - } - public static final class string { - public static final int aboutUs=0x7f050023; - public static final int app_name=0x7f050002; - public static final int cancel=0x7f05001e; - public static final int copyRights=0x7f050020; - public static final int developedBy=0x7f05001f; - public static final int downloadPrompt=0x7f050005; - public static final int downloadPrompt_no=0x7f050008; - public static final int downloadPrompt_ok=0x7f050007; - public static final int downloadPrompt_title=0x7f050004; - public static final int downloadTranslationPrompt=0x7f050006; - public static final int downloading_message=0x7f05000a; - public static final int downloading_title=0x7f050009; - public static final int email_subject=0x7f050021; - public static final int email_to=0x7f050022; - public static final int errorString=0x7f050000; - public static final int extracting_message=0x7f05000c; - public static final int extracting_title=0x7f05000b; - public static final int go=0x7f05001d; - public static final int help=0x7f050025; - public static final int help_title=0x7f050024; - public static final int jump_dialog_title=0x7f05001b; - public static final int menu_about=0x7f05000e; - public static final int menu_bookmarks=0x7f050011; - public static final int menu_bookmarks_add=0x7f050015; - public static final int menu_bookmarks_help=0x7f050018; - public static final int menu_bookmarks_remove=0x7f050012; - public static final int menu_bookmarks_removed=0x7f050017; - public static final int menu_bookmarks_saved=0x7f050016; - public static final int menu_bookmarks_view=0x7f050013; - public static final int menu_get_translations=0x7f05001a; - public static final int menu_help=0x7f050019; - public static final int menu_jump=0x7f05000d; - public static final int menu_jump_last_page=0x7f050010; - public static final int menu_settings=0x7f05000f; - public static final int menu_translation=0x7f050014; - public static final int no_active_translation=0x7f050036; - /** Search failure message. - */ - public static final int no_results=0x7f050035; - public static final int no_translations_available=0x7f050038; - public static final int pageNotFound=0x7f050003; - public static final int page_hint=0x7f05001c; - public static final int prefs_active_translation=0x7f05003b; - public static final int prefs_category_display_settings=0x7f05003a; - public static final int prefs_category_translation=0x7f050039; - public static final int prefs_full_screen=0x7f05002b; - public static final int prefs_keep_screen_on=0x7f05002d; - public static final int prefs_landscape_orientation=0x7f05002f; - public static final int prefs_lock_orientation=0x7f05002e; - public static final int prefs_path=0x7f050031; - public static final int prefs_reshape_arabic=0x7f050032; - public static final int prefs_show_clock=0x7f05002c; - public static final int prefs_translation_text_size=0x7f050030; - public static final int prefs_use_arabic_names=0x7f05002a; - public static final int quranSearchType=0x7f050034; - public static final int search_hint=0x7f050033; - public static final int set_active_translation=0x7f050037; - public static final int settings_full_screen=0x7f050027; - public static final int settings_keep_screen_on=0x7f050029; - public static final int settings_show_clock=0x7f050028; - public static final int settings_use_arabic_names=0x7f050026; - public static final int translationsNeeded=0x7f050001; - } - public static final class xml { - public static final int quran_preferences=0x7f040000; - public static final int searchable=0x7f040001; - } -} +/* AUTO-GENERATED FILE. DO NOT MODIFY. + * + * This class was automatically generated by the + * aapt tool from the resource data it found. It + * should not be modified by hand. + */ + +package com.quran.labs.androidquran; + +public final class R { + public static final class attr { + } + public static final class drawable { + public static final int about=0x7f020000; + public static final int bookmarks=0x7f020001; + public static final int download=0x7f020002; + public static final int gallery_seekbar=0x7f020003; + public static final int help=0x7f020004; + public static final int icon=0x7f020005; + public static final int jump=0x7f020006; + public static final int list=0x7f020007; + public static final int lock=0x7f020008; + public static final int remove_bookmark=0x7f020009; + public static final int settings=0x7f02000a; + public static final int splash=0x7f02000b; + public static final int sura_icon=0x7f02000c; + public static final int translation=0x7f02000d; + public static final int unlock=0x7f02000e; + } + public static final class id { + public static final int btnBookmark=0x7f080012; + public static final int btnEmailUs=0x7f080002; + public static final int btnGetTranslations=0x7f08001f; + public static final int btnHelpBack=0x7f08000a; + public static final int cancelButton=0x7f08000c; + public static final int display_name=0x7f080006; + public static final int download_list=0x7f080005; + public static final int expLayout=0x7f08000e; + public static final int gallery=0x7f08000f; + public static final int is_downloaded=0x7f080007; + public static final int jumpButton=0x7f08000d; + public static final int lstBookmarks=0x7f080004; + public static final int menu_item_about_us=0x7f080025; + public static final int menu_item_bookmarks=0x7f080027; + public static final int menu_item_bookmarks_add=0x7f080029; + public static final int menu_item_bookmarks_remove=0x7f08002a; + public static final int menu_item_bookmarks_view=0x7f080028; + public static final int menu_item_get_translations=0x7f08002d; + public static final int menu_item_help=0x7f08002c; + public static final int menu_item_jump=0x7f080024; + public static final int menu_item_settings=0x7f080026; + public static final int menu_item_translations=0x7f08002b; + public static final int pageImageView=0x7f080016; + public static final int pageScrollView=0x7f080017; + public static final int page_field=0x7f08000b; + public static final int page_info=0x7f08001c; + public static final int pagetitle=0x7f080010; + public static final int results_list=0x7f080020; + public static final int search_area=0x7f08001e; + public static final int splashview=0x7f080023; + public static final int suraSeek=0x7f080013; + public static final int sura_icon_img=0x7f080019; + public static final int sura_info=0x7f08001b; + public static final int sura_number=0x7f080018; + public static final int sura_title=0x7f08001a; + public static final int suralist=0x7f080014; + public static final int toolbar=0x7f080011; + public static final int translationText=0x7f08001d; + public static final int txtAbout=0x7f080003; + public static final int txtCopyRights=0x7f080001; + public static final int txtDevelopedBy=0x7f080000; + public static final int txtHelp=0x7f080009; + public static final int txtHelpTitle=0x7f080008; + public static final int txtPageNotFound=0x7f080015; + public static final int verseLocation=0x7f080022; + public static final int verseText=0x7f080021; + } + public static final class layout { + public static final int about_us=0x7f030000; + public static final int bookmarks_list=0x7f030001; + public static final int download_list=0x7f030002; + public static final int download_row=0x7f030003; + public static final int help=0x7f030004; + public static final int jump_to=0x7f030005; + public static final int quran_error=0x7f030006; + public static final int quran_exp=0x7f030007; + public static final int quran_list=0x7f030008; + public static final int quran_page=0x7f030009; + public static final int quran_row=0x7f03000a; + public static final int quran_translation=0x7f03000b; + public static final int search=0x7f03000c; + public static final int search_result=0x7f03000d; + public static final int splash_screen=0x7f03000e; + } + public static final class menu { + public static final int option_menu=0x7f070000; + } + public static final class plurals { + /** Shown above search results when we receive a search request. + */ + public static final int search_results=0x7f060000; + } + public static final class string { + public static final int aboutUs=0x7f050023; + public static final int app_name=0x7f050002; + public static final int cancel=0x7f05001e; + public static final int copyRights=0x7f050020; + public static final int developedBy=0x7f05001f; + public static final int downloadPrompt=0x7f050005; + public static final int downloadPrompt_no=0x7f050008; + public static final int downloadPrompt_ok=0x7f050007; + public static final int downloadPrompt_title=0x7f050004; + public static final int downloadTranslationPrompt=0x7f050006; + public static final int downloading_message=0x7f05000a; + public static final int downloading_title=0x7f050009; + public static final int email_subject=0x7f050021; + public static final int email_to=0x7f050022; + public static final int errorString=0x7f050000; + public static final int extracting_message=0x7f05000c; + public static final int extracting_title=0x7f05000b; + public static final int go=0x7f05001d; + public static final int help=0x7f050025; + public static final int help_title=0x7f050024; + public static final int jump_dialog_title=0x7f05001b; + public static final int menu_about=0x7f05000e; + public static final int menu_bookmarks=0x7f050011; + public static final int menu_bookmarks_add=0x7f050015; + public static final int menu_bookmarks_help=0x7f050018; + public static final int menu_bookmarks_remove=0x7f050012; + public static final int menu_bookmarks_removed=0x7f050017; + public static final int menu_bookmarks_saved=0x7f050016; + public static final int menu_bookmarks_view=0x7f050013; + public static final int menu_get_translations=0x7f05001a; + public static final int menu_help=0x7f050019; + public static final int menu_jump=0x7f05000d; + public static final int menu_jump_last_page=0x7f050010; + public static final int menu_settings=0x7f05000f; + public static final int menu_translation=0x7f050014; + public static final int no_active_translation=0x7f050036; + /** Search failure message. + */ + public static final int no_results=0x7f050035; + public static final int no_translations_available=0x7f050038; + public static final int pageNotFound=0x7f050003; + public static final int page_hint=0x7f05001c; + public static final int prefs_active_translation=0x7f05003b; + public static final int prefs_category_display_settings=0x7f05003a; + public static final int prefs_category_translation=0x7f050039; + public static final int prefs_full_screen=0x7f05002b; + public static final int prefs_keep_screen_on=0x7f05002d; + public static final int prefs_landscape_orientation=0x7f05002f; + public static final int prefs_lock_orientation=0x7f05002e; + public static final int prefs_path=0x7f050031; + public static final int prefs_reshape_arabic=0x7f050032; + public static final int prefs_show_clock=0x7f05002c; + public static final int prefs_translation_text_size=0x7f050030; + public static final int prefs_use_arabic_names=0x7f05002a; + public static final int quranSearchType=0x7f050034; + public static final int search_hint=0x7f050033; + public static final int set_active_translation=0x7f050037; + public static final int settings_full_screen=0x7f050027; + public static final int settings_keep_screen_on=0x7f050029; + public static final int settings_show_clock=0x7f050028; + public static final int settings_use_arabic_names=0x7f050026; + public static final int translationsNeeded=0x7f050001; + } + public static final class xml { + public static final int quran_preferences=0x7f040000; + public static final int searchable=0x7f040001; + } +} diff --git a/src/com/quran/labs/androidquran/QuranActivity.java b/src/com/quran/labs/androidquran/QuranActivity.java index 4df571c749..f55dcfd1be 100644 --- a/src/com/quran/labs/androidquran/QuranActivity.java +++ b/src/com/quran/labs/androidquran/QuranActivity.java @@ -4,16 +4,15 @@ import android.content.Intent; import android.content.res.Configuration; import android.os.Bundle; -import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; -import android.widget.AdapterView.OnItemClickListener; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; +import android.widget.AdapterView.OnItemClickListener; import com.quran.labs.androidquran.common.BaseQuranActivity; import com.quran.labs.androidquran.data.ApplicationConstants; diff --git a/src/com/quran/labs/androidquran/QuranDataActivity.java b/src/com/quran/labs/androidquran/QuranDataActivity.java index ac748e3b86..0bebb6c188 100644 --- a/src/com/quran/labs/androidquran/QuranDataActivity.java +++ b/src/com/quran/labs/androidquran/QuranDataActivity.java @@ -1,6 +1,5 @@ package com.quran.labs.androidquran; -import android.app.Activity; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.ComponentName; @@ -10,14 +9,13 @@ import android.content.ServiceConnection; import android.content.res.Configuration; import android.os.AsyncTask; -import android.os.AsyncTask.Status; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; +import android.os.AsyncTask.Status; import android.util.Log; import android.view.MotionEvent; -import com.quran.labs.androidquran.R; import com.quran.labs.androidquran.common.BaseQuranActivity; import com.quran.labs.androidquran.service.QuranDataService; import com.quran.labs.androidquran.util.QuranUtils; diff --git a/src/com/quran/labs/androidquran/TranslationActivity.java b/src/com/quran/labs/androidquran/TranslationActivity.java index f47a539d84..806e1b3821 100644 --- a/src/com/quran/labs/androidquran/TranslationActivity.java +++ b/src/com/quran/labs/androidquran/TranslationActivity.java @@ -27,6 +27,7 @@ import com.quran.labs.androidquran.data.ApplicationConstants; import com.quran.labs.androidquran.data.DatabaseHandler; import com.quran.labs.androidquran.data.QuranInfo; +import com.quran.labs.androidquran.util.ArabicStyle; import com.quran.labs.androidquran.util.QuranSettings; import com.quran.labs.androidquran.widgets.GalleryFriendlyScrollView; @@ -191,6 +192,7 @@ public View getView(int position, View convertView, ViewGroup parent) { convertView = mInflater.inflate(R.layout.quran_translation, null); holder = new PageHolder(); holder.page = (TextView)convertView.findViewById(R.id.translationText); + holder.page.setTypeface(ArabicStyle.getTypeface()); holder.scroll = (GalleryFriendlyScrollView)convertView.findViewById(R.id.pageScrollView); convertView.setTag(holder); } @@ -211,7 +213,7 @@ public View getView(int position, View convertView, ViewGroup parent) { cache.put("page_" + page, str); } - holder.page.setText(Html.fromHtml(str)); + holder.page.setText(Html.fromHtml(ArabicStyle.reshape(str))); holder.page.setTextSize(QuranSettings.getInstance().getTranslationTextSize()); QuranSettings.getInstance().setLastPage(page); QuranSettings.save(prefs);