mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
chore: Some more effort moving widget to its own module
This commit is contained in:
parent
79b5494307
commit
4a9a7813e0
34 changed files with 205 additions and 64 deletions
17
presentation/core/build.gradle.kts
Normal file
17
presentation/core/build.gradle.kts
Normal file
|
@ -0,0 +1,17 @@
|
|||
plugins {
|
||||
id("com.android.library")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "yokai.presentation.core"
|
||||
|
||||
defaultConfig {
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(libs.material)
|
||||
}
|
0
presentation/core/consumer-rules.pro
Normal file
0
presentation/core/consumer-rules.pro
Normal file
21
presentation/core/proguard-rules.pro
vendored
Normal file
21
presentation/core/proguard-rules.pro
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
2
presentation/core/src/main/AndroidManifest.xml
Normal file
2
presentation/core/src/main/AndroidManifest.xml
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest />
|
|
@ -0,0 +1,12 @@
|
|||
package yokai.presentation.core
|
||||
|
||||
object Constants {
|
||||
const val MAIN_ACTIVITY = "eu.kanade.tachiyomi.ui.main.MainActivity"
|
||||
const val SEARCH_ACTIVITY = "eu.kanade.tachiyomi.ui.main.SearchActivity"
|
||||
|
||||
const val SHORTCUT_RECENTS = "eu.kanade.tachiyomi.SHOW_RECENTS"
|
||||
const val SHORTCUT_MANGA = "eu.kanade.tachiyomi.SHOW_MANGA"
|
||||
const val SHORTCUT_MANGA_BACK = "eu.kanade.tachiyomi.SHOW_MANGA_BACK"
|
||||
|
||||
const val MANGA_EXTRA = "manga"
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package yokai.presentation.core.util
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import yokai.presentation.core.Constants
|
||||
|
||||
object IntentCommon {
|
||||
fun openManga(context: Context, id: Long?, canReturnToMain: Boolean = false) =
|
||||
Intent(context, Class.forName(Constants.SEARCH_ACTIVITY))
|
||||
.apply {
|
||||
action = if (canReturnToMain) Constants.SHORTCUT_MANGA_BACK else Constants.SHORTCUT_MANGA
|
||||
putExtra(Constants.MANGA_EXTRA, id)
|
||||
}
|
||||
}
|
4
presentation/core/src/main/res/values/colors.xml
Normal file
4
presentation/core/src/main/res/values/colors.xml
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="cover_placeholder">#1F888888</color>
|
||||
</resources>
|
Loading…
Add table
Add a link
Reference in a new issue