files = new ArrayList<>();
+ // 判断是否存在数据
+ if (cursor == null) {
+ // TODO:当媒体库没有数据的时候,需要做相应的处理
+ // 暂时直接返回空数据
+ resultCallback.onResultCallback(files);
+ return;
+ }
+ // 重复使用Loader时,需要重置cursor的position;
+ cursor.moveToPosition(-1);
+ while (cursor.moveToNext()) {
+ String path;
+
+ path = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Files.FileColumns.DATA));
+ // 路径无效
+ if (TextUtils.isEmpty(path)) {
+ continue;
+ } else {
+ File file = new File(path);
+ if (file.isDirectory() || !file.exists()){
+ continue;
+ }
+ else {
+ files.add(file);
+ }
+ }
+ }
+ if (resultCallback != null) {
+ resultCallback.onResultCallback(files);
+ }
+ }
+
+ /**
+ * 从Cursor中读取对应columnName的值
+ *
+ * @param cursor
+ * @param columnName
+ * @param defaultValue
+ * @return 当columnName无效时返回默认值;
+ */
+ protected Object getValueFromCursor(@NonNull Cursor cursor, String columnName, Object defaultValue) {
+ try {
+ int index = cursor.getColumnIndexOrThrow(columnName);
+ int type = cursor.getType(index);
+ switch (type) {
+ case Cursor.FIELD_TYPE_STRING:
+ // TO SOLVE:某些手机的数据库将数值类型存为String类型
+ String value = cursor.getString(index);
+ try {
+ if (defaultValue instanceof String) {
+ return value;
+ } else if (defaultValue instanceof Long) {
+ return Long.valueOf(value);
+ } else if (defaultValue instanceof Integer) {
+ return Integer.valueOf(value);
+ } else if (defaultValue instanceof Double) {
+ return Double.valueOf(value);
+ } else if (defaultValue instanceof Float) {
+ return Float.valueOf(value);
+ }
+ } catch (NumberFormatException e) {
+ return defaultValue;
+ }
+ case Cursor.FIELD_TYPE_INTEGER:
+ if (defaultValue instanceof Long) {
+ return cursor.getLong(index);
+ } else if (defaultValue instanceof Integer) {
+ return cursor.getInt(index);
+ }
+ case Cursor.FIELD_TYPE_FLOAT:
+ if (defaultValue instanceof Float) {
+ return cursor.getFloat(index);
+ } else if (defaultValue instanceof Double) {
+ return cursor.getDouble(index);
+ }
+ case Cursor.FIELD_TYPE_BLOB:
+ if (defaultValue instanceof Blob) {
+ return cursor.getBlob(index);
+ }
+ case Cursor.FIELD_TYPE_NULL:
+ default:
+ return defaultValue;
+ }
+ } catch (IllegalArgumentException e) {
+ return defaultValue;
+ }
+ }
+}
diff --git a/app/src/main/java/xyz/fycz/myreader/util/media/MediaStoreHelper.java b/app/src/main/java/xyz/fycz/myreader/util/media/MediaStoreHelper.java
new file mode 100644
index 0000000..d353e12
--- /dev/null
+++ b/app/src/main/java/xyz/fycz/myreader/util/media/MediaStoreHelper.java
@@ -0,0 +1,68 @@
+package xyz.fycz.myreader.util.media;
+
+import android.app.Activity;
+import android.content.Context;
+import android.database.Cursor;
+import android.os.Bundle;
+
+import androidx.fragment.app.FragmentActivity;
+import androidx.loader.app.LoaderManager;
+import androidx.loader.content.Loader;
+
+import java.io.File;
+import java.lang.ref.WeakReference;
+import java.util.List;
+
+/**
+ * Created by newbiechen on 2018/1/14.
+ * 获取媒体库的数据。
+ */
+
+public class MediaStoreHelper {
+
+ /**
+ * 获取媒体库中所有的书籍文件
+ *
+ * 暂时只支持 TXT
+ *
+ * @param activity
+ * @param resultCallback
+ */
+ public static void getAllBookFile(FragmentActivity activity, MediaResultCallback resultCallback) {
+ // 将文件的获取处理交给 LoaderManager。
+ activity.getSupportLoaderManager()
+ .initLoader(LoaderCreator.ALL_BOOK_FILE, null, new MediaLoaderCallbacks(activity, resultCallback));
+ }
+
+ public interface MediaResultCallback {
+ void onResultCallback(List files);
+ }
+
+ /**
+ * Loader 回调处理
+ */
+ static class MediaLoaderCallbacks implements LoaderManager.LoaderCallbacks {
+ protected WeakReference mContext;
+ protected MediaResultCallback mResultCallback;
+
+ public MediaLoaderCallbacks(Context context, MediaResultCallback resultCallback) {
+ mContext = new WeakReference<>(context);
+ mResultCallback = resultCallback;
+ }
+
+ @Override
+ public Loader onCreateLoader(int id, Bundle args) {
+ return LoaderCreator.create(mContext.get(), id, args);
+ }
+
+ @Override
+ public void onLoadFinished(Loader loader, Cursor data) {
+ LocalFileLoader localFileLoader = (LocalFileLoader) loader;
+ localFileLoader.parseData(data, mResultCallback);
+ }
+
+ @Override
+ public void onLoaderReset(Loader loader) {
+ }
+ }
+}
diff --git a/app/src/main/java/xyz/fycz/myreader/widget/DividerItemDecoration.java b/app/src/main/java/xyz/fycz/myreader/widget/DividerItemDecoration.java
new file mode 100644
index 0000000..6cf30c3
--- /dev/null
+++ b/app/src/main/java/xyz/fycz/myreader/widget/DividerItemDecoration.java
@@ -0,0 +1,93 @@
+package xyz.fycz.myreader.widget;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+
+import android.view.View;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+/**
+ * Created by newbiechen on 2017/10/8.
+ */
+
+public class DividerItemDecoration extends RecyclerView.ItemDecoration {
+ private static final String TAG = "DividerItemDecoration";
+ private static final int[] ATTRS = new int[]{
+ android.R.attr.listDivider
+ };
+
+ public static final int HORIZONTAL_LIST = LinearLayoutManager.HORIZONTAL;
+
+ public static final int VERTICAL_LIST = LinearLayoutManager.VERTICAL;
+
+ private Drawable mDrawable;
+
+ public DividerItemDecoration(Context context) {
+ final TypedArray a = context.obtainStyledAttributes(ATTRS);
+ mDrawable = a.getDrawable(0);
+ a.recycle();
+ }
+
+ @Override
+ public void onDraw(Canvas c, RecyclerView parent) {
+ if (getLayoutManagerType(parent) == VERTICAL_LIST) {
+ drawVertical(c, parent);
+ } else {
+ drawHorizontal(c, parent);
+ }
+ }
+
+ private int getLayoutManagerType(RecyclerView rv){
+ RecyclerView.LayoutManager manager = rv.getLayoutManager();
+
+ if (!(manager instanceof LinearLayoutManager)){
+ throw new IllegalArgumentException("only supply linearLayoutManager");
+ }
+ return ((LinearLayoutManager) manager).getOrientation();
+ }
+
+ public void drawVertical(Canvas c, RecyclerView parent) {
+ final int left = parent.getPaddingLeft();
+ final int right = parent.getWidth() - parent.getPaddingRight();
+
+ final int childCount = parent.getChildCount();
+ for (int i = 0; i < childCount; i++) {
+ final View child = parent.getChildAt(i);
+ final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child
+ .getLayoutParams();
+ final int top = child.getBottom() + params.bottomMargin;
+ final int bottom = top + mDrawable.getIntrinsicHeight();
+ mDrawable.setBounds(left, top, right, bottom);
+ mDrawable.draw(c);
+ }
+ }
+
+ public void drawHorizontal(Canvas c, RecyclerView parent) {
+ final int top = parent.getPaddingTop();
+ final int bottom = parent.getHeight() - parent.getPaddingBottom();
+
+ final int childCount = parent.getChildCount();
+ for (int i = 0; i < childCount; i++) {
+ final View child = parent.getChildAt(i);
+ final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child
+ .getLayoutParams();
+ final int left = child.getRight() + params.rightMargin;
+ final int right = left + mDrawable.getIntrinsicHeight();
+ mDrawable.setBounds(left, top, right, bottom);
+ mDrawable.draw(c);
+ }
+ }
+
+ @Override
+ public void getItemOffsets(Rect outRect, int itemPosition, RecyclerView parent) {
+ if (getLayoutManagerType(parent) == VERTICAL_LIST) {
+ outRect.set(0, 0, 0, mDrawable.getIntrinsicHeight());
+ } else {
+ outRect.set(0, 0, mDrawable.getIntrinsicWidth(), 0);
+ }
+ }
+}
diff --git a/app/src/main/java/xyz/fycz/myreader/widget/RefreshLayout.java b/app/src/main/java/xyz/fycz/myreader/widget/RefreshLayout.java
new file mode 100644
index 0000000..4faad4d
--- /dev/null
+++ b/app/src/main/java/xyz/fycz/myreader/widget/RefreshLayout.java
@@ -0,0 +1,267 @@
+package xyz.fycz.myreader.widget;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.FrameLayout;
+import xyz.fycz.myreader.R;
+
+/**
+ * Created by newbiechen on 17-4-22.
+ * 功能:
+ * 1. 加载动画
+ * 2. 加载错误点击重新加载
+ */
+
+public class RefreshLayout extends FrameLayout {
+
+ private static final String TAG = "RefreshLayout";
+
+ protected static final int STATUS_LOADING = 0;
+ protected static final int STATUS_FINISH = 1;
+ protected static final int STATUS_ERROR = 2;
+ protected static final int STATUS_EMPTY = 3;
+
+ private Context mContext;
+
+ private int mEmptyViewId;
+ private int mErrorViewId;
+ private int mLoadingViewId;
+
+ private View mEmptyView;
+ private View mErrorView;
+ private View mLoadingView;
+ private View mContentView;
+
+ private OnReloadingListener mListener;
+ private int mStatus = 0;
+
+ public RefreshLayout(Context context) {
+ this(context,null);
+ }
+
+ public RefreshLayout(Context context, AttributeSet attrs) {
+ this(context, attrs,0);
+ }
+
+ public RefreshLayout(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ mContext = context;
+ initAttrs(attrs);
+ initView();
+ }
+
+ private void initAttrs(AttributeSet attrs){
+ TypedArray typedArray = mContext.obtainStyledAttributes(attrs, R.styleable.RefreshLayout);
+ mEmptyViewId = typedArray.getResourceId(R.styleable.RefreshLayout_layout_refresh_empty,R.layout.view_empty);
+ mErrorViewId = typedArray.getResourceId(R.styleable.RefreshLayout_layout_refresh_error,R.layout.view_net_error);
+ mLoadingViewId = typedArray.getResourceId(R.styleable.RefreshLayout_layout_refresh_loading,R.layout.view_loading);
+
+ typedArray.recycle();
+ }
+
+ private void initView(){
+
+ //添加在empty、error、loading 情况下的布局
+ mEmptyView = inflateView(mEmptyViewId);
+ mErrorView = inflateView(mErrorViewId);
+ mLoadingView = inflateView(mLoadingViewId);
+
+ addView(mEmptyView);
+ addView(mErrorView);
+ addView(mLoadingView);
+
+ //设置监听器
+ mErrorView.setOnClickListener(
+ (view) -> {
+ if (mListener != null){
+ toggleStatus(STATUS_LOADING);
+ mListener.onReload();
+ }
+ }
+ );
+ }
+
+ @Override
+ protected void onFinishInflate() {
+ super.onFinishInflate();
+ toggleStatus(STATUS_LOADING);
+ }
+
+ @Override
+ public void onViewAdded(View child) {
+ super.onViewAdded(child);
+ if (getChildCount() == 4){
+ mContentView = child;
+ }
+ }
+
+ //除了自带的数据,保证子类只能够添加一个子View
+ @Override
+ public void addView(View child) {
+ if (getChildCount() > 4) {
+ throw new IllegalStateException("RefreshLayout can host only one direct child");
+ }
+ super.addView(child);
+ }
+
+ @Override
+ public void addView(View child, int index) {
+ if (getChildCount() > 4) {
+ throw new IllegalStateException("RefreshLayout can host only one direct child");
+ }
+
+ super.addView(child, index);
+ }
+
+ @Override
+ public void addView(View child, ViewGroup.LayoutParams params) {
+ if (getChildCount() > 4) {
+ throw new IllegalStateException("RefreshLayout can host only one direct child");
+ }
+
+ super.addView(child, params);
+ }
+
+ @Override
+ public void addView(View child, int index, ViewGroup.LayoutParams params) {
+ if (getChildCount() > 4) {
+ throw new IllegalStateException("RefreshLayout can host only one direct child");
+ }
+
+ super.addView(child, index, params);
+ }
+
+ public void showLoading(){
+ if (mStatus != STATUS_LOADING){
+ toggleStatus(STATUS_LOADING);
+ }
+ }
+
+ public void showFinish(){
+ if (mStatus == STATUS_LOADING){
+ toggleStatus(STATUS_FINISH);
+ }
+ }
+
+ public void showError(){
+ if (mStatus != STATUS_ERROR){
+ toggleStatus(STATUS_ERROR);
+ }
+ }
+
+ public void showEmpty(){
+ if (mStatus != STATUS_EMPTY){
+ toggleStatus(STATUS_EMPTY);
+ }
+ }
+
+ //视图根据状态切换
+ private void toggleStatus(int status){
+ switch (status){
+ case STATUS_LOADING:
+ mLoadingView.setVisibility(VISIBLE);
+ mEmptyView.setVisibility(GONE);
+ mErrorView.setVisibility(GONE);
+ if (mContentView != null){
+ mContentView.setVisibility(GONE);
+ }
+ break;
+ case STATUS_FINISH:
+ if (mContentView != null){
+ mContentView.setVisibility(VISIBLE);
+ }
+ mLoadingView.setVisibility(GONE);
+ mEmptyView.setVisibility(GONE);
+ mErrorView.setVisibility(GONE);
+ break;
+ case STATUS_ERROR:
+ mErrorView.setVisibility(VISIBLE);
+ mLoadingView.setVisibility(GONE);
+ mEmptyView.setVisibility(GONE);
+ if (mContentView != null){
+ mContentView.setVisibility(GONE);
+ }
+ break;
+ case STATUS_EMPTY:
+ mEmptyView.setVisibility(VISIBLE);
+ mErrorView.setVisibility(GONE);
+ mLoadingView.setVisibility(GONE);
+ if (mContentView != null){
+ mContentView.setVisibility(GONE);
+ }
+ break;
+ }
+ mStatus = status;
+ }
+
+ protected int getStatus(){
+ return mStatus;
+ }
+
+ public void setOnReloadingListener(OnReloadingListener listener){
+ mListener = listener;
+ }
+
+ private View inflateView(int id){
+ return LayoutInflater.from(mContext)
+ .inflate(id,this,false);
+ }
+
+ //数据存储
+ @Override
+ protected Parcelable onSaveInstanceState() {
+ Parcelable superParcel = super.onSaveInstanceState();
+ SavedState savedState = new SavedState(superParcel);
+ savedState.status = mStatus;
+ return savedState;
+ }
+
+ @Override
+ protected void onRestoreInstanceState(Parcelable state) {
+ SavedState savedState = (SavedState) state;
+ super.onRestoreInstanceState(savedState.getSuperState());
+ //刷新状态
+ toggleStatus(savedState.status);
+ }
+
+ static class SavedState extends BaseSavedState {
+ int status;
+
+ SavedState(Parcelable superState) {
+ super(superState);
+ }
+
+ private SavedState(Parcel in) {
+ super(in);
+ status = in.readInt();
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ super.writeToParcel(out, flags);
+ out.writeInt(status);
+ }
+
+ public static final Creator CREATOR
+ = new Creator() {
+ public SavedState createFromParcel(Parcel in) {
+ return new SavedState(in);
+ }
+
+ public SavedState[] newArray(int size) {
+ return new SavedState[size];
+ }
+ };
+ }
+
+ //添加错误重新加载的监听
+ public interface OnReloadingListener{
+ void onReload();
+ }
+}
diff --git a/app/src/main/java/xyz/fycz/myreader/widget/page/PageView.java b/app/src/main/java/xyz/fycz/myreader/widget/page/PageView.java
index ceaf428..83056d9 100644
--- a/app/src/main/java/xyz/fycz/myreader/widget/page/PageView.java
+++ b/app/src/main/java/xyz/fycz/myreader/widget/page/PageView.java
@@ -346,9 +346,9 @@ public class PageView extends View {
}
// 获取具体的加载器
if ("本地书籍".equals(collBook.getType())){
- mPageLoader = new LocalPageLoader(this, collBook, new ChapterService(), setting);
+ mPageLoader = new LocalPageLoader(this, collBook, ChapterService.getInstance(), setting);
}else {
- mPageLoader = new NetPageLoader(this, collBook, new ChapterService(), mReadCrawler, setting);
+ mPageLoader = new NetPageLoader(this, collBook, ChapterService.getInstance(), mReadCrawler, setting);
}
// 判断是否 PageView 已经初始化完成
if (mViewWidth != 0 || mViewHeight != 0) {
diff --git a/app/src/main/res/color/selector_btn_file_add.xml b/app/src/main/res/color/selector_btn_file_add.xml
new file mode 100644
index 0000000..ba3485d
--- /dev/null
+++ b/app/src/main/res/color/selector_btn_file_add.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/color/selector_btn_file_delete.xml b/app/src/main/res/color/selector_btn_file_delete.xml
new file mode 100644
index 0000000..6ef72c8
--- /dev/null
+++ b/app/src/main/res/color/selector_btn_file_delete.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/color/selector_cb_file.xml b/app/src/main/res/color/selector_cb_file.xml
new file mode 100644
index 0000000..acfdd26
--- /dev/null
+++ b/app/src/main/res/color/selector_cb_file.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable-xhdpi/ic_back_last.png b/app/src/main/res/drawable-xhdpi/ic_back_last.png
new file mode 100644
index 0000000..0fede23
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_back_last.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_cb_file_normal.png b/app/src/main/res/drawable-xhdpi/ic_cb_file_normal.png
new file mode 100644
index 0000000..dffe47f
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_cb_file_normal.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_cb_file_selected.png b/app/src/main/res/drawable-xhdpi/ic_cb_file_selected.png
new file mode 100644
index 0000000..713a0d4
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_cb_file_selected.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_file_loaded.png b/app/src/main/res/drawable-xhdpi/ic_file_loaded.png
new file mode 100644
index 0000000..30193ee
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_file_loaded.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_no_data.png b/app/src/main/res/drawable-xhdpi/ic_no_data.png
new file mode 100644
index 0000000..2578fbe
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_no_data.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_menu_overflow.png b/app/src/main/res/drawable-xxhdpi/ic_menu_overflow.png
new file mode 100644
index 0000000..c382aa6
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_menu_overflow.png differ
diff --git a/app/src/main/res/drawable/ic_book_has.xml b/app/src/main/res/drawable/ic_book_has.xml
new file mode 100644
index 0000000..a920e50
--- /dev/null
+++ b/app/src/main/res/drawable/ic_book_has.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ic_folder.xml b/app/src/main/res/drawable/ic_folder.xml
new file mode 100644
index 0000000..cb2a84c
--- /dev/null
+++ b/app/src/main/res/drawable/ic_folder.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_tag_txt.xml b/app/src/main/res/drawable/ic_tag_txt.xml
new file mode 100644
index 0000000..1cfc74d
--- /dev/null
+++ b/app/src/main/res/drawable/ic_tag_txt.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/selector_btn_add.xml b/app/src/main/res/drawable/selector_btn_add.xml
new file mode 100644
index 0000000..d0b5df1
--- /dev/null
+++ b/app/src/main/res/drawable/selector_btn_add.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/selector_btn_delete.xml b/app/src/main/res/drawable/selector_btn_delete.xml
new file mode 100644
index 0000000..bdf86fb
--- /dev/null
+++ b/app/src/main/res/drawable/selector_btn_delete.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/selector_cb_file.xml b/app/src/main/res/drawable/selector_cb_file.xml
new file mode 100644
index 0000000..17deb8d
--- /dev/null
+++ b/app/src/main/res/drawable/selector_cb_file.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/selector_common_bg.xml b/app/src/main/res/drawable/selector_common_bg.xml
new file mode 100644
index 0000000..701a4c2
--- /dev/null
+++ b/app/src/main/res/drawable/selector_common_bg.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/selector_pwd.xml b/app/src/main/res/drawable/selector_pwd.xml
new file mode 100644
index 0000000..f3b6764
--- /dev/null
+++ b/app/src/main/res/drawable/selector_pwd.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/shape_blue.xml b/app/src/main/res/drawable/shape_blue.xml
new file mode 100644
index 0000000..a61553f
--- /dev/null
+++ b/app/src/main/res/drawable/shape_blue.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/shape_corner_black.xml b/app/src/main/res/drawable/shape_corner_black.xml
new file mode 100644
index 0000000..44b77df
--- /dev/null
+++ b/app/src/main/res/drawable/shape_corner_black.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/shape_corner_blue.xml b/app/src/main/res/drawable/shape_corner_blue.xml
new file mode 100644
index 0000000..ecf07cf
--- /dev/null
+++ b/app/src/main/res/drawable/shape_corner_blue.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/shape_unclick.xml b/app/src/main/res/drawable/shape_unclick.xml
new file mode 100644
index 0000000..3cca521
--- /dev/null
+++ b/app/src/main/res/drawable/shape_unclick.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_book_info.xml b/app/src/main/res/layout/activity_book_info.xml
index add0a94..20811a5 100644
--- a/app/src/main/res/layout/activity_book_info.xml
+++ b/app/src/main/res/layout/activity_book_info.xml
@@ -31,7 +31,7 @@
android:layout_width="80dp"
android:layout_height="120dp"
android:scaleType="fitXY"
- app:srcCompat="@mipmap/no_image"/>
+ app:srcCompat="@mipmap/default_cover"/>
diff --git a/app/src/main/res/layout/activity_file_system.xml b/app/src/main/res/layout/activity_file_system.xml
new file mode 100644
index 0000000..46f0b49
--- /dev/null
+++ b/app/src/main/res/layout/activity_file_system.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml
index 05e3323..336147e 100644
--- a/app/src/main/res/layout/activity_login.xml
+++ b/app/src/main/res/layout/activity_login.xml
@@ -119,11 +119,10 @@
android:textSize="20dp" />
-
+ android:textSize="18dp" />-->
-
+
+
+
+
+
+
+
+
+
+
-
+ android:textSize="18dp" />-->
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_register.xml b/app/src/main/res/layout/activity_register.xml
index 60a6e55..072ea86 100644
--- a/app/src/main/res/layout/activity_register.xml
+++ b/app/src/main/res/layout/activity_register.xml
@@ -70,49 +70,82 @@
android:textColor="@color/sys_red"
android:visibility="gone" />
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/fragment_file_category.xml b/app/src/main/res/layout/fragment_file_category.xml
new file mode 100644
index 0000000..271f11a
--- /dev/null
+++ b/app/src/main/res/layout/fragment_file_category.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_local_book.xml b/app/src/main/res/layout/fragment_local_book.xml
new file mode 100644
index 0000000..6a913aa
--- /dev/null
+++ b/app/src/main/res/layout/fragment_local_book.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/gridview_book_detailed_item.xml b/app/src/main/res/layout/gridview_book_detailed_item.xml
index 87ff587..867f81c 100644
--- a/app/src/main/res/layout/gridview_book_detailed_item.xml
+++ b/app/src/main/res/layout/gridview_book_detailed_item.xml
@@ -16,7 +16,7 @@
android:layout_width="64dp"
android:layout_height="88dp"
android:scaleType="fitXY"
- app:srcCompat="@mipmap/no_image"/>
+ app:srcCompat="@mipmap/default_cover"/>
+ app:srcCompat="@mipmap/default_cover"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/listview_book_store_book_item.xml b/app/src/main/res/layout/listview_book_store_book_item.xml
index 8f50a36..a1b1070 100644
--- a/app/src/main/res/layout/listview_book_store_book_item.xml
+++ b/app/src/main/res/layout/listview_book_store_book_item.xml
@@ -12,7 +12,7 @@
android:layout_width="70dp"
android:layout_height="100dp"
android:scaleType="fitXY"
- app:srcCompat="@mipmap/no_image" />
+ app:srcCompat="@mipmap/default_cover" />
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/view_empty.xml b/app/src/main/res/layout/view_empty.xml
new file mode 100644
index 0000000..f4e7494
--- /dev/null
+++ b/app/src/main/res/layout/view_empty.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/view_loading.xml b/app/src/main/res/layout/view_loading.xml
new file mode 100644
index 0000000..e5fdb46
--- /dev/null
+++ b/app/src/main/res/layout/view_loading.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/view_net_error.xml b/app/src/main/res/layout/view_net_error.xml
new file mode 100644
index 0000000..bd881ad
--- /dev/null
+++ b/app/src/main/res/layout/view_net_error.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-xhdpi/default_cover.jpg b/app/src/main/res/mipmap-xhdpi/default_cover.jpg
new file mode 100644
index 0000000..3515f68
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/default_cover.jpg differ
diff --git a/app/src/main/res/mipmap-xhdpi/pwd_gone.png b/app/src/main/res/mipmap-xhdpi/pwd_gone.png
new file mode 100644
index 0000000..2977fc0
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/pwd_gone.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/pwd_visiable.png b/app/src/main/res/mipmap-xhdpi/pwd_visiable.png
new file mode 100644
index 0000000..a2cbc10
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/pwd_visiable.png differ
diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml
index 197558a..b9057db 100644
--- a/app/src/main/res/values/attrs.xml
+++ b/app/src/main/res/values/attrs.xml
@@ -1,7 +1,11 @@
-
+
+
+
+
+
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 2b86ed0..becd2bc 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -141,4 +141,23 @@
#d3321b
#aaaaaaaa
+
+
+
+ #212121
+
+ #727272
+
+ #B2B2B2
+
+
+ #E3E3E3
+
+
+ @color/white
+ #E3E3E3
+
+ #727272
+
+ #96ffffff
diff --git a/app/src/main/res/values/ids.xml b/app/src/main/res/values/ids.xml
index fddb8b9..18c87ec 100644
--- a/app/src/main/res/values/ids.xml
+++ b/app/src/main/res/values/ids.xml
@@ -3,4 +3,5 @@
+
\ 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 ef18e64..e72bf00 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -86,4 +86,11 @@
https://github.com/fengyuecanzhu/FYReader
检查更新
+
+
+ %1$d 项
+ 存储卡:%1$s
+ 加入书架
+ 加入书架(%1$d)
+ 成功添加%1$d本书
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 2cb6042..44c4f1c 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -42,4 +42,56 @@
- @color/gray
- @color/colorAccent
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/version_code.properties b/app/version_code.properties
index db06e74..78e0b2d 100644
--- a/app/version_code.properties
+++ b/app/version_code.properties
@@ -1,2 +1,2 @@
-#Fri Aug 07 09:42:27 CST 2020
-VERSION_CODE=140
+#Wed Aug 12 21:27:50 CST 2020
+VERSION_CODE=141