From e7753fddec545a4e28186bc2d4d8fe844de30175 Mon Sep 17 00:00:00 2001 From: seven332 Date: Sun, 18 May 2014 03:04:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20ModifyTag=20=E6=97=B6?= =?UTF-8?q?=E6=96=B0=E5=8A=A0=20advance=20=E6=97=B6=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ehviewer/activity/MangaListActivity.java | 104 +++++++++--------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/src/com/hippo/ehviewer/activity/MangaListActivity.java b/src/com/hippo/ehviewer/activity/MangaListActivity.java index 945bfc951..1ae60b932 100644 --- a/src/com/hippo/ehviewer/activity/MangaListActivity.java +++ b/src/com/hippo/ehviewer/activity/MangaListActivity.java @@ -804,7 +804,6 @@ public class MangaListActivity extends SlidingActivity else checkImageMisc.setChecked(false); - EditText et = (EditText)view.findViewById(R.id.search_text); et.setText(listUrls.getSearch()); @@ -830,59 +829,60 @@ public class MangaListActivity extends SlidingActivity .findViewById(R.id.checkbox_sh); int advType = listUrls.getAdvanceType(); + if (advType != -1) { + if ((advType & ListUrls.SNAME) == 0) + checkImageSname.setChecked(false); + else + checkImageSname.setChecked(true); + if ((advType & ListUrls.STAGS) == 0) + checkImageStags.setChecked(false); + else + checkImageStags.setChecked(true); + if ((advType & ListUrls.SDESC) == 0) + checkImageSdesc.setChecked(false); + else + checkImageSdesc.setChecked(true); + if ((advType & ListUrls.STORR) == 0) + checkImageStorr.setChecked(false); + else + checkImageStorr.setChecked(true); + if ((advType & ListUrls.STO) == 0) + checkImageSto.setChecked(false); + else + checkImageSto.setChecked(true); + if ((advType & ListUrls.STD1) == 0) + checkImageSdt1.setChecked(false); + else + checkImageSdt1.setChecked(true); + if ((advType & ListUrls.STD2) == 0) + checkImageSdt2.setChecked(false); + else + checkImageSdt2.setChecked(true); + if ((advType & ListUrls.SH) == 0) + checkImageSh.setChecked(false); + else + checkImageSh.setChecked(true); + + // MinRating + CheckBox checkImageSr = (CheckBox) view + .findViewById(R.id.checkbox_sr); + if (listUrls.isMinRating()) + checkImageSr.setChecked(true); + else + checkImageSr.setChecked(false); + Spinner spinnerMinRating = (Spinner) view + .findViewById(R.id.spinner_min_rating); + int index; + if (listUrls.getMinRating() == -1) + index = 0; + else + index = listUrls.getMinRating() - 2; + spinnerMinRating.setSelection(index); + } - if ((advType & ListUrls.SNAME) == 0) - checkImageSname.setChecked(false); - else - checkImageSname.setChecked(true); - if ((advType & ListUrls.STAGS) == 0) - checkImageStags.setChecked(false); - else - checkImageStags.setChecked(true); - if ((advType & ListUrls.SDESC) == 0) - checkImageSdesc.setChecked(false); - else - checkImageSdesc.setChecked(true); - if ((advType & ListUrls.STORR) == 0) - checkImageStorr.setChecked(false); - else - checkImageStorr.setChecked(true); - if ((advType & ListUrls.STO) == 0) - checkImageSto.setChecked(false); - else - checkImageSto.setChecked(true); - if ((advType & ListUrls.STD1) == 0) - checkImageSdt1.setChecked(false); - else - checkImageSdt1.setChecked(true); - if ((advType & ListUrls.STD2) == 0) - checkImageSdt2.setChecked(false); - else - checkImageSdt2.setChecked(true); - if ((advType & ListUrls.SH) == 0) - checkImageSh.setChecked(false); - else - checkImageSh.setChecked(true); - - // MinRating - CheckBox checkImageSr = (CheckBox) view - .findViewById(R.id.checkbox_sr); - if (listUrls.isMinRating()) - checkImageSr.setChecked(true); - else - checkImageSr.setChecked(false); - Spinner spinnerMinRating = (Spinner) view - .findViewById(R.id.spinner_min_rating); - int index; - if (listUrls.getMinRating() == -1) - index = 0; - else - index = listUrls.getMinRating() - 2; - spinnerMinRating.setSelection(index); - - // Hide advance if need + // Show advance if need final View advance = view.findViewById(R.id.filter_advance); - if (cb.isChecked()) + if (listUrls.isAdvance()) advance.setVisibility(View.VISIBLE); }