From 8e527cf49194ea5867c9fac0b4335290f5c0f99a Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Wed, 19 May 2021 00:00:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E9=A2=98=E4=BB=8E=E5=85=AC=E5=85=B1?= =?UTF-8?q?=E5=BA=93=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/gyf/csams/MainActivity.kt | 2 +- .../java/com/gyf/csams/uikit/theme/Theme.kt | 44 ------------------- build.gradle.kts | 2 +- foreground/build.gradle.kts | 2 +- .../gyf/csams/account/ui/AccountActivity.kt | 25 +++++------ .../association/ui/AssociationActivity.kt | 7 ++- .../association/ui/RegAssociationActivity.kt | 7 ++- .../com/gyf/csams/main/ui/MainActivity.kt | 26 ++++------- .../main/java/com/gyf/csams/uikit/BaseView.kt | 30 ++++++++----- .../java/com/gyf/csams/uikit/ViewModel.kt | 9 +++- .../java/com/gyf/csams/uikit/theme/Color.kt | 8 ---- .../java/com/gyf/csams/uikit/theme/Shape.kt | 11 ----- .../java/com/gyf/csams/uikit/theme/Type.kt | 28 ------------ .../main/java/com/gyf/csams/util/HttpUtil.kt | 10 ++++- .../java/com/gyf/csams/ExampleUnitTest.kt | 12 +++-- lib/build.gradle.kts | 13 +++++- .../java/com/gyf/lib}/uikit/theme/Color.kt | 0 .../java/com/gyf/lib}/uikit/theme/Shape.kt | 0 .../java/com/gyf/lib}/uikit/theme/Theme.kt | 3 +- .../java/com/gyf/lib}/uikit/theme/Type.kt | 0 20 files changed, 87 insertions(+), 152 deletions(-) delete mode 100644 background/src/main/java/com/gyf/csams/uikit/theme/Theme.kt delete mode 100644 foreground/src/main/java/com/gyf/csams/uikit/theme/Color.kt delete mode 100644 foreground/src/main/java/com/gyf/csams/uikit/theme/Shape.kt delete mode 100644 foreground/src/main/java/com/gyf/csams/uikit/theme/Type.kt rename {background/src/main/java/com/gyf/csams => lib/src/main/java/com/gyf/lib}/uikit/theme/Color.kt (100%) rename {background/src/main/java/com/gyf/csams => lib/src/main/java/com/gyf/lib}/uikit/theme/Shape.kt (100%) rename {foreground/src/main/java/com/gyf/csams => lib/src/main/java/com/gyf/lib}/uikit/theme/Theme.kt (94%) rename {background/src/main/java/com/gyf/csams => lib/src/main/java/com/gyf/lib}/uikit/theme/Type.kt (100%) diff --git a/background/src/main/java/com/gyf/csams/MainActivity.kt b/background/src/main/java/com/gyf/csams/MainActivity.kt index 8007e4c..75f5942 100644 --- a/background/src/main/java/com/gyf/csams/MainActivity.kt +++ b/background/src/main/java/com/gyf/csams/MainActivity.kt @@ -8,7 +8,7 @@ import androidx.compose.material.Surface import androidx.compose.material.Text import androidx.compose.runtime.Composable import androidx.compose.ui.tooling.preview.Preview -import com.gyf.csams.uikit.theme.CSAMSTheme +import com.gyf.lib.uikit.theme.CSAMSTheme class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { diff --git a/background/src/main/java/com/gyf/csams/uikit/theme/Theme.kt b/background/src/main/java/com/gyf/csams/uikit/theme/Theme.kt deleted file mode 100644 index 4392080..0000000 --- a/background/src/main/java/com/gyf/csams/uikit/theme/Theme.kt +++ /dev/null @@ -1,44 +0,0 @@ -package com.gyf.csams.uikit.theme - -import androidx.compose.foundation.isSystemInDarkTheme -import androidx.compose.material.MaterialTheme -import androidx.compose.material.darkColors -import androidx.compose.material.lightColors -import androidx.compose.runtime.Composable - -private val DarkColorPalette = darkColors( - primary = Purple200, - primaryVariant = Purple700, - secondary = Teal200 -) - -private val LightColorPalette = lightColors( - primary = Purple500, - primaryVariant = Purple700, - secondary = Teal200 - - /* Other default colors to override - background = Color.White, - surface = Color.White, - onPrimary = Color.White, - onSecondary = Color.Black, - onBackground = Color.Black, - onSurface = Color.Black, - */ -) - -@Composable -fun CSAMSTheme(darkTheme: Boolean = isSystemInDarkTheme(), content: @Composable() () -> Unit) { - val colors = if (darkTheme) { - DarkColorPalette - } else { - LightColorPalette - } - - MaterialTheme( - colors = colors, - typography = Typography, - shapes = Shapes, - content = content - ) -} \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index edde590..163910a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,7 +7,7 @@ buildscript { //APP应用名字 val foreground_app_name by extra("学生社团") val SERVER_ADDRESS by extra("http://192.168.50.107:8080") - val room_version by extra("2.2.6") + val room_version by extra("2.3.0") val kotlin_version by extra("1.4.32") val background_app_name by extra("社团管理") repositories { diff --git a/foreground/build.gradle.kts b/foreground/build.gradle.kts index 2f2a050..612e5f4 100644 --- a/foreground/build.gradle.kts +++ b/foreground/build.gradle.kts @@ -81,6 +81,6 @@ dependencies { * 包含核心和基本的 View 匹配器、操作和断言 */ androidTestImplementation("androidx.test.espresso:espresso-core:3.3.0") - androidTestImplementation("androidx.compose.ui:ui-test-junit4:${rootProject.extra["compose_version"]}") +// androidTestImplementation("androidx.compose.ui:ui-test-junit4:${rootProject.extra["compose_version"]}") } \ No newline at end of file diff --git a/foreground/src/main/java/com/gyf/csams/account/ui/AccountActivity.kt b/foreground/src/main/java/com/gyf/csams/account/ui/AccountActivity.kt index 98bab09..2962773 100644 --- a/foreground/src/main/java/com/gyf/csams/account/ui/AccountActivity.kt +++ b/foreground/src/main/java/com/gyf/csams/account/ui/AccountActivity.kt @@ -30,7 +30,6 @@ import com.gyf.csams.account.model.DialogMessage import com.gyf.csams.uikit.AnimationText import com.gyf.csams.uikit.BaseTextField import com.gyf.csams.uikit.Body -import com.gyf.csams.uikit.theme.CSAMSTheme import com.orhanobut.logger.Logger @@ -44,18 +43,17 @@ class AccountActivity : ComponentActivity() { super.onCreate(savedInstanceState) setContent { - CSAMSTheme { - Body { nav, scaffoldState -> - NavHost(navController = nav, startDestination = AccountRoute.login.name) { - composable(AccountRoute.login.name) { - Account( - scaffoldState = scaffoldState, - route = AccountRoute.login - ) { isValidForm: Boolean, accountViewModel: AccountViewModel -> - Spacer(modifier = Modifier.height(10.dp)) - - OutlinedButton( - onClick = { accountViewModel.login() }, + Body { nav, scaffoldState -> + NavHost(navController = nav, startDestination = AccountRoute.login.name) { + composable(AccountRoute.login.name) { + Account( + scaffoldState = scaffoldState, + route = AccountRoute.login + ) { isValidForm: Boolean, accountViewModel: AccountViewModel -> + Spacer(modifier = Modifier.height(10.dp)) + + OutlinedButton( + onClick = { accountViewModel.login() }, enabled = isValidForm, modifier = Modifier .fillMaxWidth() @@ -114,7 +112,6 @@ class AccountActivity : ComponentActivity() { } } } - } } /** diff --git a/foreground/src/main/java/com/gyf/csams/association/ui/AssociationActivity.kt b/foreground/src/main/java/com/gyf/csams/association/ui/AssociationActivity.kt index dd64bb6..c2cc74a 100644 --- a/foreground/src/main/java/com/gyf/csams/association/ui/AssociationActivity.kt +++ b/foreground/src/main/java/com/gyf/csams/association/ui/AssociationActivity.kt @@ -29,7 +29,6 @@ import com.gyf.csams.R import com.gyf.csams.activity.ui.ActivityDetailActivity import com.gyf.csams.association.model.* import com.gyf.csams.uikit.* -import com.gyf.csams.uikit.theme.CSAMSTheme import com.gyf.csams.util.randomChinese import com.orhanobut.logger.Logger @@ -42,8 +41,8 @@ class AssociationActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContent { - CSAMSTheme { - Body { nav, scaffoldState -> + + Body { nav, scaffoldState -> val context = LocalContext.current as AssociationActivity val model: AssociationViewModel = viewModel() val currentMenuName: AssociationMenu by model.currentMenu.observeAsState( @@ -169,7 +168,7 @@ class AssociationActivity : ComponentActivity() { } } - } + } } diff --git a/foreground/src/main/java/com/gyf/csams/association/ui/RegAssociationActivity.kt b/foreground/src/main/java/com/gyf/csams/association/ui/RegAssociationActivity.kt index 58a7d20..cc07a46 100644 --- a/foreground/src/main/java/com/gyf/csams/association/ui/RegAssociationActivity.kt +++ b/foreground/src/main/java/com/gyf/csams/association/ui/RegAssociationActivity.kt @@ -35,7 +35,6 @@ import androidx.lifecycle.viewmodel.compose.viewModel import com.gyf.csams.R import com.gyf.csams.association.model.RegAssociationViewModel import com.gyf.csams.uikit.* -import com.gyf.csams.uikit.theme.CSAMSTheme import com.orhanobut.logger.Logger @@ -47,8 +46,8 @@ class RegAssociationActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContent { - CSAMSTheme { - Body { scaffoldState -> + + Body { scaffoldState -> MainFrame(background = { Background( BackgroundImage.RegAssociation, @@ -79,7 +78,7 @@ class RegAssociationActivity : ComponentActivity() { ShowSnackbar(scaffoldState = scaffoldState) } } - } + } } diff --git a/foreground/src/main/java/com/gyf/csams/main/ui/MainActivity.kt b/foreground/src/main/java/com/gyf/csams/main/ui/MainActivity.kt index 7ced8a3..5bf0ef6 100644 --- a/foreground/src/main/java/com/gyf/csams/main/ui/MainActivity.kt +++ b/foreground/src/main/java/com/gyf/csams/main/ui/MainActivity.kt @@ -19,7 +19,6 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.painterResource import androidx.compose.ui.text.style.TextOverflow -import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.lifecycle.viewmodel.compose.viewModel import androidx.navigation.NavHostController @@ -34,7 +33,6 @@ import com.gyf.csams.association.ui.RegAssociationActivity import com.gyf.csams.main.model.* import com.gyf.csams.message.ui.MessageActivity import com.gyf.csams.uikit.* -import com.gyf.csams.uikit.theme.CSAMSTheme import com.gyf.csams.util.randomChinese @@ -52,7 +50,7 @@ class MainActivity : ComponentActivity() { imageModel = ImageModel(application = application, Api.buildUrl(MainApi.HotActivity)) setContent { - CSAMSTheme { + Body { nav, scaffoldState -> NavHost(navController = nav, startDestination = MainMenu.Main.name) { composable(MainMenu.Main.name) { @@ -70,15 +68,10 @@ class MainActivity : ComponentActivity() { } } - } - } + } - } - override fun onStart() { - super.onStart() - imageModel.start() } override fun onResume() { @@ -490,9 +483,14 @@ class MainActivity : ComponentActivity() { * */ @Composable - private fun PosterWithDesc() { + private fun PosterWithDesc(scaffoldModel: ScaffoldModel = viewModel()) { val context = LocalContext.current as MainActivity + val error by context.imageModel.error.observeAsState() + error?.let { + scaffoldModel.update(message = it) + context.imageModel.clearError() + } Carousel(imageBitmap = context.imageModel.image) { Column(modifier = Modifier.clickable(onClick = { context.startActivity(Intent(context, ActivityDetailActivity::class.java)) @@ -513,14 +511,6 @@ class MainActivity : ComponentActivity() { } } - - @Preview(showBackground = true) - @Composable - fun DefaultPreview() { - CSAMSTheme { - Text(text = "666") - } - } } diff --git a/foreground/src/main/java/com/gyf/csams/uikit/BaseView.kt b/foreground/src/main/java/com/gyf/csams/uikit/BaseView.kt index fb5ae49..095d301 100644 --- a/foreground/src/main/java/com/gyf/csams/uikit/BaseView.kt +++ b/foreground/src/main/java/com/gyf/csams/uikit/BaseView.kt @@ -26,6 +26,7 @@ import androidx.compose.ui.res.painterResource import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.text.input.VisualTransformation import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData @@ -36,6 +37,7 @@ import androidx.navigation.compose.rememberNavController import com.gyf.csams.APP import com.gyf.csams.R import com.gyf.csams.main.model.MarqueeViewModel +import com.gyf.lib.uikit.theme.CSAMSTheme import com.orhanobut.logger.Logger import kotlinx.coroutines.launch @@ -626,11 +628,13 @@ fun Background(image: BackgroundImage, alpha: Float = DefaultAlpha) { */ @Composable fun Body(content: @Composable (scaffoldState: ScaffoldState) -> Unit) { - Surface(color = MaterialTheme.colors.background) { - val scaffoldState = rememberScaffoldState() + CSAMSTheme { + Surface(color = MaterialTheme.colors.background) { + val scaffoldState = rememberScaffoldState() - Scaffold(scaffoldState = scaffoldState) { - content(scaffoldState = scaffoldState) + Scaffold(scaffoldState = scaffoldState) { + content(scaffoldState = scaffoldState) + } } } } @@ -642,12 +646,14 @@ fun Body(content: @Composable (scaffoldState: ScaffoldState) -> Unit) { */ @Composable fun Body(content: @Composable (nav: NavHostController, scaffoldState: ScaffoldState) -> Unit) { - Surface(color = MaterialTheme.colors.background) { - val navController = rememberNavController() - val scaffoldState = rememberScaffoldState() + CSAMSTheme { + Surface(color = MaterialTheme.colors.background) { + val navController = rememberNavController() + val scaffoldState = rememberScaffoldState() - Scaffold(scaffoldState = scaffoldState) { - content(nav = navController, scaffoldState = scaffoldState) + Scaffold(scaffoldState = scaffoldState) { + content(nav = navController, scaffoldState = scaffoldState) + } } } } @@ -776,6 +782,10 @@ fun MyBottomAppBarPreview() { } } +@Preview +@Composable fun TestPreview() { - + CSAMSTheme { + Text(text = "fuckyou") + } } \ No newline at end of file diff --git a/foreground/src/main/java/com/gyf/csams/uikit/ViewModel.kt b/foreground/src/main/java/com/gyf/csams/uikit/ViewModel.kt index 9bb5e00..8b06e8d 100644 --- a/foreground/src/main/java/com/gyf/csams/uikit/ViewModel.kt +++ b/foreground/src/main/java/com/gyf/csams/uikit/ViewModel.kt @@ -92,6 +92,12 @@ class ImageModel(application: Application, private val urlPath: String) : private val _imageUrls = MutableLiveData>() val image: LiveData = _image private var job: Job? = null + private val _error = MutableLiveData() + val error: LiveData = _error + + fun clearError() { + _error.value = null + } /** * 加载默认图片 @@ -118,7 +124,7 @@ class ImageModel(application: Application, private val urlPath: String) : job = viewModelScope.launch { HttpClient.get( url = urlPath, - SimpleCallback>("请求图片url列表", onSuccess = { + SimpleCallback>("获取轮播图", onSuccess = { _imageUrls.postValue(it.body) var index = 0 _imageUrls.value?.apply { @@ -138,6 +144,7 @@ class ImageModel(application: Application, private val urlPath: String) : } }, onFail = { Logger.e("无法从接口地址:${urlPath}获取图片url列表") + _error.postValue(it) defaultLoad() }, type = object : TypeToken>() {}.type) ) diff --git a/foreground/src/main/java/com/gyf/csams/uikit/theme/Color.kt b/foreground/src/main/java/com/gyf/csams/uikit/theme/Color.kt deleted file mode 100644 index cbec799..0000000 --- a/foreground/src/main/java/com/gyf/csams/uikit/theme/Color.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.gyf.csams.uikit.theme - -import androidx.compose.ui.graphics.Color - -val Purple200 = Color(0xFFBB86FC) -val Purple500 = Color(0xFF6200EE) -val Purple700 = Color(0xFF3700B3) -val Teal200 = Color(0xFF03DAC5) \ No newline at end of file diff --git a/foreground/src/main/java/com/gyf/csams/uikit/theme/Shape.kt b/foreground/src/main/java/com/gyf/csams/uikit/theme/Shape.kt deleted file mode 100644 index e2f4bfb..0000000 --- a/foreground/src/main/java/com/gyf/csams/uikit/theme/Shape.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.gyf.csams.uikit.theme - -import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.Shapes -import androidx.compose.ui.unit.dp - -val Shapes = Shapes( - small = RoundedCornerShape(4.dp), - medium = RoundedCornerShape(4.dp), - large = RoundedCornerShape(0.dp) -) \ No newline at end of file diff --git a/foreground/src/main/java/com/gyf/csams/uikit/theme/Type.kt b/foreground/src/main/java/com/gyf/csams/uikit/theme/Type.kt deleted file mode 100644 index 5dcc466..0000000 --- a/foreground/src/main/java/com/gyf/csams/uikit/theme/Type.kt +++ /dev/null @@ -1,28 +0,0 @@ -package com.gyf.csams.uikit.theme - -import androidx.compose.material.Typography -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.text.font.FontFamily -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.sp - -// Set of Material typography styles to start with -val Typography = Typography( - body1 = TextStyle( - fontFamily = FontFamily.Default, - fontWeight = FontWeight.Normal, - fontSize = 16.sp - ) - /* Other default text styles to override - button = TextStyle( - fontFamily = FontFamily.Default, - fontWeight = FontWeight.W500, - fontSize = 14.sp - ), - caption = TextStyle( - fontFamily = FontFamily.Default, - fontWeight = FontWeight.Normal, - fontSize = 12.sp - ) - */ -) \ No newline at end of file diff --git a/foreground/src/main/java/com/gyf/csams/util/HttpUtil.kt b/foreground/src/main/java/com/gyf/csams/util/HttpUtil.kt index 8488d5b..80f322c 100644 --- a/foreground/src/main/java/com/gyf/csams/util/HttpUtil.kt +++ b/foreground/src/main/java/com/gyf/csams/util/HttpUtil.kt @@ -9,6 +9,7 @@ import okhttp3.MediaType.Companion.toMediaType import okhttp3.RequestBody.Companion.toRequestBody import java.io.IOException import java.lang.reflect.Type +import java.net.SocketTimeoutException object HttpClient { private val httpClient: OkHttpClient = OkHttpClient() @@ -136,7 +137,14 @@ class SimpleCallback( } override fun onFailure(call: Call, e: IOException) { - onFail("${action}失败,请联系管理员") + when (e) { + is SocketTimeoutException -> { + onFail("${action}失败,网络连接超时!") + } + else -> { + onFail("${action}失败,请联系管理员") + } + } Logger.e(e, "${action}请求失败,发生IO异常") } diff --git a/foreground/src/test/java/com/gyf/csams/ExampleUnitTest.kt b/foreground/src/test/java/com/gyf/csams/ExampleUnitTest.kt index 83bf7f9..e9e784e 100644 --- a/foreground/src/test/java/com/gyf/csams/ExampleUnitTest.kt +++ b/foreground/src/test/java/com/gyf/csams/ExampleUnitTest.kt @@ -4,6 +4,7 @@ import com.google.gson.Gson import com.google.gson.reflect.TypeToken import com.gyf.csams.util.ApiResponse import com.gyf.csams.util.randomChinese +import com.gyf.lib.uikit.TestLib import org.junit.Assert.assertEquals import org.junit.Test @@ -34,10 +35,9 @@ class ExampleUnitTest { } - @Test - fun testCharRange(){ - repeat(100){ + fun testCharRange() { + repeat(100) { println(randomChinese()) } @@ -45,5 +45,11 @@ class ExampleUnitTest { // .format(java.time.Instant.ofEpochMilli(1532358895000))) } + @Test + fun testLib() { + TestLib.hello() + Fuck() + } + } diff --git a/lib/build.gradle.kts b/lib/build.gradle.kts index 88648cc..bec0ea0 100644 --- a/lib/build.gradle.kts +++ b/lib/build.gradle.kts @@ -1,7 +1,7 @@ plugins { id("com.android.library") id("kotlin-android") - id("org.jetbrains.kotlin.plugin.serialization") version "1.4.32" +// id("org.jetbrains.kotlin.plugin.serialization") version "1.4.32" } android { @@ -30,7 +30,16 @@ android { } kotlinOptions { jvmTarget = "1.8" + freeCompilerArgs = listOf( + "-P", + "plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true" + ) } + + buildFeatures { + compose = true + } + } dependencies { @@ -90,7 +99,7 @@ dependencies { /** * https://kotlinlang.org/docs/serialization.html */ - api("org.jetbrains.kotlinx:kotlinx-serialization-json:1.1.0") + api("org.jetbrains.kotlinx:kotlinx-serialization-json:1.2.1") /** * https://developer.android.com/jetpack/androidx/releases/navigation */ diff --git a/background/src/main/java/com/gyf/csams/uikit/theme/Color.kt b/lib/src/main/java/com/gyf/lib/uikit/theme/Color.kt similarity index 100% rename from background/src/main/java/com/gyf/csams/uikit/theme/Color.kt rename to lib/src/main/java/com/gyf/lib/uikit/theme/Color.kt diff --git a/background/src/main/java/com/gyf/csams/uikit/theme/Shape.kt b/lib/src/main/java/com/gyf/lib/uikit/theme/Shape.kt similarity index 100% rename from background/src/main/java/com/gyf/csams/uikit/theme/Shape.kt rename to lib/src/main/java/com/gyf/lib/uikit/theme/Shape.kt diff --git a/foreground/src/main/java/com/gyf/csams/uikit/theme/Theme.kt b/lib/src/main/java/com/gyf/lib/uikit/theme/Theme.kt similarity index 94% rename from foreground/src/main/java/com/gyf/csams/uikit/theme/Theme.kt rename to lib/src/main/java/com/gyf/lib/uikit/theme/Theme.kt index 042773b..ccaa674 100644 --- a/foreground/src/main/java/com/gyf/csams/uikit/theme/Theme.kt +++ b/lib/src/main/java/com/gyf/lib/uikit/theme/Theme.kt @@ -1,10 +1,11 @@ -package com.gyf.csams.uikit.theme +package com.gyf.lib.uikit.theme import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.material.MaterialTheme import androidx.compose.material.darkColors import androidx.compose.material.lightColors import androidx.compose.runtime.Composable +import com.gyf.csams.uikit.theme.* private val DarkColorPalette = darkColors( primary = Purple200, diff --git a/background/src/main/java/com/gyf/csams/uikit/theme/Type.kt b/lib/src/main/java/com/gyf/lib/uikit/theme/Type.kt similarity index 100% rename from background/src/main/java/com/gyf/csams/uikit/theme/Type.kt rename to lib/src/main/java/com/gyf/lib/uikit/theme/Type.kt