Skip to content

Commit

Permalink
rename compose theme
Browse files Browse the repository at this point in the history
  • Loading branch information
REBOOTERS committed Oct 13, 2024
1 parent bc82617 commit dc589cb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import androidx.fragment.app.Fragment
import com.alibaba.android.arouter.facade.annotation.Route
import com.engineer.compose.ui.Message
import com.engineer.compose.ui.MessageCard
import com.engineer.compose.ui.ui.theme.MiniAppTheme
import com.engineer.compose.ui.ui.theme.ComposeAppTheme
import com.engineer.imitate.R

/**
Expand All @@ -34,7 +34,7 @@ class ComposeFragment : Fragment() {
// is destroyed
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
setContent {
MiniAppTheme {
ComposeAppTheme {
// A surface container using the 'background' color from the theme
Surface(color = MaterialTheme.colorScheme.background) {
MessageCard(Message("lucy", "hello world"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ package com.engineer.compose.ui

import android.os.Bundle
import android.util.Log
import android.view.View
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
Expand Down Expand Up @@ -49,7 +47,7 @@ import com.engineer.compose.ui.preview.ChatUIWithKeyboard
import com.engineer.compose.ui.preview.ChatUIWithKeyboardPre
import com.engineer.compose.ui.preview.provideTestChat
import com.engineer.compose.ui.ui.theme.ChatPop
import com.engineer.compose.ui.ui.theme.MiniAppTheme
import com.engineer.compose.ui.ui.theme.ComposeAppTheme
import com.engineer.compose.uitls.KeyBoardUtil
import com.engineer.compose.viewmodel.ChatMessage
import com.engineer.compose.viewmodel.ChatViewModel
Expand All @@ -59,7 +57,7 @@ class ChatActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
MiniAppTheme {
ComposeAppTheme {
// A surface container using the 'background' color from the theme
Surface(color = MaterialTheme.colorScheme.background) {
ChatScreen(chatUIWithKeyboard = ChatUIWithKeyboard {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
Expand All @@ -35,7 +34,7 @@ import coil.decode.GifDecoder
import coil.decode.ImageDecoderDecoder
import coil.request.ImageRequest
import coil.size.Size
import com.engineer.compose.ui.ui.theme.MiniAppTheme
import com.engineer.compose.ui.ui.theme.ComposeAppTheme
import com.engineer.compose.viewmodel.ImagePreviewPayload
import com.google.accompanist.pager.ExperimentalPagerApi
import com.google.accompanist.pager.HorizontalPager
Expand All @@ -53,7 +52,7 @@ class GalleryActivity : ComponentActivity() {


setContent {
MiniAppTheme {
ComposeAppTheme {
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import com.engineer.compose.ui.ui.theme.MiniAppTheme
import com.engineer.compose.ui.ui.theme.ComposeAppTheme

/**
* https://developer.android.google.cn/jetpack/compose/tutorial
Expand All @@ -17,7 +17,7 @@ class MainComposeActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
MiniAppTheme {
ComposeAppTheme {
// A surface container using the 'background' color from the theme
Surface(color = MaterialTheme.colorScheme.background) {
MessageCard(Message("lucy", "hello world"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private val LightColorScheme = lightColorScheme(
)

@Composable
fun MiniAppTheme(
fun ComposeAppTheme(
darkTheme: Boolean = isSystemInDarkTheme(),
// Dynamic color is available on Android 12+
dynamicColor: Boolean = true,
Expand Down

0 comments on commit dc589cb

Please sign in to comment.