Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_goodmoney
Commits
de7f256a
Commit
de7f256a
authored
Feb 26, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
书城改为旧版方式
parent
77f091c5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
100 additions
and
84 deletions
+100
-84
build.gradle
GoodMoney/app/build.gradle
+2
-1
iReader-release-androidx-1.0.3.1-haozhuanqian.aar
...pp/libs/iReader-release-androidx-1.0.3.1-haozhuanqian.aar
+0
-0
ZhangyueManager.kt
.../main/java/com/mints/goodmoney/manager/ZhangyueManager.kt
+14
-15
MyZhangyueFragment.kt
...ava/com/mints/goodmoney/ui/fragment/MyZhangyueFragment.kt
+44
-27
ZhangyueFragment.kt
.../java/com/mints/goodmoney/ui/fragment/ZhangyueFragment.kt
+40
-41
No files found.
GoodMoney/app/build.gradle
View file @
de7f256a
...
@@ -233,7 +233,8 @@ dependencies {
...
@@ -233,7 +233,8 @@ dependencies {
implementation
'com.liulishuo.filedownloader:library:1.7.7'
implementation
'com.liulishuo.filedownloader:library:1.7.7'
implementation
"org.greenrobot:eventbus:3.1.0-RC"
implementation
"org.greenrobot:eventbus:3.1.0-RC"
// 掌阅书城
// 掌阅书城
implementation
(
name:
'iReader-release-androidx-1.0.3.1-haozhuanqian'
,
ext:
'aar'
)
// implementation(name: 'iReader-release-androidx-1.0.3.1_haozhuanqian', ext: 'aar')
implementation
(
name:
'iReader-release-1.0.1'
,
ext:
'aar'
)
implementation
'com.alibaba:fastjson:1.2.11'
implementation
'com.alibaba:fastjson:1.2.11'
implementation
'androidx.annotation:annotation:1.0.0'
implementation
'androidx.annotation:annotation:1.0.0'
implementation
'androidx.core:core:1.0.0'
implementation
'androidx.core:core:1.0.0'
...
...
GoodMoney/app/libs/iReader-release-androidx-1.0.3.1-haozhuanqian.aar
deleted
100755 → 0
View file @
77f091c5
File deleted
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/ZhangyueManager.kt
View file @
de7f256a
package
com.mints.goodmoney.manager
package
com.mints.goodmoney.manager
import
android.app.Application
import
android.app.Application
import
com.ireader.ireadersdk.Config
import
com.ireader.ireadersdk.IreaderApi
import
com.ireader.ireadersdk.IreaderApi
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.MintsApplication
import
java.lang.Exception
import
java.lang.Exception
...
@@ -15,24 +14,24 @@ object ZhangyueManager {
...
@@ -15,24 +14,24 @@ object ZhangyueManager {
private
const
val
APPID
=
"10054"
private
const
val
APPID
=
"10054"
fun
onCreateIreader
(
application
:
Application
)
{
fun
onCreateIreader
(
application
:
Application
)
{
try
{
IreaderApi
.
onCreate
(
application
)
val
config
=
Config
.
Builder
()
.
setZYAppId
(
APPID
)
.
setOaId
(
MintsApplication
.
OAID
)
.
setSupportCSJ
(
true
)
.
setSupportGDT
(
true
)
.
build
()
IreaderApi
.
attachBaseContext
(
application
,
config
)
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
// try {
// try {
// IreaderApi.attachBaseContext(application)
// IreaderApi.onCreate(application)
// IreaderApi.onCreate(application, APPID)
// val config = Config.Builder()
// .setZYAppId(APPID)
// .setOaId(MintsApplication.OAID)
// .setSupportCSJ(true)
// .setSupportGDT(true)
// .build()
// IreaderApi.attachBaseContext(application, config)
// } catch (e: Exception) {
// } catch (e: Exception) {
// e.printStackTrace()
// e.printStackTrace()
// }
// }
try
{
IreaderApi
.
attachBaseContext
(
application
)
IreaderApi
.
onCreate
(
application
,
APPID
)
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyZhangyueFragment.kt
View file @
de7f256a
...
@@ -61,6 +61,23 @@ class MyZhangyueFragment : LazyLoadBaseFragment(), BookView, IreaderApi.OnReadCh
...
@@ -61,6 +61,23 @@ class MyZhangyueFragment : LazyLoadBaseFragment(), BookView, IreaderApi.OnReadCh
bookPresenter
.
detachView
()
bookPresenter
.
detachView
()
}
}
override
fun
onReadStart
()
{
}
override
fun
onReadEnd
(
time
:
Long
)
{
// LogUtil.d(TAG, "onReadEnd time:" + time)
// LogUtil.d(TAG, "onReadEnd time(Int):" + (time/1000).toInt())
val
seconds
=
(
time
/
1000
).
toInt
()
// 阅读5秒以上 保存时长
if
(
seconds
>
5
)
{
bookPresenter
.
addReadSeconds
(
seconds
)
}
}
override
fun
onReadPage
(
time
:
Long
)
{
}
override
fun
readSecondsSuc
(
coin
:
Int
)
{
override
fun
readSecondsSuc
(
coin
:
Int
)
{
if
(
coin
>
0
)
{
if
(
coin
>
0
)
{
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
...
@@ -84,31 +101,31 @@ class MyZhangyueFragment : LazyLoadBaseFragment(), BookView, IreaderApi.OnReadCh
...
@@ -84,31 +101,31 @@ class MyZhangyueFragment : LazyLoadBaseFragment(), BookView, IreaderApi.OnReadCh
}
}
}
}
override
fun
addBookShelf
(
p0
:
Bundle
?)
{
//
override fun addBookShelf(p0: Bundle?) {
TODO
(
"Not yet implemented"
)
//
TODO("Not yet implemented")
}
//
}
//
override
fun
onReadStart
(
p0
:
Bundle
?)
{
//
override fun onReadStart(p0: Bundle?) {
TODO
(
"Not yet implemented"
)
//
TODO("Not yet implemented")
}
//
}
//
override
fun
onReadEnd
(
p0
:
Bundle
?)
{
//
override fun onReadEnd(p0: Bundle?) {
val
seconds
=
(
p0
!!
.
getLong
(
IreaderApi
.
BOOK_TIME
)
/
1000
).
toInt
()
//
val seconds = (p0!!.getLong(IreaderApi.BOOK_TIME) / 1000).toInt()
// 阅读5秒以上 保存时长
//
// 阅读5秒以上 保存时长
if
(
seconds
>
5
)
{
//
if (seconds > 5) {
bookPresenter
.
addReadSeconds
(
seconds
)
//
bookPresenter.addReadSeconds(seconds)
}
//
}
}
//
}
//
override
fun
onDeleteBook
(
p0
:
String
?)
{
//
override fun onDeleteBook(p0: String?) {
TODO
(
"Not yet implemented"
)
//
TODO("Not yet implemented")
}
//
}
//
override
fun
onReadPage
(
p0
:
Bundle
?)
{
//
override fun onReadPage(p0: Bundle?) {
TODO
(
"Not yet implemented"
)
//
TODO("Not yet implemented")
}
//
}
//
override
fun
onChangeNight
(
p0
:
Boolean
)
{
//
override fun onChangeNight(p0: Boolean) {
TODO
(
"Not yet implemented"
)
//
TODO("Not yet implemented")
}
//
}
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/ZhangyueFragment.kt
View file @
de7f256a
...
@@ -60,23 +60,22 @@ class ZhangyueFragment : LazyLoadBaseFragment(), BookView, IreaderApi.OnReadChan
...
@@ -60,23 +60,22 @@ class ZhangyueFragment : LazyLoadBaseFragment(), BookView, IreaderApi.OnReadChan
bookPresenter
.
detachView
()
bookPresenter
.
detachView
()
}
}
// override fun onReadStart() {
override
fun
onReadStart
()
{
// }
}
//
// override fun onReadEnd(time: Long) {
override
fun
onReadEnd
(
time
:
Long
)
{
//// LogUtil.d(TAG, "onReadEnd time:" + time)
// LogUtil.d(TAG, "onReadEnd time:" + time)
//// LogUtil.d(TAG, "onReadEnd time(Int):" + (time/1000).toInt())
// LogUtil.d(TAG, "onReadEnd time(Int):" + (time/1000).toInt())
//
// val seconds = (time / 1000).toInt()
// // 阅读5秒以上 保存时长
// if (seconds > 5) {
// bookPresenter.addReadSeconds(seconds)
// }
// }
//
// override fun onReadPage(time: Long) {
// }
val
seconds
=
(
time
/
1000
).
toInt
()
// 阅读5秒以上 保存时长
if
(
seconds
>
5
)
{
bookPresenter
.
addReadSeconds
(
seconds
)
}
}
override
fun
onReadPage
(
time
:
Long
)
{
}
override
fun
readSecondsSuc
(
coin
:
Int
)
{
override
fun
readSecondsSuc
(
coin
:
Int
)
{
if
(
coin
>
0
)
{
if
(
coin
>
0
)
{
...
@@ -101,29 +100,29 @@ class ZhangyueFragment : LazyLoadBaseFragment(), BookView, IreaderApi.OnReadChan
...
@@ -101,29 +100,29 @@ class ZhangyueFragment : LazyLoadBaseFragment(), BookView, IreaderApi.OnReadChan
}
}
}
}
override
fun
addBookShelf
(
p0
:
Bundle
?)
{
//
override fun addBookShelf(p0: Bundle?) {
}
//
}
//
override
fun
onReadStart
(
p0
:
Bundle
?)
{
//
override fun onReadStart(p0: Bundle?) {
}
//
}
//
override
fun
onReadEnd
(
p0
:
Bundle
?)
{
//
override fun onReadEnd(p0: Bundle?) {
// LogUtil.d(TAG, "onReadEnd time:" + time)
//
// LogUtil.d(TAG, "onReadEnd time:" + time)
// LogUtil.d(TAG, "onReadEnd time(Int):" + (time/1000).toInt())
//
//
LogUtil.d(TAG, "onReadEnd time(Int):" + (time/1000).toInt())
//
val
seconds
=
(
p0
!!
.
getLong
(
IreaderApi
.
BOOK_TIME
).
toLong
()
/
1000
).
toInt
()
//
val seconds = (p0!!.getLong(IreaderApi.BOOK_TIME).toLong() / 1000).toInt()
// 阅读5秒以上 保存时长
//
// 阅读5秒以上 保存时长
if
(
seconds
>
5
)
{
//
if (seconds > 5) {
bookPresenter
.
addReadSeconds
(
seconds
)
//
bookPresenter.addReadSeconds(seconds)
}
//
}
}
//
}
//
override
fun
onDeleteBook
(
p0
:
String
?)
{
//
override fun onDeleteBook(p0: String?) {
}
//
}
//
override
fun
onReadPage
(
p0
:
Bundle
?)
{
//
override fun onReadPage(p0: Bundle?) {
}
//
}
//
override
fun
onChangeNight
(
p0
:
Boolean
)
{
//
override fun onChangeNight(p0: Boolean) {
}
//
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment