Compare commits

...

9 Commits

Author SHA1 Message Date
95148a1071 Add distributionSha256Sum for gradle wrapper 2021-03-30 07:49:10 +03:00
b07fcf5842 Use static version code 2021-03-28 11:34:57 +03:00
f669a1ca0f Update version name 2021-03-25 19:38:50 +02:00
5a921ea862 Update readme 2021-03-25 19:30:28 +02:00
810efde0b0 Add metadata 2021-03-25 19:17:46 +02:00
03510a1f19 Update dependencies 2021-03-25 07:47:43 +02:00
049f32d2f0 Fix smooth page switching 2021-03-21 18:33:13 +02:00
11a9db3cc2 Fix "Unsupported image format" error 2021-03-21 18:18:57 +02:00
57dd5743f0 Fix tabs on landscape 2021-03-21 18:16:38 +02:00
30 changed files with 74 additions and 35 deletions

1
.gitignore vendored
View File

@@ -4,6 +4,7 @@
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/misc.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml

2
.idea/misc.xml generated
View File

@@ -29,7 +29,7 @@
</map>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

View File

@@ -15,20 +15,20 @@ Legacy build (Android 4.1+): [available here](https://github.com/nv95/Kotatsu/re
* Online manga catalogues
* Search manga by name and genre
* Reading history
* Favourites with custom categories
* Saving manga and reading it offline
* Tablet-optimized modern UI
* Reading third-party comics from CBZ
* Favourites organized by user-defined categories
* Downloading manga and reading it offline. Third-party CBZ archives also supported
* Tablet-optimized material design UI
* Standard and Webtoon-optimized reader
* Notifications about new chapters
* Updates feed
* Global search
* Notifications about new chapters with updates feed
### Screenshots
| ![Screenshot_20200226-210337](https://user-images.githubusercontent.com/8948226/80315102-3478db00-87fe-11ea-9ce8-4bbd1c254b2b.png) | ![Screenshot_20200226-210310](https://user-images.githubusercontent.com/8948226/80315110-3f337000-87fe-11ea-95df-944c196b6667.png) | ![Screenshot_20200226-210232](https://user-images.githubusercontent.com/8948226/80315121-49ee0500-87fe-11ea-8d9b-537a041bbf2f.png) |
| ![Screenshot_20200226-210337](https://github.com/nv95/Kotatsu/raw/devel/metadata/en-US/images/phoneScreenshots/1.png) | ![](https://github.com/nv95/Kotatsu/raw/devel/metadata/en-US/images/phoneScreenshots/2.png) | ![Screenshot_20200226-210232](https://github.com/nv95/Kotatsu/raw/devel/metadata/en-US/images/phoneScreenshots/3.png) |
|---|---|---|
| ![Screenshot_20200226-210405](https://user-images.githubusercontent.com/8948226/80315130-55d9c700-87fe-11ea-8350-2c8452906eb7.png) | ![Screenshot_20200226-210151](https://user-images.githubusercontent.com/8948226/80315135-612cf280-87fe-11ea-984c-aa18567d5bbc.png) | ![Screenshot_20200226-210223](https://user-images.githubusercontent.com/8948226/80315146-6be78780-87fe-11ea-8439-ca1ca578172b.png) |
| ![Screenshot_20200226-210405](https://github.com/nv95/Kotatsu/raw/devel/metadata/en-US/images/phoneScreenshots/4.png) | ![Screenshot_20200226-210151](https://github.com/nv95/Kotatsu/raw/devel/metadata/en-US/images/phoneScreenshots/5.png) | ![Screenshot_20200226-210223](https://github.com/nv95/Kotatsu/raw/devel/metadata/en-US/images/phoneScreenshots/6.png) |
| ![](https://github.com/nv95/Kotatsu/raw/devel/metadata/en-US/images/tenInchScreenshots/1.png) | ![](https://github.com/nv95/Kotatsu/raw/devel/metadata/en-US/images/tenInchScreenshots/2.png) |
|---|---|
### License
[![GNU GPLv3 Image](https://www.gnu.org/graphics/gplv3-127x51.png)](http://www.gnu.org/licenses/gpl-3.0.en.html)

View File

@@ -5,8 +5,6 @@ plugins {
id 'kotlin-parcelize'
}
def gitCommits = 'git rev-list --count HEAD'.execute([], rootDir).text.trim().toInteger()
android {
compileSdkVersion 30
buildToolsVersion '30.0.3'
@@ -15,8 +13,8 @@ android {
applicationId 'org.koitharu.kotatsu'
minSdkVersion 21
targetSdkVersion 30
versionCode gitCommits
versionName '1.0-rc3'
versionCode 364
versionName '1.0.1'
kapt {
arguments {
@@ -65,23 +63,23 @@ dependencies {
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2'
implementation 'androidx.core:core-ktx:1.5.0-beta03'
implementation 'androidx.activity:activity-ktx:1.2.1'
implementation 'androidx.fragment:fragment-ktx:1.3.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.0'
implementation 'androidx.lifecycle:lifecycle-service:2.3.0'
implementation 'androidx.lifecycle:lifecycle-process:2.3.0'
implementation 'androidx.core:core-ktx:1.5.0-rc01'
implementation 'androidx.activity:activity-ktx:1.2.2'
implementation 'androidx.fragment:fragment-ktx:1.3.2'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-service:2.3.1'
implementation 'androidx.lifecycle:lifecycle-process:2.3.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.2.0-beta02'
implementation 'androidx.recyclerview:recyclerview:1.2.0-rc01'
implementation 'androidx.viewpager2:viewpager2:1.1.0-alpha01'
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'androidx.work:work-runtime-ktx:2.5.0'
implementation 'com.google.android.material:material:1.3.0'
//noinspection LifecycleAnnotationProcessorWithJava8
kapt 'androidx.lifecycle:lifecycle-compiler:2.3.0'
kapt 'androidx.lifecycle:lifecycle-compiler:2.3.1'
implementation 'androidx.room:room-runtime:2.2.6'
implementation 'androidx.room:room-ktx:2.2.6'

View File

@@ -88,12 +88,12 @@ class PageLoader(
}
suspend fun convertInPlace(file: File) {
convertLock.withLock(file) {
convertLock.withLock(Lock) {
withContext(Dispatchers.Default) {
val image = BitmapFactory.decodeFile(file.absolutePath)
try {
file.outputStream().use { out ->
image.compress(Bitmap.CompressFormat.WEBP, 100, out)
image.compress(Bitmap.CompressFormat.PNG, 100, out)
}
} finally {
image.recycle()
@@ -101,4 +101,6 @@ class PageLoader(
}
}
}
private companion object Lock
}

View File

@@ -12,7 +12,9 @@ import org.koitharu.kotatsu.reader.ui.ReaderState
import org.koitharu.kotatsu.reader.ui.pager.BaseReader
import org.koitharu.kotatsu.reader.ui.pager.BaseReaderAdapter
import org.koitharu.kotatsu.reader.ui.pager.ReaderPage
import org.koitharu.kotatsu.reader.ui.pager.standard.PagerReaderFragment
import org.koitharu.kotatsu.utils.ext.*
import kotlin.math.absoluteValue
class ReversedReaderFragment : BaseReader<FragmentReaderStandardBinding>() {
@@ -58,7 +60,10 @@ class ReversedReaderFragment : BaseReader<FragmentReaderStandardBinding>() {
}
override fun switchPageTo(position: Int, smooth: Boolean) {
binding.pager.setCurrentItem(reversed(position), smooth)
binding.pager.setCurrentItem(
reversed(position),
smooth && (binding.pager.currentItem - position).absoluteValue < PagerReaderFragment.SMOOTH_SCROLL_LIMIT
)
}
override fun onPagesChanged(pages: List<ReaderPage>, pendingState: ReaderState?) {

View File

@@ -13,6 +13,7 @@ import org.koitharu.kotatsu.reader.ui.pager.BaseReader
import org.koitharu.kotatsu.reader.ui.pager.BaseReaderAdapter
import org.koitharu.kotatsu.reader.ui.pager.ReaderPage
import org.koitharu.kotatsu.utils.ext.*
import kotlin.math.absoluteValue
class PagerReaderFragment : BaseReader<FragmentReaderStandardBinding>() {
@@ -78,7 +79,10 @@ class PagerReaderFragment : BaseReader<FragmentReaderStandardBinding>() {
}
override fun switchPageTo(position: Int, smooth: Boolean) {
binding.pager.setCurrentItem(position, smooth)
binding.pager.setCurrentItem(
position,
smooth && (binding.pager.currentItem - position).absoluteValue < SMOOTH_SCROLL_LIMIT
)
}
override fun getCurrentState(): ReaderState? = bindingOrNull()?.run {
@@ -94,4 +98,9 @@ class PagerReaderFragment : BaseReader<FragmentReaderStandardBinding>() {
private fun notifyPageChanged(page: Int) {
viewModel.onCurrentPageChanged(page)
}
companion object {
const val SMOOTH_SCROLL_LIMIT = 3
}
}

View File

@@ -88,10 +88,6 @@ class WebtoonReaderFragment : BaseReader<FragmentReaderWebtoonBinding>() {
}
override fun switchPageTo(position: Int, smooth: Boolean) {
if (smooth) {
binding.recyclerView.smoothScrollToPosition(position)
} else {
binding.recyclerView.firstItem = position
}
binding.recyclerView.firstItem = position
}
}

View File

@@ -23,13 +23,14 @@
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabs"
style="@style/Widget.MaterialComponents.TabLayout.Colored"
style="@style/Widget.MaterialComponents.TabLayout.PrimarySurface"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:background="@android:color/transparent"
app:tabGravity="start"
app:tabMode="scrollable" />
app:tabMode="scrollable"
app:tabSelectedTextColor="?colorOnPrimarySurface" />
</com.google.android.material.appbar.MaterialToolbar>

View File

@@ -4,3 +4,4 @@ distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
distributionSha256Sum=22449f5231796abd892c98b2a07c9ceebe4688d192cd2d6763f8e3bf8acbedeb

View File

@@ -0,0 +1,12 @@
Kotatsu is a free and open source manga reader for Android.<br>
Main Features:
<ul>
<li>Online manga catalogues</li>
<li>Search manga by name and genre</li>
<li>Reading history</li>
<li>Favourites organized by user-defined categories</li>
<li>Downloading manga and reading it offline. Third-party CBZ archives also supported</li>
<li>Tablet-optimized material design UI</li>
<li>Standard and Webtoon-optimized reader</li>
<li>Notifications about new chapters with updates feed</li>
</ul>

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

View File

@@ -0,0 +1 @@
Manga reader with online catalogues

View File

@@ -0,0 +1,12 @@
Kotatsu - приложения для чтения манги с открытым исходным кодом.<br>
Основные возможности:
<ul>
<li>Онлайн каталоги с мангой</li>
<li>Поиск манги по имени и жанрам</li>
<li>История чтения</li>
<li>Избранное с пользовательскими категориями</li>
<li>Возможность сохранять мангу и читать её оффлайн. Поддержка сторонних комиксов в формате CBZ</li>
<li>Интерфейс также оптимизирован для планшетов</li>
<li>Поддержка манхвы (Webtoon)</li>
<li>Уведомления о новых главах и лента обновлений</li>
</ul>

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

View File

@@ -0,0 +1 @@
Приложение для чтения манги с онлайн каталогами