Skip to content

Commit

Permalink
Merge pull request #479 from LoxiaLiSA/master
Browse files Browse the repository at this point in the history
gradle 升级,依赖库升级,image detail fragment改版
  • Loading branch information
CeuiLiSA authored Feb 21, 2023
2 parents 35fc0d6 + d5488ff commit 5fc8f86
Show file tree
Hide file tree
Showing 114 changed files with 3,428 additions and 512 deletions.
54 changes: 36 additions & 18 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ apply plugin: 'org.jmailen.kotlinter'
apply plugin: "androidx.navigation.safeargs"

android {
compileSdkVersion 31
compileSdkVersion 33

defaultConfig {
applicationId "ceui.lisa.pixiv"
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 33
versionCode 223
versionName "3.2.23"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -63,12 +63,16 @@ android {

buildFeatures {
dataBinding true
viewBinding true
}

packagingOptions {
exclude 'META-INF/MANIFEST.MF'
resources {
excludes += ['META-INF/MANIFEST.MF']
}
}

namespace 'ceui.lisa'

// lintOptions {
// checkReleaseBuilds false
// // Or, if you prefer, you can continue to check for errors in release builds,
Expand All @@ -91,8 +95,11 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.8.0'

//=============== lifecycle
def lifecycle_version = '2.5.1'
Expand All @@ -103,14 +110,14 @@ dependencies {


//=============== Navigation
def nav_version = "2.5.1"
def nav_version = "2.5.3"
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.8.0'
implementation "androidx.core:core-ktx:$kotlin_version"

api 'com.squareup.retrofit2:retrofit:2.9.0'
api 'com.squareup.retrofit2:converter-gson:2.9.0'
Expand All @@ -120,26 +127,35 @@ dependencies {
api 'io.reactivex.rxjava2:rxandroid:2.1.1'


implementation 'com.github.bumptech.glide:glide:4.12.0'
kapt 'com.github.bumptech.glide:compiler:4.12.0'
implementation ('com.github.bumptech.glide:okhttp3-integration:4.12.0'){
implementation 'com.github.bumptech.glide:glide:4.14.2'
kapt 'com.github.bumptech.glide:compiler:4.14.2'
implementation ('com.github.bumptech.glide:okhttp3-integration:4.14.1'){
exclude group: 'glide-parent'
}

implementation 'com.github.lzyzsd:circleprogress:1.2.1'


api 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.3'
api 'com.scwang.smartrefresh:SmartRefreshHeader:1.1.3'
// api 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.3'
// api 'com.scwang.smartrefresh:SmartRefreshHeader:1.1.3'

implementation 'io.github.scwang90:refresh-layout-kernel:2.0.5' //核心必须依赖
implementation 'io.github.scwang90:refresh-header-classics:2.0.5' //经典刷新头
implementation 'io.github.scwang90:refresh-header-radar:2.0.5' //雷达刷新头
implementation 'io.github.scwang90:refresh-header-falsify:2.0.5' //虚拟刷新头
implementation 'io.github.scwang90:refresh-header-material:2.0.5' //谷歌刷新头
implementation 'io.github.scwang90:refresh-header-two-level:2.0.5' //二级刷新头
implementation 'io.github.scwang90:refresh-footer-ball:2.0.5' //球脉冲加载
implementation 'io.github.scwang90:refresh-footer-classics:2.0.5' //经典加载

// okhttp3系列组件版本最高到 4.4.1,参看 RubySSLSocketFactory
implementation 'com.squareup.okhttp3:logging-interceptor:4.4.1'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'jp.wasabeef:glide-transformations:4.3.0'
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'com.github.ybq:Android-SpinKit:1.4.0'
implementation 'androidx.room:room-runtime:2.4.1'
kapt 'androidx.room:room-compiler:2.4.1'
implementation 'androidx.room:room-runtime:2.5.0'
kapt 'androidx.room:room-compiler:2.5.0'
implementation 'com.github.Justson.AgentWeb:agentweb-core:v4.1.9-androidx'
implementation 'com.github.Justson.AgentWeb:agentweb-filechooser:v4.1.9-androidx'
implementation 'com.facebook.rebound:rebound:0.3.8'
Expand All @@ -155,8 +171,8 @@ dependencies {
implementation 'com.github.skydoves:transformationlayout:1.1.1'
implementation 'com.blankj:utilcodex:1.31.0'
implementation 'com.safframework.log:saf-logginginterceptor:1.6.0'
implementation 'com.google.firebase:firebase-analytics:21.1.0'
implementation 'com.google.firebase:firebase-crashlytics:18.2.12'
implementation 'com.google.firebase:firebase-analytics:21.2.0'
implementation 'com.google.firebase:firebase-crashlytics:18.3.5'

implementation 'com.afollestad:drag-select-recyclerview:2.4.0'

Expand Down Expand Up @@ -186,7 +202,7 @@ dependencies {
implementation 'com.tencent:mmkv-static:1.2.12'
implementation 'com.github.tbruyelle:rxpermissions:0.12'

implementation 'androidx.webkit:webkit:1.4.0'
implementation 'androidx.webkit:webkit:1.6.0'

implementation 'com.hjq:toast:8.8'

Expand All @@ -200,7 +216,9 @@ dependencies {
implementation 'org.honorato.multistatetogglebutton:multistatetogglebutton:0.2.2'
implementation "io.noties.markwon:core:4.6.2"

coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.6'
implementation 'com.davemorrissey.labs:subsampling-scale-image-view-androidx:3.10.0'

coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.2'

configurations {
all*.exclude group: 'com.android.support', module: 'support-v13'
Expand Down
74 changes: 34 additions & 40 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:dist="http://schemas.android.com/apk/distribution"
xmlns:tools="http://schemas.android.com/tools"
package="ceui.lisa">
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission
Expand All @@ -18,18 +17,25 @@

<dist:module dist:instant="true" />

<queries>
<package android:name="com.sina.weibo" />
</queries>

<application
android:name=".activities.Shaft"
android:allowBackup="true"
android:fullBackupOnly="true"
android:hardwareAccelerated="true"
android:icon="@mipmap/logo_final"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/logo_final_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:hardwareAccelerated="true"
tools:ignore="UnusedAttribute">
<activity
android:name="ceui.loxia.test.ListActivity"
android:exported="false" />

<provider
android:name="androidx.core.content.FileProvider"
Expand Down Expand Up @@ -75,8 +81,8 @@
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation" />
<activity
android:name=".activities.OutWakeActivity"
android:label="@string/string_310"
android:exported="true">
android:exported="true"
android:label="@string/string_310">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

Expand All @@ -88,21 +94,19 @@
<data android:host="www.pixiv.net" />
<data android:host="touch.pixiv.net" />
<data android:host="pixiv.net" />
<data android:pathPrefix="/member_illust.php"/>
<data android:pathPrefix="/novel/show.php"/>
<data android:pathPrefix="/novel/member.php"/>
<data android:pathPrefix="/member.php"/>
<data android:pathPrefix="/premium/android"/>
<data android:pathPrefix="/artworks/"/>
<data android:pathPrefix="/en/artworks/"/>
<data android:pathPrefix="/users/"/>
<data android:pathPrefix="/en/users/"/>
<data android:pathPrefix="/i/"/>
<data android:pathPrefix="/u/"/>
<data android:pathPrefix="/n/"/>

<data android:pathPrefix="/member_illust.php" />
<data android:pathPrefix="/novel/show.php" />
<data android:pathPrefix="/novel/member.php" />
<data android:pathPrefix="/member.php" />
<data android:pathPrefix="/premium/android" />
<data android:pathPrefix="/artworks/" />
<data android:pathPrefix="/en/artworks/" />
<data android:pathPrefix="/users/" />
<data android:pathPrefix="/en/users/" />
<data android:pathPrefix="/i/" />
<data android:pathPrefix="/u/" />
<data android:pathPrefix="/n/" />
</intent-filter>

<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

Expand All @@ -111,10 +115,8 @@

<data android:scheme="http" />
<data android:scheme="https" />

<data android:host="i.pximg.net" />
</intent-filter>

<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

Expand All @@ -123,11 +125,9 @@

<data android:scheme="http" />
<data android:scheme="https" />

<data android:host="www.pixiv.me" />
<data android:host="pixiv.me" />
</intent-filter>

<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

Expand All @@ -136,7 +136,6 @@

<data android:scheme="pixiv" />
</intent-filter>

<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

Expand All @@ -145,7 +144,6 @@

<data android:scheme="shaftintent" />
</intent-filter>

<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

Expand All @@ -154,7 +152,6 @@

<data android:scheme="http" />
<data android:scheme="https" />

<data android:host="www.pixivision.net" />
</intent-filter>
</activity>
Expand All @@ -165,40 +162,42 @@
<meta-data
android:name="notch.config"
android:value="portrait|landscape" />

<meta-data
android:name="ceui.lisa.core.GlideConfiguration"
android:value="GlideModule" />

<activity android:name=".activities.UserActivity" />
<activity android:name=".activities.SearchActivity"
<activity
android:name=".activities.SearchActivity"
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation" />
<activity android:name=".activities.VActivity" />
<activity android:name=".activities.UActivity"
<activity
android:name=".activities.UActivity"
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation" />
<activity
android:name=".activities.OutReversActivity"
android:label="@string/string_311"
android:exported="true">

android:exported="true"
android:label="@string/string_311">
<intent-filter>
<action android:name="android.intent.action.SEND" />

<category android:name="android.intent.category.DEFAULT" />

<data android:mimeType="image/*" />
</intent-filter>

</activity>
<activity android:name=".activities.VPActivity" />
<activity android:name=".activities.NovelActivity" />
<activity android:name=".jetpack.NavActivity" />

<receiver
android:label="@string/recommend_illust"
android:name=".notification.RecommendAppWidgetProvider"
android:exported="false">
android:exported="false"
android:label="@string/recommend_illust">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>

<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/recommend_appwidget_provider_info" />
Expand All @@ -208,11 +207,6 @@
android:name=".notification.RecommendAppWidgetProvider$RecommendAppWidgetService"
android:exported="false"
android:permission="android.permission.BIND_REMOTEVIEWS" />

</application>

<queries>
<package android:name="com.sina.weibo" />
</queries>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
import ceui.lisa.helper.PageTransformerHelper;
import ceui.lisa.models.IllustsBean;
import ceui.lisa.utils.Common;
import ceui.lisa.utils.Params;
import ceui.lisa.utils.PixivOperate;
import ceui.loxia.ImageFragment;

/**
* 图片二级详情
Expand Down Expand Up @@ -55,7 +57,11 @@ protected void initView() {
baseBind.viewPager.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager()) {
@Override
public Fragment getItem(int i) {
return FragmentImageDetail.newInstance(mIllustsBean, i);
if (mIllustsBean.getPage_count() > 1) {
return ImageFragment.Companion.newInstance(mIllustsBean.getMeta_pages().get(i).getImage_urls().getMaxImage());
} else {
return ImageFragment.Companion.newInstance(mIllustsBean.getMeta_single_page().getOriginal());
}
}

@Override
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/ceui/lisa/activities/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import ceui.lisa.utils.ReverseImage;
import ceui.lisa.utils.ReverseWebviewCallback;
import ceui.lisa.view.DrawerLayoutViewPager;
import ceui.loxia.test.ListActivity;

import static ceui.lisa.activities.Shaft.sUserModel;

Expand Down Expand Up @@ -220,6 +221,7 @@ protected void initData() {
if (sUserModel != null && sUserModel.getUser() != null && sUserModel.getUser().isIs_login()) {
if (Common.isAndroidQ()) {
initFragment();
// startActivity(new Intent(this, ListActivity.class));
} else {
new RxPermissions(mActivity)
.requestEachCombined(
Expand Down
7 changes: 4 additions & 3 deletions app/src/main/java/ceui/lisa/activities/Shaft.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
import com.google.firebase.analytics.FirebaseAnalytics;
import com.google.gson.Gson;
import com.hjq.toast.ToastUtils;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.scwang.smartrefresh.layout.footer.ClassicsFooter;
import com.scwang.smartrefresh.layout.header.ClassicsHeader;

import com.scwang.smart.refresh.footer.ClassicsFooter;
import com.scwang.smart.refresh.header.ClassicsHeader;
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
import com.tencent.mmkv.MMKV;

import androidx.annotation.NonNull;
Expand Down
Loading

0 comments on commit 5fc8f86

Please sign in to comment.