fix autoformat

This commit is contained in:
Yuri Revich 2015-11-24 21:54:42 +03:00
parent 18130e931f
commit 1c8b68ab0e
7 changed files with 27 additions and 53 deletions

View File

@ -32,14 +32,11 @@ import uk.co.ribot.easyadapter.EasyAdapter;
@RequiresPresenter(CataloguePresenter.class) @RequiresPresenter(CataloguePresenter.class)
public class CatalogueFragment extends BaseRxFragment<CataloguePresenter> { public class CatalogueFragment extends BaseRxFragment<CataloguePresenter> {
@Bind(R.id.gridView) @Bind(R.id.gridView) GridView manga_list;
GridView manga_list;
@Bind(R.id.progress) @Bind(R.id.progress) ProgressBar progress;
ProgressBar progress;
@Bind(R.id.progress_grid) @Bind(R.id.progress_grid) ProgressBar progress_grid;
ProgressBar progress_grid;
private EasyAdapter<Manga> adapter; private EasyAdapter<Manga> adapter;
private EndlessScrollListener scroll_listener; private EndlessScrollListener scroll_listener;

View File

@ -20,17 +20,13 @@ import uk.co.ribot.easyadapter.annotations.ViewId;
@LayoutId(R.layout.item_catalogue) @LayoutId(R.layout.item_catalogue)
public class LibraryHolder extends ItemViewHolder<Manga> { public class LibraryHolder extends ItemViewHolder<Manga> {
@ViewId(R.id.thumbnail) @ViewId(R.id.thumbnail) ImageView thumbnail;
ImageView thumbnail;
@ViewId(R.id.title) @ViewId(R.id.title) TextView title;
TextView title;
@ViewId(R.id.author) @ViewId(R.id.author) TextView author;
TextView author;
@ViewId(R.id.unreadText) @ViewId(R.id.unreadText) TextView unreadText;
TextView unreadText;
public LibraryHolder(View view) { public LibraryHolder(View view) {
super(view); super(view);
@ -43,8 +39,7 @@ public class LibraryHolder extends ItemViewHolder<Manga> {
if (manga.unread > 0) { if (manga.unread > 0) {
unreadText.setVisibility(View.VISIBLE); unreadText.setVisibility(View.VISIBLE);
unreadText.setText(Integer.toString(manga.unread)); unreadText.setText(Integer.toString(manga.unread));
} } else {
else {
unreadText.setVisibility(View.GONE); unreadText.setVisibility(View.GONE);
} }

View File

@ -22,11 +22,9 @@ import nucleus.view.ViewWithPresenter;
public class MainActivity extends BaseActivity { public class MainActivity extends BaseActivity {
@Bind(R.id.toolbar) @Bind(R.id.toolbar) Toolbar toolbar;
Toolbar toolbar;
@Bind(R.id.drawer_container) @Bind(R.id.drawer_container) FrameLayout container;
FrameLayout container;
private Drawer drawer; private Drawer drawer;
private FragmentStack fragmentStack; private FragmentStack fragmentStack;

View File

@ -35,12 +35,10 @@ import rx.Observable;
public class ChaptersFragment extends BaseRxFragment<ChaptersPresenter> implements public class ChaptersFragment extends BaseRxFragment<ChaptersPresenter> implements
ActionMode.Callback, ChaptersAdapter.OnItemClickListener { ActionMode.Callback, ChaptersAdapter.OnItemClickListener {
@Bind(R.id.chapter_list) @Bind(R.id.chapter_list) RecyclerView chapters;
RecyclerView chapters; @Bind(R.id.swipe_refresh) SwipeRefreshLayout swipeRefresh;
@Bind(R.id.swipe_refresh) @Bind(R.id.toolbar_bottom) Toolbar toolbarBottom;
SwipeRefreshLayout swipeRefresh;
Toolbar toolbarBottom;
private MenuItem sortUpBtn; private MenuItem sortUpBtn;
private MenuItem sortDownBtn; private MenuItem sortDownBtn;
private CheckBox readCb; private CheckBox readCb;
@ -71,7 +69,6 @@ public class ChaptersFragment extends BaseRxFragment<ChaptersPresenter> implemen
createAdapter(); createAdapter();
setSwipeRefreshListener(); setSwipeRefreshListener();
toolbarBottom = (Toolbar) view.findViewById(R.id.toolbar_bottom);
toolbarBottom.inflateMenu(R.menu.chapter_filter); toolbarBottom.inflateMenu(R.menu.chapter_filter);
sortUpBtn = toolbarBottom.getMenu().findItem(R.id.action_sort_up); sortUpBtn = toolbarBottom.getMenu().findItem(R.id.action_sort_up);

View File

@ -30,14 +30,10 @@ import rx.schedulers.Schedulers;
public class ChaptersPresenter extends BasePresenter<ChaptersFragment> { public class ChaptersPresenter extends BasePresenter<ChaptersFragment> {
@Inject @Inject DatabaseHelper db;
DatabaseHelper db; @Inject SourceManager sourceManager;
@Inject @Inject PreferencesHelper preferences;
SourceManager sourceManager; @Inject DownloadManager downloadManager;
@Inject
PreferencesHelper preferences;
@Inject
DownloadManager downloadManager;
private Manga manga; private Manga manga;
private Source source; private Source source;
@ -177,7 +173,7 @@ public class ChaptersPresenter extends BasePresenter<ChaptersFragment> {
} }
} }
public void initReadCb(){ public void initReadCb() {
if (getView() != null) { if (getView() != null) {
getView().setReadFilter(onlyUnread);//TODO do we need save filter for manga? getView().setReadFilter(onlyUnread);//TODO do we need save filter for manga?
} }

View File

@ -26,23 +26,15 @@ import nucleus.factory.RequiresPresenter;
@RequiresPresenter(MangaInfoPresenter.class) @RequiresPresenter(MangaInfoPresenter.class)
public class MangaInfoFragment extends BaseRxFragment<MangaInfoPresenter> { public class MangaInfoFragment extends BaseRxFragment<MangaInfoPresenter> {
@Bind(R.id.manga_artist) @Bind(R.id.manga_artist) TextView mArtist;
TextView mArtist; @Bind(R.id.manga_author) TextView mAuthor;
@Bind(R.id.manga_author) @Bind(R.id.manga_chapters) TextView mChapters;
TextView mAuthor; @Bind(R.id.manga_genres) TextView mGenres;
@Bind(R.id.manga_chapters) @Bind(R.id.manga_status) TextView mStatus;
TextView mChapters; @Bind(R.id.manga_summary) TextView mDescription;
@Bind(R.id.manga_genres) @Bind(R.id.manga_cover) ImageView mCover;
TextView mGenres;
@Bind(R.id.manga_status)
TextView mStatus;
@Bind(R.id.manga_summary)
TextView mDescription;
@Bind(R.id.manga_cover)
ImageView mCover;
@Bind(R.id.action_favorite) @Bind(R.id.action_favorite) Button favoriteBtn;
Button favoriteBtn;
public static MangaInfoFragment newInstance() { public static MangaInfoFragment newInstance() {

View File

@ -13,8 +13,7 @@ import rx.Observable;
public class MangaInfoPresenter extends BasePresenter<MangaInfoFragment> { public class MangaInfoPresenter extends BasePresenter<MangaInfoFragment> {
@Inject @Inject DatabaseHelper db;
DatabaseHelper db;
private Manga manga; private Manga manga;
private int count = -1; private int count = -1;