Skip to content

Commit

Permalink
Merge pull request #152 from myofficework000/mvi_design
Browse files Browse the repository at this point in the history
Small fix
  • Loading branch information
myofficework000 authored Jun 29, 2023
2 parents 79554b4 + 64598da commit db279bc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ dependencies {
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.11'
//Moshi
implementation 'com.squareup.moshi:moshi-kotlin:1.15.0'
implementation "com.squareup.retrofit2:converter-moshi:2.9.0"

//Convertor factory by Gson
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.example.jetpack_compose_all_in_one.android_architectures.clean_code_with_mvi_mvvm.data.remote

import com.example.jetpack_compose_all_in_one.android_architectures.clean_code_with_mvi_mvvm.data.remote.WeatherDataDto
import com.squareup.moshi.Json

data class WeatherDto(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,32 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.height
import androidx.compose.material.CircularProgressIndicator
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import com.example.jetpack_compose_all_in_one.ui.theme.Blue10
import com.example.jetpack_compose_all_in_one.ui.theme.L1BoxColor2


@Composable
fun WeatherScreen() {
fun WeatherScreen(
viewModel: WeatherViewModel
) {
Box(
modifier = Modifier.fillMaxSize()
) {
Column(
modifier = Modifier
.fillMaxSize()
.background(DarkBlue)
.background(Blue10)
) {
WeatherCard(
state = viewModel.state,
backgroundColor = DeepBlue
backgroundColor = L1BoxColor2
)
Spacer(modifier = Modifier.height(16.dp))
WeatherForecast(state = viewModel.state)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import androidx.navigation.compose.rememberNavController
import com.example.jetpack_compose_all_in_one.*
import com.example.jetpack_compose_all_in_one.R
import com.example.jetpack_compose_all_in_one.android_architectures.clean_code.presentation.ui.DogApiMainPage
import com.example.jetpack_compose_all_in_one.android_architectures.clean_code_with_mvi_mvvm.presentation.WeatherScreen
import com.example.jetpack_compose_all_in_one.android_architectures.mvi.view.RandomDogView
import com.example.jetpack_compose_all_in_one.android_architectures.mvp.view.DogMvpUI
import com.example.jetpack_compose_all_in_one.application_components.activity.ActivityDemo
Expand Down Expand Up @@ -52,6 +53,7 @@ import com.example.jetpack_compose_all_in_one.features.timer_demo.TimerDemo
import com.example.jetpack_compose_all_in_one.features.weather_sample.model.remote.ApiWeatherService
import com.example.jetpack_compose_all_in_one.features.weather_sample.model.remote.RetrofitBuilder
import com.example.jetpack_compose_all_in_one.features.weather_sample.model.repository.RemoteWeatherRepository
import com.example.jetpack_compose_all_in_one.features.weather_sample.view.WeatherSample
import com.example.jetpack_compose_all_in_one.features.weather_sample.viewmodel.WeatherViewModel
import com.example.jetpack_compose_all_in_one.lessons.lesson_1.Lesson_1_Display
import com.example.jetpack_compose_all_in_one.lessons.lesson_10.Lesson_10
Expand All @@ -76,7 +78,6 @@ import com.example.jetpack_compose_all_in_one.lessons.lesson_7.Lesson_7_Chapter_
import com.example.jetpack_compose_all_in_one.lessons.lesson_8.Lesson_8_Animations
import com.example.jetpack_compose_all_in_one.lessons.lesson_9.Lesson_9
import com.example.jetpack_compose_all_in_one.third_party_lib.chat_gpt.view.ChatUI
import com.example.jetpack_compose_all_in_one.third_party_lib.chat_gpt.viewmodel.ChatGPTViewModel
import com.example.jetpack_compose_all_in_one.third_party_lib.stripe.IntegrateStripe
import com.example.jetpack_compose_all_in_one.ui.views.chat.DemoFullChat2
import com.example.jetpack_compose_all_in_one.ui.views.domain_search.DomainSearch
Expand Down Expand Up @@ -451,7 +452,7 @@ fun MainContainerOfApp(
}

composable(NavDes.CleanCodeWithMVI.route()) {
DogApiMainPage()
WeatherScreen(viewModel = hiltViewModel())
}

composable(NavDes.SharedPrefDemo.route()){
Expand Down

0 comments on commit db279bc

Please sign in to comment.