1 历史页面3个fragment ui初步 2.room引入
This commit is contained in:
parent
30e59cb250
commit
f7d85a0869
|
|
@ -1,26 +1,30 @@
|
||||||
|
import Deps.room_version
|
||||||
import com.android.build.api.dsl.ApplicationProductFlavor
|
import com.android.build.api.dsl.ApplicationProductFlavor
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
id("com.android.application")
|
||||||
kotlin("android")
|
id("org.jetbrains.kotlin.android")
|
||||||
id("kotlin-parcelize")
|
id("kotlin-parcelize")
|
||||||
kotlin("kapt")
|
id("kotlin-kapt")
|
||||||
id("dagger.hilt.android.plugin")
|
id("dagger.hilt.android.plugin")
|
||||||
//TODO - enable later: id("com.google.gms.google-services")
|
|
||||||
id("com.google.firebase.crashlytics")
|
id("com.google.firebase.crashlytics")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
// 禁用重复类检查(调试模式)
|
// 禁用重复类检查(调试模式)
|
||||||
if (gradle.startParameter.taskNames.any { it.contains("Debug", ignoreCase = true) }) {
|
/*if (gradle.startParameter.taskNames.any { it.contains("Debug", ignoreCase = true) }) {
|
||||||
tasks.configureEach {
|
tasks.configureEach {
|
||||||
if (name.contains("check", ignoreCase = true) &&
|
if (name.contains("check", ignoreCase = true) &&
|
||||||
name.contains("DuplicateClasses", ignoreCase = true)) {
|
name.contains("DuplicateClasses", ignoreCase = true)) {
|
||||||
enabled = false
|
enabled = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
namespace = Version.applicationId
|
namespace = Version.applicationId
|
||||||
compileSdk = 36
|
compileSdk = 36
|
||||||
|
|
@ -168,6 +172,23 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configurations.all {
|
||||||
|
resolutionStrategy {
|
||||||
|
force("org.jetbrains:annotations:23.0.0")
|
||||||
|
|
||||||
|
dependencySubstitution {
|
||||||
|
substitute(module("com.intellij:annotations"))
|
||||||
|
.using(module("org.jetbrains:annotations:23.0.0"))
|
||||||
|
}
|
||||||
|
|
||||||
|
eachDependency {
|
||||||
|
if (requested.group == "com.intellij" && requested.name == "annotations") {
|
||||||
|
useTarget("org.jetbrains:annotations:23.0.0")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(fileTree("dir" to "libs", "include" to listOf("*.jar", "*.aar")))
|
implementation(fileTree("dir" to "libs", "include" to listOf("*.jar", "*.aar")))
|
||||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
|
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
|
||||||
|
|
@ -322,6 +343,12 @@ dependencies {
|
||||||
implementation(Deps.immersionbar)
|
implementation(Deps.immersionbar)
|
||||||
implementation(Deps.immersionbarktx)
|
implementation(Deps.immersionbarktx)
|
||||||
|
|
||||||
|
// room
|
||||||
|
implementation(Deps.room_runtime)
|
||||||
|
implementation(Deps.room_ktx)
|
||||||
|
implementation(Deps.room_compiler)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
implementation(project(mapOf("path" to ":loadingstateview")))
|
implementation(project(mapOf("path" to ":loadingstateview")))
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@ class ChatRepository @Inject constructor(private val chatService: ChatService) :
|
||||||
) = executeHttp {
|
) = executeHttp {
|
||||||
/*val params = mutableMapOf<String, RequestBody>()
|
/*val params = mutableMapOf<String, RequestBody>()
|
||||||
params["userId"] = param.userId.toRequestBody(("text/plain").toMediaType())*/
|
params["userId"] = param.userId.toRequestBody(("text/plain").toMediaType())*/
|
||||||
|
|
||||||
val idBody = param.userId.toRequestBody(("text/plain").toMediaType())
|
val idBody = param.userId.toRequestBody(("text/plain").toMediaType())
|
||||||
val filePart = FileUtil.createFilePart("file", fileUri.toFile)?: return@executeHttp ApiFailedResponse<RespBgUpload>(1, message = "File not exist")
|
val filePart = FileUtil.createFilePart("file", fileUri.toFile)?: return@executeHttp ApiFailedResponse<RespBgUpload>(1, message = "File not exist")
|
||||||
chatService.uploadCustomBgPic(idBody, filePart)
|
chatService.uploadCustomBgPic(idBody, filePart)
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,24 @@
|
||||||
package com.remax.visualnovel.ui.main.history
|
package com.remax.visualnovel.ui.main.history
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.viewModels
|
import androidx.fragment.app.viewModels
|
||||||
|
import androidx.viewpager2.adapter.FragmentStateAdapter
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route
|
import com.alibaba.android.arouter.facade.annotation.Route
|
||||||
import com.alibaba.android.arouter.launcher.ARouter
|
import com.alibaba.android.arouter.launcher.ARouter
|
||||||
import com.dylanc.loadingstateview.BgColorType
|
import com.dylanc.loadingstateview.BgColorType
|
||||||
import com.remax.visualnovel.R
|
import com.remax.visualnovel.R
|
||||||
import com.remax.visualnovel.app.base.BaseBindingFragment
|
import com.remax.visualnovel.app.base.BaseBindingFragment
|
||||||
import com.remax.visualnovel.databinding.FragmentMainHistoryBinding
|
import com.remax.visualnovel.databinding.FragmentMainHistoryBinding
|
||||||
|
import com.remax.visualnovel.ui.main.actor.ActorListFragment
|
||||||
|
import com.remax.visualnovel.ui.main.book.BookListFragment
|
||||||
import com.remax.visualnovel.ui.main.history.customui.beans.TabItem
|
import com.remax.visualnovel.ui.main.history.customui.beans.TabItem
|
||||||
|
import com.remax.visualnovel.ui.main.history.fragments.HistoryActorFragment
|
||||||
|
import com.remax.visualnovel.ui.main.history.fragments.HistoryActorViewModel
|
||||||
|
import com.remax.visualnovel.ui.main.history.fragments.HistoryComicFragment
|
||||||
|
import com.remax.visualnovel.ui.main.history.fragments.HistoryComicViewModel
|
||||||
|
import com.remax.visualnovel.ui.main.history.fragments.HistoryMangaFragment
|
||||||
|
import com.remax.visualnovel.ui.main.managa.MangaListFragment
|
||||||
import com.remax.visualnovel.utils.Routers
|
import com.remax.visualnovel.utils.Routers
|
||||||
import com.remax.visualnovel.utils.StatusBarUtil3
|
import com.remax.visualnovel.utils.StatusBarUtil3
|
||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
|
|
@ -36,6 +46,24 @@ class HistoryFragment : BaseBindingFragment<FragmentMainHistoryBinding>() {
|
||||||
}
|
}
|
||||||
|
|
||||||
initTabLayout()
|
initTabLayout()
|
||||||
|
initViewPager()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initViewPager() {
|
||||||
|
with(binding.viewPager) {
|
||||||
|
val fragments = listOf(
|
||||||
|
HistoryMangaFragment.newInstance(),
|
||||||
|
HistoryComicFragment.newInstance(),
|
||||||
|
HistoryActorFragment.newInstance(),
|
||||||
|
)
|
||||||
|
|
||||||
|
offscreenPageLimit = fragments.size
|
||||||
|
isUserInputEnabled = false
|
||||||
|
adapter = object : FragmentStateAdapter(this@HistoryFragment) {
|
||||||
|
override fun getItemCount() = fragments.size
|
||||||
|
override fun createFragment(position: Int): Fragment = fragments[position]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun initTabLayout() {
|
private fun initTabLayout() {
|
||||||
|
|
@ -54,7 +82,7 @@ class HistoryFragment : BaseBindingFragment<FragmentMainHistoryBinding>() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun switchFragment(fragmentIndex: Int) {
|
private fun switchFragment(fragmentIndex: Int) {
|
||||||
|
binding.viewPager.setCurrentItem(fragmentIndex, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.remax.visualnovel.ui.main.history.customui
|
||||||
|
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.util.AttributeSet
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.widget.LinearLayout
|
||||||
|
import com.remax.visualnovel.databinding.HisotryFilterBarActorBinding
|
||||||
|
import com.remax.visualnovel.databinding.HisotryFilterBarMangaBinding
|
||||||
|
|
||||||
|
class HistoryActorFilterView @JvmOverloads constructor(
|
||||||
|
context: Context,
|
||||||
|
attrs: AttributeSet? = null,
|
||||||
|
defStyleAttr: Int = 0
|
||||||
|
) : LinearLayout(context, attrs, defStyleAttr) {
|
||||||
|
private lateinit var mBinding: HisotryFilterBarActorBinding
|
||||||
|
|
||||||
|
|
||||||
|
init {
|
||||||
|
mBinding = HisotryFilterBarActorBinding.inflate(LayoutInflater.from(context), this, true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.remax.visualnovel.ui.main.history.customui
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.util.AttributeSet
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.widget.LinearLayout
|
||||||
|
import com.remax.visualnovel.databinding.HisotryFilterBarComicBinding
|
||||||
|
|
||||||
|
class HistoryComicFilterView @JvmOverloads constructor(
|
||||||
|
context: Context,
|
||||||
|
attrs: AttributeSet? = null,
|
||||||
|
defStyleAttr: Int = 0
|
||||||
|
) : LinearLayout(context, attrs, defStyleAttr) {
|
||||||
|
private lateinit var mBinding: HisotryFilterBarComicBinding
|
||||||
|
|
||||||
|
|
||||||
|
init {
|
||||||
|
mBinding = HisotryFilterBarComicBinding.inflate(LayoutInflater.from(context), this, true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.remax.visualnovel.ui.main.history.customui
|
||||||
|
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.util.AttributeSet
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.widget.LinearLayout
|
||||||
|
import com.remax.visualnovel.databinding.HisotryFilterBarMangaBinding
|
||||||
|
|
||||||
|
class HistoryMangaFilterView @JvmOverloads constructor(
|
||||||
|
context: Context,
|
||||||
|
attrs: AttributeSet? = null,
|
||||||
|
defStyleAttr: Int = 0
|
||||||
|
) : LinearLayout(context, attrs, defStyleAttr) {
|
||||||
|
private lateinit var mBinding: HisotryFilterBarMangaBinding
|
||||||
|
|
||||||
|
|
||||||
|
init {
|
||||||
|
mBinding = HisotryFilterBarMangaBinding.inflate(LayoutInflater.from(context), this, true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -6,7 +6,7 @@ import com.alibaba.android.arouter.facade.annotation.Route
|
||||||
import com.alibaba.android.arouter.launcher.ARouter
|
import com.alibaba.android.arouter.launcher.ARouter
|
||||||
import com.dylanc.loadingstateview.BgColorType
|
import com.dylanc.loadingstateview.BgColorType
|
||||||
import com.remax.visualnovel.app.base.BaseBindingFragment
|
import com.remax.visualnovel.app.base.BaseBindingFragment
|
||||||
import com.remax.visualnovel.databinding.FragmentMainBookBinding
|
import com.remax.visualnovel.databinding.FragmentMainHistoryActorBinding
|
||||||
import com.remax.visualnovel.utils.Routers
|
import com.remax.visualnovel.utils.Routers
|
||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
import kotlin.getValue
|
import kotlin.getValue
|
||||||
|
|
@ -15,7 +15,7 @@ import kotlin.getValue
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
@Route(path = Routers.ROUTE_HISTORY_ACTOR)
|
@Route(path = Routers.ROUTE_HISTORY_ACTOR)
|
||||||
class HistoryActorFragment : BaseBindingFragment<FragmentMainBookBinding>() {
|
class HistoryActorFragment : BaseBindingFragment<FragmentMainHistoryActorBinding>() {
|
||||||
|
|
||||||
private val mViewModel by viewModels<HistoryActorViewModel>()
|
private val mViewModel by viewModels<HistoryActorViewModel>()
|
||||||
|
|
||||||
|
|
@ -32,9 +32,9 @@ class HistoryActorFragment : BaseBindingFragment<FragmentMainBookBinding>() {
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun newInstance(): HistoryMangaFragment {
|
fun newInstance(): HistoryActorFragment {
|
||||||
return ARouter.getInstance().build(Routers.ROUTE_HISTORY_ACTOR)
|
return ARouter.getInstance().build(Routers.ROUTE_HISTORY_ACTOR)
|
||||||
.navigation() as HistoryMangaFragment
|
.navigation() as HistoryActorFragment
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import com.alibaba.android.arouter.facade.annotation.Route
|
||||||
import com.alibaba.android.arouter.launcher.ARouter
|
import com.alibaba.android.arouter.launcher.ARouter
|
||||||
import com.dylanc.loadingstateview.BgColorType
|
import com.dylanc.loadingstateview.BgColorType
|
||||||
import com.remax.visualnovel.app.base.BaseBindingFragment
|
import com.remax.visualnovel.app.base.BaseBindingFragment
|
||||||
import com.remax.visualnovel.databinding.FragmentMainBookBinding
|
import com.remax.visualnovel.databinding.FragmentMainHistoryComicBinding
|
||||||
import com.remax.visualnovel.utils.Routers
|
import com.remax.visualnovel.utils.Routers
|
||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
import kotlin.getValue
|
import kotlin.getValue
|
||||||
|
|
@ -15,7 +15,7 @@ import kotlin.getValue
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
@Route(path = Routers.ROUTE_HISTORY_COMIC)
|
@Route(path = Routers.ROUTE_HISTORY_COMIC)
|
||||||
class HistoryComicFragment : BaseBindingFragment<FragmentMainBookBinding>() {
|
class HistoryComicFragment : BaseBindingFragment<FragmentMainHistoryComicBinding>() {
|
||||||
|
|
||||||
private val mViewModel by viewModels<HistoryComicViewModel>()
|
private val mViewModel by viewModels<HistoryComicViewModel>()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import com.alibaba.android.arouter.launcher.ARouter
|
||||||
import com.dylanc.loadingstateview.BgColorType
|
import com.dylanc.loadingstateview.BgColorType
|
||||||
import com.remax.visualnovel.app.base.BaseBindingFragment
|
import com.remax.visualnovel.app.base.BaseBindingFragment
|
||||||
import com.remax.visualnovel.databinding.FragmentMainBookBinding
|
import com.remax.visualnovel.databinding.FragmentMainBookBinding
|
||||||
|
import com.remax.visualnovel.databinding.FragmentMainHistoryMangaBinding
|
||||||
import com.remax.visualnovel.utils.Routers
|
import com.remax.visualnovel.utils.Routers
|
||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
import kotlin.getValue
|
import kotlin.getValue
|
||||||
|
|
@ -15,7 +16,7 @@ import kotlin.getValue
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
@Route(path = Routers.ROUTE_HISTORY_MANGA)
|
@Route(path = Routers.ROUTE_HISTORY_MANGA)
|
||||||
class HistoryMangaFragment : BaseBindingFragment<FragmentMainBookBinding>() {
|
class HistoryMangaFragment : BaseBindingFragment<FragmentMainHistoryMangaBinding>() {
|
||||||
|
|
||||||
private val mViewModel by viewModels<HistoryMangaViewModel>()
|
private val mViewModel by viewModels<HistoryMangaViewModel>()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,10 @@ class Routers {
|
||||||
const val SEARCH = "${ROUTER}search"
|
const val SEARCH = "${ROUTER}search"
|
||||||
const val CHECK_IN = "${ROUTER}checkin"
|
const val CHECK_IN = "${ROUTER}checkin"
|
||||||
|
|
||||||
|
const val ROUTE_HISTORY_MANGA = "${ROUTER}history_manga"
|
||||||
|
const val ROUTE_HISTORY_COMIC = "${ROUTER}history_comic"
|
||||||
|
const val ROUTE_HISTORY_ACTOR = "${ROUTER}history_actor"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
android:id="@+id/tab_layout"
|
android:id="@+id/tab_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="@dimen/dp_20"
|
||||||
android:layout_marginTop="@dimen/dp_10"
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
app:tabCornerRadius="@dimen/dp_20"
|
app:tabCornerRadius="@dimen/dp_20"
|
||||||
app:textColorNormal="@color/gray6"
|
app:textColorNormal="@color/gray6"
|
||||||
|
|
@ -28,6 +29,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<androidx.viewpager2.widget.ViewPager2
|
<androidx.viewpager2.widget.ViewPager2
|
||||||
|
android:id="@+id/view_pager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<com.remax.visualnovel.widget.uitoken.view.UITokenLinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.remax.visualnovel.ui.main.history.customui.HistoryActorFilterView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="@dimen/dp_20"
|
||||||
|
android:layout_marginVertical="@dimen/dp_5"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginTop="@dimen/dp_5"
|
||||||
|
/>
|
||||||
|
</com.remax.visualnovel.widget.uitoken.view.UITokenLinearLayout>
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<com.remax.visualnovel.widget.uitoken.view.UITokenLinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.remax.visualnovel.ui.main.history.customui.HistoryComicFilterView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="@dimen/dp_20"
|
||||||
|
android:layout_marginVertical="@dimen/dp_5"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginTop="@dimen/dp_5"
|
||||||
|
/>
|
||||||
|
</com.remax.visualnovel.widget.uitoken.view.UITokenLinearLayout>
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<com.remax.visualnovel.widget.uitoken.view.UITokenLinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.remax.visualnovel.ui.main.history.customui.HistoryMangaFilterView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="@dimen/dp_20"
|
||||||
|
android:layout_marginVertical="@dimen/dp_5"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginTop="@dimen/dp_5"
|
||||||
|
/>
|
||||||
|
</com.remax.visualnovel.widget.uitoken.view.UITokenLinearLayout>
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<com.remax.visualnovel.widget.uitoken.view.UITokenRelativeLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@mipmap/bg_level_1_page" >
|
||||||
|
|
||||||
|
<com.remax.visualnovel.widget.uitoken.view.UITokenLinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
<com.remax.visualnovel.widget.uitoken.view.UITokenImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/actor_item_book_big"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<com.remax.visualnovel.widget.uitoken.view.UITokenTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/sort_by_date"
|
||||||
|
android:textSize="@dimen/sp_15"
|
||||||
|
android:textColor="@color/cyan_73"
|
||||||
|
android:layout_marginLeft="@dimen/dp_9"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</com.remax.visualnovel.widget.uitoken.view.UITokenLinearLayout>
|
||||||
|
|
||||||
|
<com.remax.visualnovel.widget.uitoken.view.UITokenImageView
|
||||||
|
android:id="@+id/iv_menu"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:src="@mipmap/setting_new_chat"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
</com.remax.visualnovel.widget.uitoken.view.UITokenRelativeLayout>
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<com.remax.visualnovel.widget.uitoken.view.UITokenRelativeLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@mipmap/bg_level_1_page" >
|
||||||
|
|
||||||
|
<com.remax.visualnovel.widget.uitoken.view.UITokenLinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
<com.remax.visualnovel.widget.uitoken.view.UITokenImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/history_tab_comics"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<com.remax.visualnovel.widget.uitoken.view.UITokenTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/sort_by_date"
|
||||||
|
android:textSize="@dimen/sp_15"
|
||||||
|
android:textColor="@color/cyan_73"
|
||||||
|
android:layout_marginLeft="@dimen/dp_9"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</com.remax.visualnovel.widget.uitoken.view.UITokenLinearLayout>
|
||||||
|
|
||||||
|
<com.remax.visualnovel.widget.uitoken.view.UITokenImageView
|
||||||
|
android:id="@+id/iv_menu"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:src="@mipmap/setting_new_chat"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
</com.remax.visualnovel.widget.uitoken.view.UITokenRelativeLayout>
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<com.remax.visualnovel.widget.uitoken.view.UITokenRelativeLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@mipmap/bg_level_1_page" >
|
||||||
|
|
||||||
|
<com.remax.visualnovel.widget.uitoken.view.UITokenLinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
<com.remax.visualnovel.widget.uitoken.view.UITokenImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/score"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<com.remax.visualnovel.widget.uitoken.view.UITokenTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/sort_by_date"
|
||||||
|
android:textSize="@dimen/sp_15"
|
||||||
|
android:textColor="@color/cyan_73"
|
||||||
|
android:layout_marginLeft="@dimen/dp_9"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</com.remax.visualnovel.widget.uitoken.view.UITokenLinearLayout>
|
||||||
|
|
||||||
|
<com.remax.visualnovel.widget.uitoken.view.UITokenImageView
|
||||||
|
android:id="@+id/iv_menu"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:src="@mipmap/setting_new_chat"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
</com.remax.visualnovel.widget.uitoken.view.UITokenRelativeLayout>
|
||||||
|
|
@ -1,17 +1,17 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<com.remax.visualnovel.widget.uitoken.view.UITokenLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp_40"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:paddingVertical="@dimen/dp_12"
|
android:paddingVertical="@dimen/dp_12"
|
||||||
android:paddingHorizontal="@dimen/dp_16">
|
android:paddingHorizontal="@dimen/dp_8">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/ivTabIcon"
|
android:id="@+id/ivTabIcon"
|
||||||
android:layout_width="@dimen/dp_20"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/dp_20"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="@dimen/dp_8"
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
android:alpha="0.6"
|
android:alpha="0.6"
|
||||||
android:scaleType="centerInside" />
|
android:scaleType="centerInside" />
|
||||||
|
|
||||||
|
|
@ -19,8 +19,10 @@
|
||||||
android:id="@+id/tvTabText"
|
android:id="@+id/tvTabText"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/gray6"
|
android:textColor="@color/graybe"
|
||||||
android:textSize="@dimen/sp_14"
|
android:textSize="@dimen/sp_14"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:singleLine="true"
|
||||||
android:fontFamily="sans-serif-medium" />
|
android:fontFamily="sans-serif-medium" />
|
||||||
|
|
||||||
</LinearLayout>
|
</com.remax.visualnovel.widget.uitoken.view.UITokenLinearLayout>
|
||||||
|
|
@ -194,6 +194,8 @@
|
||||||
<color name="grayf6">#fff6f6f6</color>
|
<color name="grayf6">#fff6f6f6</color>
|
||||||
<color name="gray28">#ff282828</color>
|
<color name="gray28">#ff282828</color>
|
||||||
<color name="grayf3">#fff3f4ff</color>
|
<color name="grayf3">#fff3f4ff</color>
|
||||||
|
<color name="graybe">#ffbebebe</color>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<color name="red_ff3b30">#ffff3b30</color>
|
<color name="red_ff3b30">#ffff3b30</color>
|
||||||
|
|
@ -221,7 +223,7 @@
|
||||||
|
|
||||||
<color name="setting_bubble_bg_color">#ff4d3e6b</color>
|
<color name="setting_bubble_bg_color">#ff4d3e6b</color>
|
||||||
<color name="setting_bubble_bg_selected_color">#ff312645</color>
|
<color name="setting_bubble_bg_selected_color">#ff312645</color>
|
||||||
|
<color name="cyan_73">#ff739ba7</color>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -490,7 +490,7 @@
|
||||||
<string name="delete_chat_hint">This will permanently remove all data. This action is irreversible. Are you sure?</string>
|
<string name="delete_chat_hint">This will permanently remove all data. This action is irreversible. Are you sure?</string>
|
||||||
<string name="sure">SURE</string>
|
<string name="sure">SURE</string>
|
||||||
<string name="no">NO</string>
|
<string name="no">NO</string>
|
||||||
|
<string name="sort_by_date">Sort by Date</string>
|
||||||
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -278,5 +278,12 @@ object Deps {
|
||||||
const val immersionbar = "com.geyifeng.immersionbar:immersionbar:3.2.2"
|
const val immersionbar = "com.geyifeng.immersionbar:immersionbar:3.2.2"
|
||||||
const val immersionbarktx = "com.geyifeng.immersionbar:immersionbar-ktx:3.2.2"
|
const val immersionbarktx = "com.geyifeng.immersionbar:immersionbar-ktx:3.2.2"
|
||||||
|
|
||||||
|
// room
|
||||||
|
const val room_version = "2.5.2"
|
||||||
|
const val room_runtime = "androidx.room:room-runtime:$room_version"
|
||||||
|
const val room_ktx = "androidx.room:room-ktx:$room_version"
|
||||||
|
const val room_compiler = "androidx.room:room-compiler:$room_version"
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue