Skip to content

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
15dd committed May 27, 2023
1 parent 1514c6c commit cf1571b
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ android {
applicationId "com.cyh128.wenku8reader"
minSdk 24
targetSdk 33
versionCode 230525
versionName "1.0.0"
versionCode 230527
versionName "1.0.1"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
Binary file modified app/release/app-release.apk
Binary file not shown.
4 changes: 2 additions & 2 deletions app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "beta 2",
"versionCode": 230527,
"versionName": "1.0.1",
"outputFile": "app-release.apk"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.cyh128.wenku8reader.adapter.BookCaseAdapter;
import com.cyh128.wenku8reader.util.Wenku8Spider;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.google.android.material.snackbar.Snackbar;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -98,6 +99,7 @@ public boolean handleMessage(Message msg) {

bookCaseAdapter.notifyDataSetChanged();
swipeRefreshLayout.setRefreshing(false);
toolbar.setTitle("书架(共"+bookCaseAdapter.getItemCount()+"本)");
return false;
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ public void run() {
.setPositiveButton("明白", null)
.show();
canLoadmore = true;
bookListAdapter.notifyItemRemoved(bookListAdapter.getItemCount());
if (bookListAdapter != null) {
bookListAdapter.notifyItemRemoved(bookListAdapter.getItemCount());
}
--pageindex;
});
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

import static android.content.Context.MODE_PRIVATE;

import android.content.DialogInterface;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
Expand Down Expand Up @@ -58,7 +60,11 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
about.setOnClickListener(v -> {
MaterialAlertDialogBuilder dialogBuilder = new MaterialAlertDialogBuilder(getActivity());
dialogBuilder.setView(R.layout.dialog_about);
dialogBuilder.setPositiveButton("前往Github页面", null);
dialogBuilder.setPositiveButton("前往Github页面", (dialog, which) -> {
Uri uri = Uri.parse("https://github.com/15dd/wenku8reader"); //设置跳转的网站
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
});
dialogBuilder.show();
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@ public static List<BookcaseClass> getBookcase() throws IOException {
String author = c.getElementsByTag("td").eq(2).select("a").text();
String lastChapter = c.getElementsByTag("td").eq(3).select("a").text();
String aid = bookUrl.substring(bookUrl.indexOf("aid=") + 4, bookUrl.indexOf("&"));
String imgUrl = String.format("https://img.wenku8.com/image/%s/%s/%ss.jpg",aid.charAt(0),aid,aid);
String imgUrl;
if (aid.length() <= 3) {
imgUrl = String.format("https://img.wenku8.com/image/%s/%s/%ss.jpg",0,aid,aid);
} else {
imgUrl = String.format("https://img.wenku8.com/image/%s/%s/%ss.jpg",aid.charAt(0),aid,aid);
}

bookIndex += 1;

Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/layout/activity_app.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -9,15 +9,15 @@
<FrameLayout
android:id="@+id/appFragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
android:layout_height="match_parent"/>

<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_nav"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:labelVisibilityMode="labeled"
android:layout_gravity="bottom"
app:menu="@menu/nav_bottom_menu"
android:fitsSystemWindows="true" />
android:fitsSystemWindows="true"/>

</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_contents.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:layout_marginTop="5dp"
android:layout_marginTop="10dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="5dp"
android:text="introduce"
Expand Down

0 comments on commit cf1571b

Please sign in to comment.