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)
public class CatalogueFragment extends BaseRxFragment<CataloguePresenter> {
@Bind(R.id.gridView)
GridView manga_list;
@Bind(R.id.gridView) GridView manga_list;
@Bind(R.id.progress)
ProgressBar progress;
@Bind(R.id.progress) ProgressBar progress;
@Bind(R.id.progress_grid)
ProgressBar progress_grid;
@Bind(R.id.progress_grid) ProgressBar progress_grid;
private EasyAdapter<Manga> adapter;
private EndlessScrollListener scroll_listener;

View file

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

View file

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

View file

@ -35,12 +35,10 @@ import rx.Observable;
public class ChaptersFragment extends BaseRxFragment<ChaptersPresenter> implements
ActionMode.Callback, ChaptersAdapter.OnItemClickListener {
@Bind(R.id.chapter_list)
RecyclerView chapters;
@Bind(R.id.swipe_refresh)
SwipeRefreshLayout swipeRefresh;
@Bind(R.id.chapter_list) RecyclerView chapters;
@Bind(R.id.swipe_refresh) SwipeRefreshLayout swipeRefresh;
@Bind(R.id.toolbar_bottom) Toolbar toolbarBottom;
Toolbar toolbarBottom;
private MenuItem sortUpBtn;
private MenuItem sortDownBtn;
private CheckBox readCb;
@ -71,7 +69,6 @@ public class ChaptersFragment extends BaseRxFragment<ChaptersPresenter> implemen
createAdapter();
setSwipeRefreshListener();
toolbarBottom = (Toolbar) view.findViewById(R.id.toolbar_bottom);
toolbarBottom.inflateMenu(R.menu.chapter_filter);
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> {
@Inject
DatabaseHelper db;
@Inject
SourceManager sourceManager;
@Inject
PreferencesHelper preferences;
@Inject
DownloadManager downloadManager;
@Inject DatabaseHelper db;
@Inject SourceManager sourceManager;
@Inject PreferencesHelper preferences;
@Inject DownloadManager downloadManager;
private Manga manga;
private Source source;
@ -177,7 +173,7 @@ public class ChaptersPresenter extends BasePresenter<ChaptersFragment> {
}
}
public void initReadCb(){
public void initReadCb() {
if (getView() != null) {
getView().setReadFilter(onlyUnread);//TODO do we need save filter for manga?
}

View file

@ -26,23 +26,15 @@ import nucleus.factory.RequiresPresenter;
@RequiresPresenter(MangaInfoPresenter.class)
public class MangaInfoFragment extends BaseRxFragment<MangaInfoPresenter> {
@Bind(R.id.manga_artist)
TextView mArtist;
@Bind(R.id.manga_author)
TextView mAuthor;
@Bind(R.id.manga_chapters)
TextView mChapters;
@Bind(R.id.manga_genres)
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.manga_artist) TextView mArtist;
@Bind(R.id.manga_author) TextView mAuthor;
@Bind(R.id.manga_chapters) TextView mChapters;
@Bind(R.id.manga_genres) 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)
Button favoriteBtn;
@Bind(R.id.action_favorite) Button favoriteBtn;
public static MangaInfoFragment newInstance() {

View file

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