From 2dd3473a0ac7b67f87de52c5c02c3693fabab2de Mon Sep 17 00:00:00 2001 From: Bryn A Knatterud Date: Wed, 15 Apr 2015 22:10:40 -0500 Subject: [PATCH] updates to issues posted in GitHub today --- .../main/java/activity/SettingsActivity.java | 3 +- .../activity/reading/ReadingActivity.java | 83 +++++++- .../reading/StoryReadingActivity.java | 79 +++++++- .../CollapsibleVersionAdapter.java | 165 ++++++++++++---- .../java/fragments/StoryChaptersFragment.java | 1 - .../fragments/VersionSelectionFragment.java | 3 +- .../java/services/VersionDownloadService.java | 20 ++ app/app/src/main/java/utils/URLUtils.java | 1 + .../{level_tree.png => level_three.png} | Bin .../status_error_btn_radio_on_holo_light.png | Bin ...status_expired_btn_radio_on_holo_light.png | Bin .../status_failed_btn_radio_on_holo_light.png | Bin ...tatus_verified_btn_radio_on_holo_light.png | Bin .../src/main/res/drawable-hdpi/x_button.png | Bin 2061 -> 3702 bytes .../{level_tree.png => level_three.png} | Bin .../status_error_btn_radio_on_holo_light.png | Bin ...status_expired_btn_radio_on_holo_light.png | Bin .../status_failed_btn_radio_on_holo_light.png | Bin ...tatus_verified_btn_radio_on_holo_light.png | Bin .../{level_tree.png => level_three.png} | Bin .../status_error_btn_radio_on_holo_light.png | Bin ...status_expired_btn_radio_on_holo_light.png | Bin .../status_failed_btn_radio_on_holo_light.png | Bin ...tatus_verified_btn_radio_on_holo_light.png | Bin .../{level_tree.png => level_three.png} | Bin .../status_error_btn_radio_on_holo_light.png | Bin ...status_expired_btn_radio_on_holo_light.png | Bin .../status_failed_btn_radio_on_holo_light.png | Bin ...tatus_verified_btn_radio_on_holo_light.png | Bin .../src/main/res/drawable/delete_button.xml | 14 ++ .../src/main/res/drawable/group_indicator.xml | 7 + .../res/drawable/indicator_arrow_down.9.png | Bin 0 -> 716 bytes .../res/drawable/indicator_arrow_right.9.png | Bin 0 -> 703 bytes .../status_error_btn_radio_holo_light.xml | 0 .../status_expired_btn_radio_holo_light.xml | 0 .../status_failed_btn_radio_holo_light.xml | 0 .../status_verified_btn_radio_holo_light.xml | 0 .../main/res/drawable/version_row_click.xml | 5 + .../main/res/layout/actionbar_custom_view.xml | 46 +++-- .../res/layout/fragment_version_selection.xml | 11 +- .../src/main/res/layout/popup_horizontal.xml | 2 +- .../src/main/res/layout/popup_vertical.xml | 2 +- app/app/src/main/res/layout/row_group.xml | 5 +- .../main/res/layout/row_version_selector.xml | 185 +++++++++++------- .../{footerview.xml => version_footer.xml} | 8 +- app/app/src/main/res/values-large/dimens.xml | 2 +- .../res/values-v11/themes_status_error.xml | 0 .../res/values-v11/themes_status_expired.xml | 0 .../res/values-v11/themes_status_failed.xml | 0 .../res/values-v11/themes_status_verified.xml | 0 app/app/src/main/res/values/color.xml | 4 +- .../main/res/values/colors_status_error.xml | 0 .../main/res/values/colors_status_expired.xml | 0 .../main/res/values/colors_status_failed.xml | 0 .../res/values/colors_status_verified.xml | 0 app/app/src/main/res/values/dimens.xml | 2 +- app/app/src/main/res/values/strings.xml | 12 +- .../res/values/strings_activity_settings.xml | 2 +- .../main/res/values/styles_status_error.xml | 0 .../main/res/values/styles_status_expired.xml | 0 .../main/res/values/styles_status_failed.xml | 0 .../res/values/styles_status_verified.xml | 0 .../main/res/values/themes_status_error.xml | 0 .../main/res/values/themes_status_expired.xml | 0 .../main/res/values/themes_status_failed.xml | 0 .../res/values/themes_status_verified.xml | 0 app/app/src/main/res/xml/pref_general.xml | 18 -- 67 files changed, 503 insertions(+), 177 deletions(-) rename app/app/src/main/res/drawable-hdpi/{level_tree.png => level_three.png} (100%) mode change 100644 => 100755 app/app/src/main/res/drawable-hdpi/status_error_btn_radio_on_holo_light.png mode change 100644 => 100755 app/app/src/main/res/drawable-hdpi/status_expired_btn_radio_on_holo_light.png mode change 100644 => 100755 app/app/src/main/res/drawable-hdpi/status_failed_btn_radio_on_holo_light.png mode change 100644 => 100755 app/app/src/main/res/drawable-hdpi/status_verified_btn_radio_on_holo_light.png rename app/app/src/main/res/drawable-mdpi/{level_tree.png => level_three.png} (100%) mode change 100644 => 100755 app/app/src/main/res/drawable-mdpi/status_error_btn_radio_on_holo_light.png mode change 100644 => 100755 app/app/src/main/res/drawable-mdpi/status_expired_btn_radio_on_holo_light.png mode change 100644 => 100755 app/app/src/main/res/drawable-mdpi/status_failed_btn_radio_on_holo_light.png mode change 100644 => 100755 app/app/src/main/res/drawable-mdpi/status_verified_btn_radio_on_holo_light.png rename app/app/src/main/res/drawable-xhdpi/{level_tree.png => level_three.png} (100%) mode change 100644 => 100755 app/app/src/main/res/drawable-xhdpi/status_error_btn_radio_on_holo_light.png mode change 100644 => 100755 app/app/src/main/res/drawable-xhdpi/status_expired_btn_radio_on_holo_light.png mode change 100644 => 100755 app/app/src/main/res/drawable-xhdpi/status_failed_btn_radio_on_holo_light.png mode change 100644 => 100755 app/app/src/main/res/drawable-xhdpi/status_verified_btn_radio_on_holo_light.png rename app/app/src/main/res/drawable-xxhdpi/{level_tree.png => level_three.png} (100%) mode change 100644 => 100755 app/app/src/main/res/drawable-xxhdpi/status_error_btn_radio_on_holo_light.png mode change 100644 => 100755 app/app/src/main/res/drawable-xxhdpi/status_expired_btn_radio_on_holo_light.png mode change 100644 => 100755 app/app/src/main/res/drawable-xxhdpi/status_failed_btn_radio_on_holo_light.png mode change 100644 => 100755 app/app/src/main/res/drawable-xxhdpi/status_verified_btn_radio_on_holo_light.png create mode 100644 app/app/src/main/res/drawable/delete_button.xml create mode 100644 app/app/src/main/res/drawable/group_indicator.xml create mode 100755 app/app/src/main/res/drawable/indicator_arrow_down.9.png create mode 100755 app/app/src/main/res/drawable/indicator_arrow_right.9.png mode change 100644 => 100755 app/app/src/main/res/drawable/status_error_btn_radio_holo_light.xml mode change 100644 => 100755 app/app/src/main/res/drawable/status_expired_btn_radio_holo_light.xml mode change 100644 => 100755 app/app/src/main/res/drawable/status_failed_btn_radio_holo_light.xml mode change 100644 => 100755 app/app/src/main/res/drawable/status_verified_btn_radio_holo_light.xml create mode 100644 app/app/src/main/res/drawable/version_row_click.xml rename app/app/src/main/res/layout/{footerview.xml => version_footer.xml} (98%) mode change 100644 => 100755 app/app/src/main/res/values-v11/themes_status_error.xml mode change 100644 => 100755 app/app/src/main/res/values-v11/themes_status_expired.xml mode change 100644 => 100755 app/app/src/main/res/values-v11/themes_status_failed.xml mode change 100644 => 100755 app/app/src/main/res/values-v11/themes_status_verified.xml mode change 100644 => 100755 app/app/src/main/res/values/colors_status_error.xml mode change 100644 => 100755 app/app/src/main/res/values/colors_status_expired.xml mode change 100644 => 100755 app/app/src/main/res/values/colors_status_failed.xml mode change 100644 => 100755 app/app/src/main/res/values/colors_status_verified.xml mode change 100644 => 100755 app/app/src/main/res/values/styles_status_error.xml mode change 100644 => 100755 app/app/src/main/res/values/styles_status_expired.xml mode change 100644 => 100755 app/app/src/main/res/values/styles_status_failed.xml mode change 100644 => 100755 app/app/src/main/res/values/styles_status_verified.xml mode change 100644 => 100755 app/app/src/main/res/values/themes_status_error.xml mode change 100644 => 100755 app/app/src/main/res/values/themes_status_expired.xml mode change 100644 => 100755 app/app/src/main/res/values/themes_status_failed.xml mode change 100644 => 100755 app/app/src/main/res/values/themes_status_verified.xml diff --git a/app/app/src/main/java/activity/SettingsActivity.java b/app/app/src/main/java/activity/SettingsActivity.java index e52c410..4263826 100644 --- a/app/app/src/main/java/activity/SettingsActivity.java +++ b/app/app/src/main/java/activity/SettingsActivity.java @@ -55,7 +55,7 @@ private void setupSimplePreferencesScreen() { addPreferencesFromResource(R.xml.pref_general); - Preference button = (Preference)findPreference("reset_url"); + Preference button = (Preference) findPreference("reset_url"); button.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { @Override public boolean onPreferenceClick(Preference arg0) { @@ -69,6 +69,7 @@ public boolean onPreferenceClick(Preference arg0) { } }); + // Add 'notifications' preferences, and a corresponding header. // PreferenceCategory fakeHeader = new PreferenceCategory(this); // fakeHeader.setTitle(R.string.pref_header_data); diff --git a/app/app/src/main/java/activity/reading/ReadingActivity.java b/app/app/src/main/java/activity/reading/ReadingActivity.java index bcb5fa9..0511e3b 100644 --- a/app/app/src/main/java/activity/reading/ReadingActivity.java +++ b/app/app/src/main/java/activity/reading/ReadingActivity.java @@ -1,28 +1,35 @@ package activity.reading; +import android.app.Dialog; +import android.app.FragmentManager; import android.content.res.Configuration; +import android.support.annotation.NonNull; +import android.support.v4.app.DialogFragment; import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import android.content.Context; import android.content.Intent; import android.content.res.Resources; -import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.preference.PreferenceManager; import android.support.v4.view.ViewPager; import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBarActivity; -import android.util.Log; import android.view.Display; +import android.view.LayoutInflater; import android.view.MenuItem; import android.view.MotionEvent; import android.view.View; +import android.view.ViewGroup; +import android.view.Window; +import android.widget.ImageView; import android.widget.LinearLayout; +import android.widget.RelativeLayout; import android.widget.TextView; +import org.unfoldingword.mobile.BuildConfig; import org.unfoldingword.mobile.R; import java.util.ArrayList; @@ -62,7 +69,7 @@ public class ReadingActivity extends ActionBarActivity implements private ViewPager readingViewPager = null; private ActionBar mActionBar = null; private LinearLayout versionsButton = null; - private LinearLayout chaptersButton = null; + private RelativeLayout chaptersButton = null; private TextView versionsTextView = null; private TextView chapterTextView = null; @@ -128,7 +135,7 @@ private void setupActionBar(){ View view = getLayoutInflater().inflate(R.layout.actionbar_custom_view, null); mActionBar = getSupportActionBar(); - chaptersButton = (LinearLayout) view.findViewById(R.id.middle_button); + chaptersButton = (RelativeLayout) view.findViewById(R.id.middle_button); mActionBar.setCustomView(view); mActionBar.setDisplayShowCustomEnabled(true); mActionBar.setDisplayShowHomeEnabled(true); @@ -137,11 +144,39 @@ private void setupActionBar(){ setupChapterButton(view); setupVersionButton(view); + setupCheckingLevelView(view); + } + + void setupCheckingLevelView(View view){ + + ImageView imageView = (ImageView) view.findViewById(R.id.checking_level_image_view); + if(this.mChapter != null){ + int checkingLevel = Integer.parseInt(mChapter.getParent(getApplicationContext()).getParent(getApplicationContext()).status.checkingLevel); + imageView.setImageResource(getCheckingLevelImage(checkingLevel)); + imageView.setVisibility(View.VISIBLE); + } + else{ + imageView.setVisibility(View.GONE); + } + } + + private int getCheckingLevelImage(int level){ + switch (level){ + case 2:{ + return R.drawable.level_two; + } + case 3:{ + return R.drawable.level_three; + } + default:{ + return R.drawable.level_one; + } + } } private void setupChapterButton(View view){ - chaptersButton = (LinearLayout) view.findViewById(R.id.middle_button); + chaptersButton = (RelativeLayout) view.findViewById(R.id.middle_button); chapterTextView = (TextView) view.findViewById(R.id.middle_button_text); if(this.mChapter != null) { chapterTextView.setText(this.mChapter.getTitle(getApplicationContext())); @@ -429,4 +464,40 @@ public void bookWasSelected(String chapterUid) { public void chapterWasSelected() { } + + public void checkingLevelClicked(View view) { + + FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); + + CheckingLevelFragment fragment = new CheckingLevelFragment(); + fragment.show(ft, CHECKING_LEVEL_FRAGMENT_ID); + } + + static private final String CHECKING_LEVEL_FRAGMENT_ID = "CHECKING_LEVEL_FRAGMENT_ID"; + + static public class CheckingLevelFragment extends DialogFragment { + + public CheckingLevelFragment() { + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + View view = inflater.inflate(R.layout.version_footer, container, false); + + TextView tView = (TextView) view.findViewById(R.id.textView); + String versionName = BuildConfig.VERSION_NAME; + + tView.setText(versionName); + return view; + } + + @NonNull + @Override + public Dialog onCreateDialog(Bundle savedInstanceState) { + Dialog dialog = super.onCreateDialog(savedInstanceState); + dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE); + return dialog; + } + } } diff --git a/app/app/src/main/java/activity/reading/StoryReadingActivity.java b/app/app/src/main/java/activity/reading/StoryReadingActivity.java index a6a11f7..e1e7b61 100644 --- a/app/app/src/main/java/activity/reading/StoryReadingActivity.java +++ b/app/app/src/main/java/activity/reading/StoryReadingActivity.java @@ -1,6 +1,7 @@ package activity.reading; +import android.app.Dialog; import android.content.Context; import android.content.Intent; import android.content.res.Configuration; @@ -8,23 +9,31 @@ import android.os.Bundle; import android.os.Handler; import android.preference.PreferenceManager; +import android.support.annotation.NonNull; +import android.support.v4.app.DialogFragment; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; import android.support.v4.view.ViewPager; import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBarActivity; import android.view.Display; +import android.view.LayoutInflater; import android.view.MenuItem; import android.view.MotionEvent; import android.view.View; import android.view.ViewConfiguration; +import android.view.ViewGroup; +import android.view.Window; import android.widget.Button; +import android.widget.ImageView; import android.widget.LinearLayout; +import android.widget.RelativeLayout; import android.widget.TextView; import com.nostra13.universalimageloader.core.ImageLoader; import com.nostra13.universalimageloader.core.ImageLoaderConfiguration; +import org.unfoldingword.mobile.BuildConfig; import org.unfoldingword.mobile.R; import java.util.Locale; @@ -60,7 +69,7 @@ public class StoryReadingActivity extends ActionBarActivity implements private ViewPager readingViewPager = null; private ActionBar mActionBar = null; private LinearLayout versionsButton = null; - private LinearLayout chaptersButton = null; + private RelativeLayout chaptersButton = null; private TextView versionsTextView = null; private TextView chapterTextView = null; @@ -120,7 +129,7 @@ private void setupActionBar(){ View view = getLayoutInflater().inflate(R.layout.actionbar_custom_view, null); mActionBar = getSupportActionBar(); - chaptersButton = (LinearLayout) view.findViewById(R.id.middle_button); + chaptersButton = (RelativeLayout) view.findViewById(R.id.middle_button); mActionBar.setCustomView(view); mActionBar.setDisplayShowCustomEnabled(true); mActionBar.setDisplayShowHomeEnabled(true); @@ -129,11 +138,39 @@ private void setupActionBar(){ setupChapterButton(view); setupVersionButton(view); + setupCheckingLevelView(view); + } + + void setupCheckingLevelView(View view){ + + ImageView imageView = (ImageView) view.findViewById(R.id.checking_level_image_view); + if(this.mChapter != null){ + int checkingLevel = Integer.parseInt(mChapter.getParent(getApplicationContext()).getParent(getApplicationContext()).status.checkingLevel); + imageView.setImageResource(getCheckingLevelImage(checkingLevel)); + imageView.setVisibility(View.VISIBLE); + } + else{ + imageView.setVisibility(View.GONE); + } + } + + private int getCheckingLevelImage(int level){ + switch (level){ + case 2:{ + return R.drawable.level_two; + } + case 3:{ + return R.drawable.level_three; + } + default:{ + return R.drawable.level_one; + } + } } private void setupChapterButton(View view){ - chaptersButton = (LinearLayout) view.findViewById(R.id.middle_button); + chaptersButton = (RelativeLayout) view.findViewById(R.id.middle_button); chapterTextView = (TextView) view.findViewById(R.id.middle_button_text); if(this.mChapter != null) { chapterTextView.setText(this.mChapter.title); @@ -416,4 +453,40 @@ private void removeFragment(String fragmentId){ ft.commit(); reload(); } + + public void checkingLevelClicked(View view) { + + FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); + + CheckingLevelFragment fragment = new CheckingLevelFragment(); + fragment.show(ft, CHECKING_LEVEL_FRAGMENT_ID); + } + + static private final String CHECKING_LEVEL_FRAGMENT_ID = "CHECKING_LEVEL_FRAGMENT_ID"; + + static public class CheckingLevelFragment extends DialogFragment { + + public CheckingLevelFragment() { + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + View view = inflater.inflate(R.layout.version_footer, container, false); + + TextView tView = (TextView) view.findViewById(R.id.textView); + String versionName = BuildConfig.VERSION_NAME; + + tView.setText(versionName); + return view; + } + + @NonNull + @Override + public Dialog onCreateDialog(Bundle savedInstanceState) { + Dialog dialog = super.onCreateDialog(savedInstanceState); + dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE); + return dialog; + } + } } diff --git a/app/app/src/main/java/adapters/selectionAdapters/CollapsibleVersionAdapter.java b/app/app/src/main/java/adapters/selectionAdapters/CollapsibleVersionAdapter.java index 3d8f5ee..7a37fc9 100644 --- a/app/app/src/main/java/adapters/selectionAdapters/CollapsibleVersionAdapter.java +++ b/app/app/src/main/java/adapters/selectionAdapters/CollapsibleVersionAdapter.java @@ -1,14 +1,16 @@ package adapters.selectionAdapters; -import android.app.Activity; import android.app.AlertDialog; +import android.app.Dialog; import android.content.BroadcastReceiver; import android.content.Context; +import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; import android.graphics.Typeface; import android.os.AsyncTask; import android.os.Bundle; +import android.support.v4.app.DialogFragment; import android.support.v4.app.Fragment; import android.util.Log; import android.view.LayoutInflater; @@ -77,12 +79,15 @@ public void onReceive(Context context, Intent intent) { String itemId = extra.getString(VersionDownloadService.VERSION_ID); Log.d(TAG, itemId); } - if (intent.getAction().equals(URLUtils.VERSION_BROADCAST_DOWN_COMP)) { - Toast.makeText(context, "Download complete", Toast.LENGTH_SHORT).show(); + Toast.makeText(context, "Download Complete", Toast.LENGTH_SHORT).show(); reload(); - } else { - Toast.makeText(context, "Download error", Toast.LENGTH_SHORT).show(); + } + else if(intent.getAction().equals(URLUtils.VERSION_BROADCAST_DOWN_STOPPED)){ + Toast.makeText(context, "Download Stopped", Toast.LENGTH_SHORT).show(); + } + else { + Toast.makeText(context, "Download Error", Toast.LENGTH_SHORT).show(); } } }; @@ -129,9 +134,11 @@ public View getChildView(final int groupPosition, final int childPosition, holder.infoFrame = (FrameLayout) convertView.findViewById(R.id.info_image_frame); holder.status = (Button) convertView.findViewById(R.id.status); - holder.downloadImageView = (ImageView) convertView.findViewById(R.id.download_status_image); + holder.downloadButton = (Button) convertView.findViewById(R.id.download_status_image); holder.downloadFrame = (FrameLayout) convertView.findViewById(R.id.download_status_frame); holder.downloadProgressBar = (ProgressBar) convertView.findViewById(R.id.download_progress_bar); + holder.deleteTextFrame = (FrameLayout) convertView.findViewById(R.id.delete_row_frame); + holder.deleteTextView = (TextView) convertView.findViewById(R.id.delete_row_text); final ViewHolderForGroup finalHolder = holder; holder.infoFrame.setOnClickListener(getInfoClickListener(finalHolder, version)); @@ -147,7 +154,7 @@ public View getChildView(final int groupPosition, final int childPosition, int state = isSelected? 2 : 1; holder.downloadProgressBar.setVisibility(View.INVISIBLE); - holder.downloadImageView.setVisibility(View.VISIBLE); + holder.downloadButton.setVisibility(View.VISIBLE); state = setRowState(holder, version, state); @@ -223,18 +230,22 @@ private int setRowState(ViewHolderForGroup holder, VersionModel version, int sel case DOWNLOAD_STATE_DOWNLOADED:{ holder.status.setVisibility(View.VISIBLE); - holder.downloadImageView.setVisibility(View.VISIBLE); + holder.downloadButton.setVisibility(View.INVISIBLE); holder.downloadProgressBar.setVisibility(View.INVISIBLE); + holder.deleteTextView.setVisibility(View.VISIBLE); + holder.deleteTextFrame.setVisibility(View.VISIBLE); holder.clickableLayout.setClickable(true); holder.downloadFrame.setClickable(true); - holder.downloadImageView.setImageResource(R.drawable.x_button); holder.clickableLayout.setOnClickListener(getSelectionOnClickListener(version)); + return selectionState; } case DOWNLOAD_STATE_DOWNLOADING:{ holder.status.setVisibility(View.INVISIBLE); - holder.downloadImageView.setVisibility(View.INVISIBLE); + holder.downloadButton.setVisibility(View.INVISIBLE); holder.downloadProgressBar.setVisibility(View.VISIBLE); + holder.deleteTextFrame.setVisibility(View.INVISIBLE); + holder.deleteTextView.setVisibility(View.INVISIBLE); holder.clickableLayout.setClickable(false); holder.downloadFrame.setClickable(true); return 3; @@ -242,11 +253,12 @@ private int setRowState(ViewHolderForGroup holder, VersionModel version, int sel default:{ holder.status.setVisibility(View.INVISIBLE); - holder.downloadImageView.setVisibility(View.VISIBLE); + holder.downloadButton.setVisibility(View.VISIBLE); holder.downloadProgressBar.setVisibility(View.INVISIBLE); + holder.deleteTextFrame.setVisibility(View.INVISIBLE); + holder.deleteTextView.setVisibility(View.INVISIBLE); holder.clickableLayout.setClickable(false); holder.downloadFrame.setClickable(true); - holder.downloadImageView.setImageResource(R.drawable.download_button); return 3; } @@ -262,46 +274,115 @@ public void onClick(View view) { if (version instanceof VersionModel) { finalHolder.clickableLayout.setClickable(false); finalHolder.downloadProgressBar.setVisibility(View.VISIBLE); - finalHolder.downloadImageView.setVisibility(View.INVISIBLE); + finalHolder.downloadButton.setVisibility(View.INVISIBLE); + finalHolder.deleteTextFrame.setVisibility(View.INVISIBLE); + finalHolder.deleteTextView.setVisibility(View.INVISIBLE); if((version.downloadState == VersionModel.DOWNLOAD_STATE.DOWNLOAD_STATE_NONE) || (version.downloadState == VersionModel.DOWNLOAD_STATE.DOWNLOAD_STATE_ERROR)) { - - if (!NetWorkUtil.isConnected(getContext())) { - AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); - builder.setTitle("Alert"); - builder.setMessage("Failed connecting to the internet."); - builder.setPositiveButton("OK", null); - builder.create().show(); - } else { - // to handle new data from network - version.downloadState = VersionModel.DOWNLOAD_STATE.DOWNLOAD_STATE_DOWNLOADING; - version.save(getContext()); - Intent downloadIntent = new Intent(getContext(), VersionDownloadService.class); - downloadIntent.putExtra(VersionDownloadService.VERSION_ID, Long.toString(version.uid)); - getContext().startService(downloadIntent); - } + downloadRow(version, finalHolder); } else if(version.downloadState == VersionModel.DOWNLOAD_STATE.DOWNLOAD_STATE_DOWNLOADING){ - getContext().stopService(new Intent(getContext(), VersionDownloadService.class)); - new DeleteVersionTask().execute(version); + stopDownload(version, finalHolder); } else{ - if(Long.parseLong(UWPreferenceManager.getSelectedBibleVersion(getContext())) == version.uid){ - UWPreferenceManager.setSelectedBibleVersion(getContext(), -1); - UWPreferenceManager.setSelectedBibleChapter(getContext(), -1); - } - if(Long.parseLong(UWPreferenceManager.getSelectedStoryVersion(getContext())) == version.uid){ - UWPreferenceManager.setSelectedStoryVersion(getContext(), -1); - UWPreferenceManager.setSelectedStoryChapter(getContext(), -1); - } - new DeleteVersionTask().execute(version); + deleteRowPressed(version, finalHolder); } } } }; } + private void downloadRow(final VersionModel version, final ViewHolderForGroup finalHolder){ + + if (!NetWorkUtil.isConnected(getContext())) { + AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); + builder.setTitle("Alert"); + builder.setMessage("Failed connecting to the internet."); + builder.setPositiveButton("OK", null); + builder.create().show(); + } else { + version.downloadState = VersionModel.DOWNLOAD_STATE.DOWNLOAD_STATE_DOWNLOADING; + version.save(getContext()); + Intent downloadIntent = new Intent(getContext(), VersionDownloadService.class); + downloadIntent.putExtra(VersionDownloadService.VERSION_ID, Long.toString(version.uid)); + getContext().startService(downloadIntent); + } + } + + private void deleteRowPressed(final VersionModel version, final ViewHolderForGroup finalHolder){ + + (new DialogFragment() { + + @Override + public Dialog onCreateDialog(Bundle savedInstanceState) { + // Use the Builder class for convenient dialog construction + AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); + builder.setMessage("this will be deleted") + .setPositiveButton("OK", new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + + if(Long.parseLong(UWPreferenceManager.getSelectedBibleVersion(getContext())) == version.uid){ + UWPreferenceManager.setSelectedBibleVersion(getContext(), -1); + UWPreferenceManager.setSelectedBibleChapter(getContext(), -1); + } + if(Long.parseLong(UWPreferenceManager.getSelectedStoryVersion(getContext())) == version.uid){ + UWPreferenceManager.setSelectedStoryVersion(getContext(), -1); + UWPreferenceManager.setSelectedStoryChapter(getContext(), -1); + } + new DeleteVersionTask().execute(version); + } + }) + .setNegativeButton("cancel", new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + + reload(); + } + }); + // Create the AlertDialog object and return it + return builder.create(); + } + }).show(parentFragment.getFragmentManager(), "confirmAlert"); + } + + private void stopDownload(final VersionModel version, final ViewHolderForGroup finalHolder){ + + (new DialogFragment() { + + @Override + public Dialog onCreateDialog(Bundle savedInstanceState) { + // Use the Builder class for convenient dialog construction + AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); + builder.setMessage("Stop download?") + .setPositiveButton("OK", new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + + int state = new VersionDataSource(getContext()).getModel(Long.toString(version.uid)).verificationStatus; + if(state == VersionModel.DOWNLOAD_STATE.DOWNLOAD_STATE_DOWNLOADING.ordinal() || + state == VersionModel.DOWNLOAD_STATE.DOWNLOAD_STATE_ERROR.ordinal()) { + stopDownloadService(version); + new DeleteVersionTask().execute(version); + } + } + }) + .setNegativeButton("cancel", new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + + } + }); + // Create the AlertDialog object and return it + return builder.create(); + } + }).show(parentFragment.getFragmentManager(), "confirmAlert"); + } + + private void stopDownloadService(VersionModel version){ + + Intent downloadIntent = new Intent(getContext(), VersionDownloadService.class); + downloadIntent.putExtra(VersionDownloadService.VERSION_ID, Long.toString(version.uid)); + getContext().stopService(downloadIntent); + } + private class DeleteVersionTask extends AsyncTask { @Override @@ -477,7 +558,7 @@ private String getButtonTextForStatus(int currentStatus){ case 1: return getContext().getResources().getString(R.string.expired_button_char); case 3: - return getContext().getResources().getString(R.string.failed_button_char); + return getContext().getResources().getString(R.string.x_button_char); default: return getContext().getResources().getString(R.string.unknown_button_char); } @@ -528,9 +609,11 @@ private static class ViewHolderForGroup { FrameLayout infoFrame; Button status; - ImageView downloadImageView; + Button downloadButton; FrameLayout downloadFrame; ProgressBar downloadProgressBar; + FrameLayout deleteTextFrame; + TextView deleteTextView; } } diff --git a/app/app/src/main/java/fragments/StoryChaptersFragment.java b/app/app/src/main/java/fragments/StoryChaptersFragment.java index 9872857..51165dc 100644 --- a/app/app/src/main/java/fragments/StoryChaptersFragment.java +++ b/app/app/src/main/java/fragments/StoryChaptersFragment.java @@ -141,7 +141,6 @@ private Context getContext(){ protected ArrayList getData(){ String versionId = UWPreferenceManager.getSelectedStoryVersion(getContext()); - VersionModel version = new VersionDataSource(getContext()).getModel(versionId); ArrayList chapters = version.getChildModels( diff --git a/app/app/src/main/java/fragments/VersionSelectionFragment.java b/app/app/src/main/java/fragments/VersionSelectionFragment.java index 27a2e26..ec4611b 100644 --- a/app/app/src/main/java/fragments/VersionSelectionFragment.java +++ b/app/app/src/main/java/fragments/VersionSelectionFragment.java @@ -3,7 +3,6 @@ import android.app.Activity; import android.app.Dialog; import android.content.Context; -import android.net.Uri; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.app.DialogFragment; @@ -121,7 +120,7 @@ protected void prepareListView(View view, LayoutInflater inflater){ adapter = new CollapsibleVersionAdapter(this, this.chosenProject); if(footerView == null) { - footerView = inflater.inflate(R.layout.footerview, null); + footerView = inflater.inflate(R.layout.version_footer, null); // change version number TextView tView = (TextView) footerView.findViewById(R.id.textView); diff --git a/app/app/src/main/java/services/VersionDownloadService.java b/app/app/src/main/java/services/VersionDownloadService.java index 549a903..49621db 100644 --- a/app/app/src/main/java/services/VersionDownloadService.java +++ b/app/app/src/main/java/services/VersionDownloadService.java @@ -8,6 +8,7 @@ import android.os.IBinder; import android.os.Looper; import android.os.Message; +import android.util.Log; import org.json.JSONException; @@ -76,6 +77,7 @@ public int onStartCommand(Intent intent, int flags, int startId) { @Override public void onDestroy() { + mServiceHandler.shouldStop = true; super.onDestroy(); } @@ -84,6 +86,7 @@ public ServiceHandler(Looper looper) { super(looper); } + public boolean shouldStop = false; @Override public void handleMessage(Message msg) { @@ -95,6 +98,12 @@ public void handleMessage(Message msg) { for(BookModel book : books){ + if(shouldStop){ + Log.i(TAG, "download Stopped"); + getApplicationContext().sendBroadcast(new Intent(URLUtils.VERSION_BROADCAST_DOWN_STOPPED).putExtra(VERSION_ID, versionId)); + return; + } + if(book.sourceUrl.contains("usfm")){ UWDataParser.getInstance(getApplicationContext()).updateUSFMForBook(book); } @@ -102,6 +111,9 @@ public void handleMessage(Message msg) { UWDataParser.getInstance(getApplicationContext()).updateStoryChapters(book, false); } } + if(shouldStop){ + return; + } desiredVersion = UWDataParser.getInstance(getApplicationContext()).updateVersionVerificationStatus(desiredVersion); desiredVersion.downloadState = VersionModel.DOWNLOAD_STATE.DOWNLOAD_STATE_DOWNLOADED; desiredVersion.getDataSource(getApplicationContext()).createOrUpdateDatabaseModel(desiredVersion); @@ -116,5 +128,13 @@ public void handleMessage(Message msg) { getApplicationContext().sendBroadcast(new Intent(URLUtils.VERSION_BROADCAST_DOWN_COMP).putExtra(VERSION_ID, versionId)); } + + + } + + @Override + public void onTaskRemoved(Intent rootIntent) { + super.onTaskRemoved(rootIntent); + Log.i(TAG, "removed"); } } diff --git a/app/app/src/main/java/utils/URLUtils.java b/app/app/src/main/java/utils/URLUtils.java index 58f15f5..877a2fb 100644 --- a/app/app/src/main/java/utils/URLUtils.java +++ b/app/app/src/main/java/utils/URLUtils.java @@ -9,6 +9,7 @@ public class URLUtils { public static final String BROAD_CAST_DOWN_ERROR = "org.unfoldingword.mobile.DOWNLOAD_WHILE_ERROR"; public static final String VERSION_BROADCAST_DOWN_COMP = "org.unfoldingword.mobile.VERSION_DOWNLOAD_COMPLETED"; + public static final String VERSION_BROADCAST_DOWN_STOPPED = "org.unfoldingword.mobile.VERSION_DOWNLOAD_WHILE_STOPPED"; public static final String VERSION_BROADCAST_DOWN_ERROR = "org.unfoldingword.mobile.VERSION_DOWNLOAD_WHILE_ERROR"; diff --git a/app/app/src/main/res/drawable-hdpi/level_tree.png b/app/app/src/main/res/drawable-hdpi/level_three.png similarity index 100% rename from app/app/src/main/res/drawable-hdpi/level_tree.png rename to app/app/src/main/res/drawable-hdpi/level_three.png diff --git a/app/app/src/main/res/drawable-hdpi/status_error_btn_radio_on_holo_light.png b/app/app/src/main/res/drawable-hdpi/status_error_btn_radio_on_holo_light.png old mode 100644 new mode 100755 diff --git a/app/app/src/main/res/drawable-hdpi/status_expired_btn_radio_on_holo_light.png b/app/app/src/main/res/drawable-hdpi/status_expired_btn_radio_on_holo_light.png old mode 100644 new mode 100755 diff --git a/app/app/src/main/res/drawable-hdpi/status_failed_btn_radio_on_holo_light.png b/app/app/src/main/res/drawable-hdpi/status_failed_btn_radio_on_holo_light.png old mode 100644 new mode 100755 diff --git a/app/app/src/main/res/drawable-hdpi/status_verified_btn_radio_on_holo_light.png b/app/app/src/main/res/drawable-hdpi/status_verified_btn_radio_on_holo_light.png old mode 100644 new mode 100755 diff --git a/app/app/src/main/res/drawable-hdpi/x_button.png b/app/app/src/main/res/drawable-hdpi/x_button.png index 0098e14f08481d1d4da0e4afc232a0067bfd665b..75f5f4ba226928c3a94c71805e609e11f2401085 100644 GIT binary patch literal 3702 zcmY*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Ku#{Wp8fn8YRyz*=RaRH)s0k!% z^+_=VbA05s+;N=a8jH9bD&m@S3#{6o)u3}zw$0ulV+Cu)G&zC$bmpxTNR(2-L!H%8 z`6`c>`X5Db53`6xm4Ax;LDa)6$_YfTyW&U(d-HCX`XTa^qsUF3XRTt)+uAyj>Npg( z5zpX$nz_4cuGcXkpz*ZddSg4Lud>J(g7v>xR|lN8HcK zL%U^*Ay=_6BtI7W|w?6X{ejX8sG7I&|7kB{_Xt eWHo>F`Sl;b&!Ag5LHz;%0000 + + + + + + \ No newline at end of file diff --git a/app/app/src/main/res/drawable/group_indicator.xml b/app/app/src/main/res/drawable/group_indicator.xml new file mode 100644 index 0000000..73e8fcf --- /dev/null +++ b/app/app/src/main/res/drawable/group_indicator.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/app/app/src/main/res/drawable/indicator_arrow_down.9.png b/app/app/src/main/res/drawable/indicator_arrow_down.9.png new file mode 100755 index 0000000000000000000000000000000000000000..7b5c53fbbc48a77e5a6ad9f5c3a710dbc50627ba GIT binary patch literal 716 zcmV;-0yF)IP)=yR=U~djR#|Ux}wC5{XeT zv?4pH(g0*D5{W!=aFhx*HV&I#3_zGy;AcG+i~0ZBaMNm_2RM`$p-2Oympj@w1!=26 z?L++Rik%wmBBnlzFU@X=q9Fy!uVCaH0BMMFi1&o?znzp%CX<2y8w7594(^>C5^xiCrEc2J{4goPqvX z3&wN?0ALzA1XQCQ=EvCJl#Rk{`-ahAIK|*JN(SDq@O;_~6aYWLe-#O6X4w^LU|y=X ztJfY=dIC-k1Q?}``8)G*#r%^1S~A5C zkL_o%SRAv-kfR1c35UZ22;dDPqgZUo2&8Jt)USTOf257t)^^vTmdoWq09XYeBQtej zaRh@K!C-Kx&0D}xE2YSN`GK(|8AgCCioFi1zvKRnj{6a3bIeAh{7b$&>?~YqI*nR3 y;Zm#PYA5V!L+E`tc%VE`9;o~F*lv3j1s9sK%JZb0000i$0A2 literal 0 HcmV?d00001 diff --git a/app/app/src/main/res/drawable/indicator_arrow_right.9.png b/app/app/src/main/res/drawable/indicator_arrow_right.9.png new file mode 100755 index 0000000000000000000000000000000000000000..e38e9858a3ff79786c75093b3c92bb3db182eb59 GIT binary patch literal 703 zcmV;w0zmzVP)WqX-rvYo(>FA{Md=TPz66HoIF{+iD}) zEDHVsK@<@LD>3_#WPQ%{jHENUndRidFgKIpKD=|zJLgOy@%P#L&+z$-^)25Y^+rC< z6U-cWqtQqfi^X%*YIQxI&mUtcG!`jw5U9J1U(IH-&-}7fDxF~cfF)E=uh(w_v(4D$ zeNd@XmQ=0K3`$g~)oKeU^&7Aqnfd)d{|hXj5~_%RJw>UZC34!u~w_K((QJS#8Av@fe_+Z7lGPyU?{d6!^6Bn1$rFalfW0NU>-6*(ya_E zp#D9m^aP-RC??7g_}8qVoK + + + + \ No newline at end of file diff --git a/app/app/src/main/res/layout/actionbar_custom_view.xml b/app/app/src/main/res/layout/actionbar_custom_view.xml index 6d6bc1e..d1e8051 100644 --- a/app/app/src/main/res/layout/actionbar_custom_view.xml +++ b/app/app/src/main/res/layout/actionbar_custom_view.xml @@ -3,7 +3,7 @@ android:layout_width="wrap_content" android:layout_height="30dp"> - + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" + android:layout_toLeftOf="@+id/checking_level_image_view" + android:layout_toStartOf="@+id/checking_level_image_view" + android:gravity="center"> + android:layout_gravity="center_vertical" + android:layout_centerVertical="true" /> - + android:layout_toRightOf="@+id/middle_button_text" + android:layout_centerVertical="true" /> + + + + diff --git a/app/app/src/main/res/layout/fragment_version_selection.xml b/app/app/src/main/res/layout/fragment_version_selection.xml index 4ca893a..fcdffcf 100644 --- a/app/app/src/main/res/layout/fragment_version_selection.xml +++ b/app/app/src/main/res/layout/fragment_version_selection.xml @@ -3,11 +3,11 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/very_dark_gray" + android:background="@color/light_gray" > + android:layout_height="match_parent" + android:childDivider="@color/light_gray" + android:dividerHeight="2dp" + android:divider="@color/light_gray" + android:groupIndicator="@drawable/group_indicator" + > \ No newline at end of file diff --git a/app/app/src/main/res/layout/popup_horizontal.xml b/app/app/src/main/res/layout/popup_horizontal.xml index 3f05475..3fa6b24 100755 --- a/app/app/src/main/res/layout/popup_horizontal.xml +++ b/app/app/src/main/res/layout/popup_horizontal.xml @@ -36,6 +36,6 @@ android:layout_height="wrap_content" android:layout_below="@id/scroller" android:layout_marginTop="-4dip" - android:src="@drawable/arrow_down" /> + android:src="@drawable/indicator_arrow_down" /> \ No newline at end of file diff --git a/app/app/src/main/res/layout/popup_vertical.xml b/app/app/src/main/res/layout/popup_vertical.xml index 9c0a4a0..71d579a 100755 --- a/app/app/src/main/res/layout/popup_vertical.xml +++ b/app/app/src/main/res/layout/popup_vertical.xml @@ -36,6 +36,6 @@ android:layout_height="wrap_content" android:layout_below="@id/scroller" android:layout_marginTop="-4dip" - android:src="@drawable/arrow_down" /> + android:src="@drawable/indicator_arrow_down" /> \ No newline at end of file diff --git a/app/app/src/main/res/layout/row_group.xml b/app/app/src/main/res/layout/row_group.xml index eefc3d5..0e6e1a0 100644 --- a/app/app/src/main/res/layout/row_group.xml +++ b/app/app/src/main/res/layout/row_group.xml @@ -2,14 +2,15 @@ - - - - -