From faef785fc3d5d7a3769bbafe475200e23a05592a Mon Sep 17 00:00:00 2001 From: inorichi Date: Mon, 2 Nov 2015 14:42:08 +0100 Subject: [PATCH] Add multiple chapters selection and allow to mark them as read/unread --- app/build.gradle | 1 + .../presenter/MangaChaptersPresenter.java | 21 ++++ .../mangafeed/ui/adapter/ChaptersAdapter.java | 52 +++++++++ .../ui/fragment/MangaChaptersFragment.java | 105 ++++++++++++++++-- .../ui/holder/ChapterListHolder.java | 60 ---------- .../mangafeed/ui/holder/ChaptersHolder.java | 74 ++++++++++++ .../res/drawable-hdpi/ic_action_done_all.png | Bin 0 -> 282 bytes .../drawable-hdpi/ic_action_select_all.png | Bin 0 -> 222 bytes .../drawable-hdpi/ic_action_undone_all.png | Bin 0 -> 648 bytes .../res/drawable-mdpi/ic_action_done_all.png | Bin 0 -> 213 bytes .../drawable-mdpi/ic_action_select_all.png | Bin 0 -> 141 bytes .../drawable-mdpi/ic_action_undone_all.png | Bin 0 -> 404 bytes .../drawable-v21/selector_chapter_light.xml | 14 +++ .../res/drawable-xhdpi/ic_action_done_all.png | Bin 0 -> 307 bytes .../drawable-xhdpi/ic_action_select_all.png | Bin 0 -> 198 bytes .../drawable-xhdpi/ic_action_undone_all.png | Bin 0 -> 816 bytes .../drawable-xxhdpi/ic_action_done_all.png | Bin 0 -> 399 bytes .../drawable-xxhdpi/ic_action_select_all.png | Bin 0 -> 284 bytes .../drawable-xxhdpi/ic_action_undone_all.png | Bin 0 -> 1251 bytes .../drawable-xxxhdpi/ic_action_done_all.png | Bin 0 -> 476 bytes .../drawable-xxxhdpi/ic_action_select_all.png | Bin 0 -> 318 bytes .../drawable-xxxhdpi/ic_action_undone_all.png | Bin 0 -> 1564 bytes .../res/drawable/selector_chapter_light.xml | 10 ++ app/src/main/res/layout/item_chapter.xml | 8 +- app/src/main/res/menu/chapter_selection.xml | 21 ++++ app/src/main/res/values/colors.xml | 1 + app/src/main/res/values/strings.xml | 7 +- app/src/main/res/values/styles.xml | 1 + build.gradle | 3 +- 29 files changed, 299 insertions(+), 79 deletions(-) create mode 100644 app/src/main/java/eu/kanade/mangafeed/ui/adapter/ChaptersAdapter.java delete mode 100644 app/src/main/java/eu/kanade/mangafeed/ui/holder/ChapterListHolder.java create mode 100644 app/src/main/java/eu/kanade/mangafeed/ui/holder/ChaptersHolder.java create mode 100644 app/src/main/res/drawable-hdpi/ic_action_done_all.png create mode 100644 app/src/main/res/drawable-hdpi/ic_action_select_all.png create mode 100644 app/src/main/res/drawable-hdpi/ic_action_undone_all.png create mode 100644 app/src/main/res/drawable-mdpi/ic_action_done_all.png create mode 100644 app/src/main/res/drawable-mdpi/ic_action_select_all.png create mode 100644 app/src/main/res/drawable-mdpi/ic_action_undone_all.png create mode 100644 app/src/main/res/drawable-v21/selector_chapter_light.xml create mode 100644 app/src/main/res/drawable-xhdpi/ic_action_done_all.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_action_select_all.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_action_undone_all.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_action_done_all.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_action_select_all.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_action_undone_all.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_action_done_all.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_action_select_all.png create mode 100644 app/src/main/res/drawable-xxxhdpi/ic_action_undone_all.png create mode 100644 app/src/main/res/drawable/selector_chapter_light.xml create mode 100644 app/src/main/res/menu/chapter_selection.xml diff --git a/app/build.gradle b/app/build.gradle index eb52dbd0d5..65c8eb77cf 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -88,6 +88,7 @@ dependencies { compile "frankiesardo:icepick:$ICEPICK_VERSION" provided "frankiesardo:icepick-processor:$ICEPICK_VERSION" compile 'com.github.dmytrodanylyk.android-process-button:library:1.0.4' + compile 'eu.davidea:flexible-adapter:4.0.1@aar' compile "com.google.dagger:dagger:$DAGGER_VERSION" apt "com.google.dagger:dagger-compiler:$DAGGER_VERSION" diff --git a/app/src/main/java/eu/kanade/mangafeed/presenter/MangaChaptersPresenter.java b/app/src/main/java/eu/kanade/mangafeed/presenter/MangaChaptersPresenter.java index 3e676d5607..ad83d3d0b6 100644 --- a/app/src/main/java/eu/kanade/mangafeed/presenter/MangaChaptersPresenter.java +++ b/app/src/main/java/eu/kanade/mangafeed/presenter/MangaChaptersPresenter.java @@ -18,6 +18,7 @@ import eu.kanade.mangafeed.ui.fragment.MangaChaptersFragment; import eu.kanade.mangafeed.util.EventBusHook; import eu.kanade.mangafeed.util.PostResult; import rx.Observable; +import rx.Subscription; import rx.android.schedulers.AndroidSchedulers; import rx.schedulers.Schedulers; @@ -32,6 +33,8 @@ public class MangaChaptersPresenter extends BasePresenter private static final int DB_CHAPTERS = 1; private static final int ONLINE_CHAPTERS = 2; + private Subscription menuOperationSubscription; + @Override protected void onCreate(Bundle savedState) { super.onCreate(savedState); @@ -106,4 +109,22 @@ public class MangaChaptersPresenter extends BasePresenter public void onChapterClicked(Chapter chapter) { EventBus.getDefault().postSticky(new SourceChapterEvent(source, chapter)); } + + public void markChaptersRead(Observable selectedChapters, boolean read) { + if (menuOperationSubscription != null) + remove(menuOperationSubscription); + + add(menuOperationSubscription = selectedChapters + .subscribeOn(Schedulers.io()) + .map(chapter -> { + chapter.read = read; + return chapter; + }) + .toList() + .flatMap(db::insertChapters) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(result -> { + + })); + } } diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/adapter/ChaptersAdapter.java b/app/src/main/java/eu/kanade/mangafeed/ui/adapter/ChaptersAdapter.java new file mode 100644 index 0000000000..d98e1b86a2 --- /dev/null +++ b/app/src/main/java/eu/kanade/mangafeed/ui/adapter/ChaptersAdapter.java @@ -0,0 +1,52 @@ +package eu.kanade.mangafeed.ui.adapter; + +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import java.util.ArrayList; +import java.util.List; + +import eu.davidea.flexibleadapter.FlexibleAdapter; +import eu.kanade.mangafeed.R; +import eu.kanade.mangafeed.data.models.Chapter; +import eu.kanade.mangafeed.ui.fragment.base.BaseFragment; +import eu.kanade.mangafeed.ui.holder.ChaptersHolder; + +public class ChaptersAdapter extends FlexibleAdapter { + + private Context context; + public OnItemClickListener clickListener; + + public ChaptersAdapter(BaseFragment fragment) { + this.context = fragment.getActivity(); + mItems = new ArrayList<>(); + clickListener = (OnItemClickListener) fragment; + } + + @Override + public void updateDataSet(String param) {} + + @Override + public ChaptersHolder onCreateViewHolder(ViewGroup parent, int viewType) { + View v = LayoutInflater.from(context).inflate(R.layout.item_chapter, parent, false); + return new ChaptersHolder(v, this); + } + + @Override + public void onBindViewHolder(ChaptersHolder holder, int position) { + final Chapter chapter = getItem(position); + holder.onSetValues(context, chapter); + } + + public void setItems(List chapters) { + mItems = chapters; + notifyDataSetChanged(); + } + + public interface OnItemClickListener { + boolean onListItemClick(int position); + void onListItemLongClick(int position); + } +} diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/fragment/MangaChaptersFragment.java b/app/src/main/java/eu/kanade/mangafeed/ui/fragment/MangaChaptersFragment.java index b58153cde8..f2d94f7b91 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/fragment/MangaChaptersFragment.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/fragment/MangaChaptersFragment.java @@ -4,6 +4,7 @@ import android.content.Intent; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.widget.SwipeRefreshLayout; +import android.support.v7.view.ActionMode; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; @@ -22,18 +23,22 @@ import eu.kanade.mangafeed.data.models.Chapter; import eu.kanade.mangafeed.presenter.MangaChaptersPresenter; import eu.kanade.mangafeed.ui.activity.MangaDetailActivity; import eu.kanade.mangafeed.ui.activity.ReaderActivity; -import eu.kanade.mangafeed.ui.holder.ChapterListHolder; +import eu.kanade.mangafeed.ui.activity.base.BaseActivity; +import eu.kanade.mangafeed.ui.adapter.ChaptersAdapter; import eu.kanade.mangafeed.ui.fragment.base.BaseRxFragment; import nucleus.factory.RequiresPresenter; -import uk.co.ribot.easyadapter.EasyRecyclerAdapter; +import rx.Observable; @RequiresPresenter(MangaChaptersPresenter.class) -public class MangaChaptersFragment extends BaseRxFragment { +public class MangaChaptersFragment extends BaseRxFragment implements + ActionMode.Callback, ChaptersAdapter.OnItemClickListener { @Bind(R.id.chapter_list) RecyclerView chapters; @Bind(R.id.swipe_refresh) SwipeRefreshLayout swipeRefresh; - private EasyRecyclerAdapter adapter; + private ChaptersAdapter adapter; + + private ActionMode actionMode; public static Fragment newInstance() { return new MangaChaptersFragment(); @@ -76,13 +81,7 @@ public class MangaChaptersFragment extends BaseRxFragment { - getPresenter().onChapterClicked(chapter); - Intent intent = ReaderActivity.newInstance(getActivity()); - startActivity(intent); - }; - - adapter = new EasyRecyclerAdapter<>(getActivity(), ChapterListHolder.class, listener); + adapter = new ChaptersAdapter(this); chapters.setAdapter(adapter); } @@ -92,6 +91,7 @@ public class MangaChaptersFragment extends BaseRxFragment chapters) { adapter.setItems(chapters); + closeActionMode(); } public void onNextOnlineChapters() { @@ -105,4 +105,87 @@ public class MangaChaptersFragment extends BaseRxFragment getSelectedChapters() { + return Observable.from(adapter.getSelectedItems()) + .map(adapter::getItem); + } + + public void closeActionMode() { + if (actionMode != null) + actionMode.finish(); + } + + @Override + public boolean onListItemClick(int position) { + if (actionMode != null && adapter.getMode() == ChaptersAdapter.MODE_MULTI) { + toggleSelection(position); + return true; + } else { + getPresenter().onChapterClicked(adapter.getItem(position)); + Intent intent = ReaderActivity.newInstance(getActivity()); + startActivity(intent); + return false; + } + } + + @Override + public void onListItemLongClick(int position) { + if (actionMode == null) + actionMode = ((BaseActivity)getActivity()).startSupportActionMode(this); + + toggleSelection(position); + } + + private void toggleSelection(int position) { + adapter.toggleSelection(position, false); + + int count = adapter.getSelectedItemCount(); + + if (count == 0) { + actionMode.finish(); + } else { + setContextTitle(count); + actionMode.invalidate(); + } + } + + private void setContextTitle(int count) { + actionMode.setTitle(getString(R.string.selected_chapters_title, count)); + } } diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/holder/ChapterListHolder.java b/app/src/main/java/eu/kanade/mangafeed/ui/holder/ChapterListHolder.java deleted file mode 100644 index 1b273d311f..0000000000 --- a/app/src/main/java/eu/kanade/mangafeed/ui/holder/ChapterListHolder.java +++ /dev/null @@ -1,60 +0,0 @@ -package eu.kanade.mangafeed.ui.holder; - -import android.graphics.Color; -import android.support.v4.content.ContextCompat; -import android.view.View; -import android.widget.ImageView; -import android.widget.TextView; - -import eu.kanade.mangafeed.R; -import eu.kanade.mangafeed.data.models.Chapter; -import uk.co.ribot.easyadapter.ItemViewHolder; -import uk.co.ribot.easyadapter.PositionInfo; -import uk.co.ribot.easyadapter.annotations.LayoutId; -import uk.co.ribot.easyadapter.annotations.ViewId; - -@LayoutId(R.layout.item_chapter) -public class ChapterListHolder extends ItemViewHolder { - - @ViewId(R.id.chapter_title) TextView title; - @ViewId(R.id.chapter_download_image) ImageView download_icon; - @ViewId(R.id.chapter_pages) TextView pages; - - View view; - - public ChapterListHolder(View view) { - super(view); - this.view = view; - } - - public void onSetValues(Chapter chapter, PositionInfo positionInfo) { - title.setText(chapter.name); - download_icon.setImageResource(R.drawable.ic_file_download_black_48dp); - - if (chapter.read) { - title.setTextColor(ContextCompat.getColor(getContext(), R.color.chapter_read_text)); - } else { - title.setTextColor(Color.BLACK); - } - - if (chapter.last_page_read > 0 && !chapter.read) { - pages.setText(getContext().getString(R.string.chapter_progress, chapter.last_page_read+1)); - } else { - pages.setText(""); - } - } - - @Override - public void onSetListeners() { - view.setOnClickListener(view -> { - ChapterListener listener = getListener(ChapterListener.class); - if (listener != null) { - listener.onRowClicked(getItem()); - } - }); - } - - public interface ChapterListener { - void onRowClicked(Chapter chapter); - } -} diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/holder/ChaptersHolder.java b/app/src/main/java/eu/kanade/mangafeed/ui/holder/ChaptersHolder.java new file mode 100644 index 0000000000..a904e74e78 --- /dev/null +++ b/app/src/main/java/eu/kanade/mangafeed/ui/holder/ChaptersHolder.java @@ -0,0 +1,74 @@ +package eu.kanade.mangafeed.ui.holder; + +import android.content.Context; +import android.graphics.Color; +import android.support.v4.content.ContextCompat; +import android.support.v7.widget.RecyclerView; +import android.view.View; +import android.widget.ImageView; +import android.widget.TextView; + +import butterknife.Bind; +import butterknife.ButterKnife; +import eu.kanade.mangafeed.R; +import eu.kanade.mangafeed.data.models.Chapter; +import eu.kanade.mangafeed.ui.adapter.ChaptersAdapter; + +public class ChaptersHolder extends RecyclerView.ViewHolder implements + View.OnClickListener, View.OnLongClickListener { + + private ChaptersAdapter adapter; + + @Bind(R.id.chapter_title) TextView title; + @Bind(R.id.chapter_download_image) ImageView download_icon; + @Bind(R.id.chapter_pages) TextView pages; + + public ChaptersHolder(View view) { + super(view); + ButterKnife.bind(this, view); + } + + public ChaptersHolder(View view, final ChaptersAdapter adapter) { + this(view); + + this.adapter = adapter; + itemView.setOnClickListener(this); + itemView.setOnLongClickListener(this); + } + + public void onSetValues(Context context, Chapter chapter) { + title.setText(chapter.name); + download_icon.setImageResource(R.drawable.ic_file_download_black_48dp); + + if (chapter.read) { + title.setTextColor(ContextCompat.getColor(context, R.color.chapter_read_text)); + } else { + title.setTextColor(Color.BLACK); + } + + if (chapter.last_page_read > 0 && !chapter.read) { + pages.setText(context.getString(R.string.chapter_progress, chapter.last_page_read + 1)); + } else { + pages.setText(""); + } + + toggleActivation(); + } + + private void toggleActivation() { + itemView.setActivated(adapter.isSelected(getAdapterPosition())); + } + + @Override + public void onClick(View v) { + if (adapter.clickListener.onListItemClick(getAdapterPosition())) + toggleActivation(); + } + + @Override + public boolean onLongClick(View v) { + adapter.clickListener.onListItemLongClick(getAdapterPosition()); + toggleActivation(); + return true; + } +} diff --git a/app/src/main/res/drawable-hdpi/ic_action_done_all.png b/app/src/main/res/drawable-hdpi/ic_action_done_all.png new file mode 100644 index 0000000000000000000000000000000000000000..90c28786fc025b86b80fc100318fce30343dbdfc GIT binary patch literal 282 zcmV+#0pm>P17xks5XZiCbqIZBLirH(O9P-E^AVGK}m(|=bK5&!?I|FeNvO8*}cYYf-_ zy+Da?2&4W7{Qm_M*#tLgKT)3gF9S^S|B;RQ-vCt(H3}mY;|iPq3K&K;L$z#%8AW6e z6Ecc~n8IV!mjC=DMK~U#-jkSa@EApM@`D+5^*=M3Q6v{#Afup}0m-Nuatc!gNDfC5 gu^+9eMgai;0J~VYF;`iTod5s;07*qoM6N<$g7*n=0ssI2 literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-hdpi/ic_action_select_all.png b/app/src/main/res/drawable-hdpi/ic_action_select_all.png new file mode 100644 index 0000000000000000000000000000000000000000..20f0ee821b2962a2612f2e115a434418b3d78cc7 GIT binary patch literal 222 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k0wldT1B8LpQcoAhkcwMxryk^OP~dSbHRxbo zU|cHCzwSUn`@6ANPM-)?2f|`Ig(+{Y5f6&6ta>r@f6b*u*=hLo%q8=~m6f V+c&q12mu|;;OXk;vd$@?2>>yyQHKBk literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-hdpi/ic_action_undone_all.png b/app/src/main/res/drawable-hdpi/ic_action_undone_all.png new file mode 100644 index 0000000000000000000000000000000000000000..a5c8b2bfdaea1ece9fa0efcf793dc461da4292f7 GIT binary patch literal 648 zcmV;30(bq1P)0As+rP%|Aj0UQISV)JHp zC&EXN)yx7CPMPFU0Idwc6+GO#D{nip^2NFCebPROaGy(o%4RlQZ2#G6e$^J}rnBwncMg;MWuC+hV`iOBJI5~}*x zIk&yki=ybO+==@9Jtz^8!SGN$0S;I7Mx)VVX4io)z*w!!mx#z<{76-C&TSWwv$Zsz iNF)-8L?V%>2R{Li9yxx**`yQz00004`@?Vp%^63A6{x?9Cum1nxzd3&8Q9$MY|JOs6|0kf~eemY)InMN|928pK9T?c3fmdKI;Vst00<8-3;+NC literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-mdpi/ic_action_undone_all.png b/app/src/main/res/drawable-mdpi/ic_action_undone_all.png new file mode 100644 index 0000000000000000000000000000000000000000..093b1af9ef598e71abe0ef50fab0c7209ca6a352 GIT binary patch literal 404 zcmV;F0c-w=P)6J{pePnWuw6kx&=6LDAxL=XJ$FWw)N~Et+oXL9|MbJYYs2KpkhmjxcQj{>Ofy{`oLbKD%* z$N~@AM{)B6KGB|Sb721u?X8)#7e%oO+^gzkI&Zhz+kmsyZiWI|z$;KUW^&+)nYF9x zN!Z|9RgaU6AH&Dr;+=NR)e`Nkxo8iMMl+Nc#uCoCb)W}$Regyi=AwN%-unu03j6?H zB64AjF`Z6l1$c-ifStK$|EI)t*zC(%dzh5y1?YR$)9#$BipW*e8#kQ#9fNFF&6tUa yx~iUe?<;X0Ox$IAWTs1`@N}LXUZzZ$h0iZg=%Va4=aSR_0000 + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-xhdpi/ic_action_done_all.png b/app/src/main/res/drawable-xhdpi/ic_action_done_all.png new file mode 100644 index 0000000000000000000000000000000000000000..a592962597a853a8b37d4c4e8c2453592918933f GIT binary patch literal 307 zcmV-30nGl1P)ws5$OZ=s8^#W0ip+7MgRlc zf3NQ-qPLXRoACajKP#c{G4yC*hkn6)g=u`<#ihLd=r6cs6Ih2Evk7T^Ez}2iG=XKj znI^_1?me7%AxXf-GoK(SnWL3Wkn<3Ia#9KNbE1S^CQ(u^nqcU239B%1Wxlln3GPQh zDB<#c=1F2grb&XQCy9Ax`cClmQDRXrwXv;4uhD1};{^e3>drT~PBj1k002ovPDHLk FV1lQ%gfIXA literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/ic_action_select_all.png b/app/src/main/res/drawable-xhdpi/ic_action_select_all.png new file mode 100644 index 0000000000000000000000000000000000000000..aade8fa891f28a226a851332ead397d708935631 GIT binary patch literal 198 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA0wn)(8}b0DUQZXtkcwMxr+f1?DDbe__CEZ! zg58+qhJCEWU5|}5i`4SVcsDXfOyOfz>}@>AQt!sz|G0zI&F_5(=ldjejc+#>M=_kq zY|K~U(Ala#zv+ngnTb{NnD#2DU+D`D*#A7ru~0PdfYINBmJgo)+WVie@?o5ab$s3T wZwp%we9LtR>nZ9tj`t4XW?D02-UKDHFrHT#bsoRJ0UgHR>FVdQ&MBb@0BhPyDF6Tf literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/ic_action_undone_all.png b/app/src/main/res/drawable-xhdpi/ic_action_undone_all.png new file mode 100644 index 0000000000000000000000000000000000000000..3d5a26b5014b25c4bddc338f49ccd54e527880db GIT binary patch literal 816 zcmV-01JC@4P)C=^<>ND|X>+T4N5<-YMp>dff(vz^1t_uTI}m-nWlLs1k(Q4~c{6h%=KMN!(C zTCH}V*)wb_<#PD~$@|mO(?{0R7K_DG03O6~e0(=%+i?I~2k-^J3V^58YV~NA))>VA>edyPLCaJ0x!an6-v#0Dg$bSV(J($y@WQR{IygJ7Y|Kx98p#M5G_USI2w} zz%t2kUrVxwaU7p%mWM54&CmLq z7m?v4NxEGv$sTKd)zSU|z_v7RWAAT%ndG>?d29Z4VDkjf*DMcPMq{tB-&pKJxBb3| zeW_GBPZIkw_QsgJHNQ7vAII^bpCaseai{tn*$%lap@3jAW_1Kd5h>TPPF`+9WLchY+fRH9yf3w|yfT)L~vk27LWS>Hwh6 z8f~rEXOSdHH-JGKPj}!C0B*Tjn}pk0b#TnP-?i21G9B*`_1CjVF|!U6h()#^j;m>EB09=NzzSnh~$v}Z13aL;nkinUnh#9TogsQ ujp~gthjwxvMNt$*Q4~c{6h%=KCBQ#Odrdb2DG5OcCk+{bgs#<<+U8!g(fFR`sUa!H920=8pk%&#3Hv+Z!QWSrvYBkk2LPUwMl*l)K|oWs@8=P;?@ zd=!f(hjb^wIik1nNPtA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K%T`S@|l5^!O5KWNZa#ak%zfl43&5K2QW@!8v$5f1v0v%NjmWiEiY zCGo;(fc!(bMC>c-Llp=hbL-)hdHt@{tLCu20hYK%$nYLbDKY$g&uD_!LWyT1XjT$B zxIpE!*e!HUXO$TZ+f$sQJ3r#Kw?%$zUt9xQkG&LN_w;zrsTvmw%)d-7u4hUmtQ;(KJBNP zN;oGs!4h3ScGkiU?W@ikQt$`aP@H3$orxX^$KN z@(@aw{bzt}Z$`TkgZirhp}%1ElVKJL@`bDx-DIo}#i4(uCc<>3m+u__!@|SE;|a&+ zvBV+;zJokS%+=C zME&c^Jn%CsNHz(Wk518V?IfgW{lJP0_NRwbd89BJ@P!4*VuLh2D(-L1D{~Uv;0_nuWL|zkA f^q)!EAXzd^7s8XCN02OysSjYI4q=+UBo_Vyi!utv literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable/selector_chapter_light.xml b/app/src/main/res/drawable/selector_chapter_light.xml new file mode 100644 index 0000000000..58df6ebf87 --- /dev/null +++ b/app/src/main/res/drawable/selector_chapter_light.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_chapter.xml b/app/src/main/res/layout/item_chapter.xml index 9c33e3f703..f652d2f40f 100644 --- a/app/src/main/res/layout/item_chapter.xml +++ b/app/src/main/res/layout/item_chapter.xml @@ -3,12 +3,8 @@ xmlns:tools="http://schemas.android.com/tools" android:orientation="horizontal" android:layout_width="match_parent" - android:layout_height="40dp"> - - + android:layout_height="40dp" + android:background="?attr/selectableItemBackground"> + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 7aa1362cc8..0f731d7e34 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -16,4 +16,5 @@ #DD000000 #E8E8E8 #909090 + #607D8B \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1d18e040ed..ba03e13781 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -32,7 +32,7 @@ Settings Search Refresh - Title or author... + Title or author… Delete Selected CatalogueList @@ -77,4 +77,9 @@ Page: %1$d This source requires login + Select all + Mark as read + Mark as unread + Selected chapters: %1$d + diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 9e911bf999..a539c2f4bd 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -11,6 +11,7 @@ @color/white true @style/Widget.ActionMode + @drawable/selector_chapter_light