⚠️ ᴛʜɪs ʀᴇᴘᴏsɪᴛᴏʀʏ ɪs ᴅᴇᴘʀᴇᴄᴀᴛᴇᴅ⚠️ We moved all the
r2-*-kotlin
modules to a single repository:kotlin-toolkit
.
readium / r2-navigator-kotlin Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 3-Clause "New" or "Revised" License
License: BSD 3-Clause "New" or "Revised" License
⚠️ ᴛʜɪs ʀᴇᴘᴏsɪᴛᴏʀʏ ɪs ᴅᴇᴘʀᴇᴄᴀᴛᴇᴅ⚠️ We moved all the
r2-*-kotlin
modules to a single repository:kotlin-toolkit
.
When highlighting multiple paragraphs, the first and last paragraphs will appear normally, but the middle paragraphs will be displayed as a color block instead of being marked line by line.
When toggling the 2-page spread mode, it's not applied right away. We need to close and reopen the publication to see the effect.
Hi,
Im trying use the "R2ViewPager" and "R2EpubPageFragment" but getting error that my activity is not instance of "R2EpubActivity".
Can you change it to an interface (https://kotlinlang.org/docs/reference/interfaces.html) and a listener instead of the activity?
Don't make sense projects change their activity to use a ViewPager.
Thanks.
@IdMostapha commented on Fri Aug 03 2018
The navigator currently uses defines its own fragments and activity, making it hard to integrate into another project. I suggest that all fragments and activities in this repo are moved to the test app and the navigator logic is kept in standalone classes and interfaces.
Hi,
How to publish locally or use it as module into my project?
I have added it into my build.gradle:
// readium 2
if (findProject(':r2-shared')) {
implementation project(':r2-shared')
} else {
implementation "com.github.readium:r2-shared-kotlin:1.0.10"
}
if (findProject(':r2-navigator')) {
implementation project(':r2-navigator')
} else {
implementation "com.github.readium:r2-navigator-kotlin:1.0.10"
}
if (findProject(':r2-streamer')) {
implementation project(':r2-streamer')
} else {
implementation "com.github.readium:r2-streamer-kotlin:1.0.10"
}
if (findProject(':r2-opds')) {
implementation project(':r2-opds')
} else {
implementation "com.github.readium:r2-opds-kotlin:1.0.9"
}
I have added the plugin:
apply plugin: 'com.github.dcendents.android-maven'
And on settings.gradle:
include ':r2-navigator'
project(':r2-navigator').projectDir = file("/Users/paulo/Developer/workspaces/android/r2-navigator-kotlin/r2-navigator")
I have added the dependency on root build.gradle file:
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
And variables:
ext.kotlin_version = '1.3.31'
ext.r2branch = 'develop'
But always get error:
ERROR: Unable to resolve dependency for ':app@ubookDebug/compileClasspath': Could not resolve project :r2-navigator.
Show Details
Affected Modules: app
Can anyone help me?
Hello.
I use the version 2.0.0-alpha.2 of readium kotlin libs.
The stacktrace of the crash:
2020-12-10 00:15:19.071 3958-3958/org.readium.r2reader E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.readium.r2reader, PID: 3958
kotlin.UninitializedPropertyAccessException: lateinit property webView has not been initialized
at org.readium.r2.navigator.pager.R2EpubPageFragment.getWebView(R2EpubPageFragment.kt:42)
at org.readium.r2.navigator.epub.EpubNavigatorFragment$onCreateView$2.onPageSelected(EpubNavigatorFragment.kt:175)
at org.readium.r2.navigator.pager.R2RTLViewPager$ReversingOnPageChangeListener.onPageSelected(R2RTLViewPager.java:265)
at androidx.viewpager.widget.ViewPager.dispatchOnPageSelected(ViewPager.java:1947)
at androidx.viewpager.widget.ViewPager.setCurrentItemInternal(ViewPager.java:665)
at androidx.viewpager.widget.ViewPager.setCurrentItemInternal(ViewPager.java:631)
at androidx.viewpager.widget.ViewPager.onRestoreInstanceState(ViewPager.java:1462)
at org.readium.r2.navigator.pager.R2RTLViewPager.onRestoreInstanceState(R2RTLViewPager.java:186)
at android.view.View.dispatchRestoreInstanceState(View.java:20743)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3986)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3992)
at android.view.View.restoreHierarchyState(View.java:20721)
at androidx.fragment.app.Fragment.restoreViewState(Fragment.java:636)
at androidx.fragment.app.Fragment.restoreViewState(Fragment.java:2997)
at androidx.fragment.app.Fragment.performActivityCreated(Fragment.java:2988)
at androidx.fragment.app.FragmentStateManager.activityCreated(FragmentStateManager.java:584)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:280)
at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:112)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1636)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3112)
at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:3056)
at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:251)
at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:473)
at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:246)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1435)
at android.app.Activity.performStart(Activity.java:8024)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3475)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
To reproduce it is enough to open a publication, swipe to another page and rotate the device.
The crash constantly reproduces in r2-testapp-kotlin (I've downloaded project from develop branch several days ago, so I think it's up-to-date), similarly in my app where I derive my activity from R2EpubActivity.
The toc does not point to the good chapter : Toc 10 -> Chapter 9
This error happens when upgrading Kotlin from 1.3 to 1.4:
Using 'contains(Int): Boolean' is an error. This contains
operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.
Hi,
There is any special reason to use beta, alpha and rc version of androidx libraries?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.