Skip to content

Commit

Permalink
Tiktok code impl - in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
ViratAtAndroid committed Oct 25, 2023
1 parent bf2998a commit fcbee8f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guru.composecookbook.tiktok
package com.example.jetpack_compose_all_in_one.demos.tiktok

import android.content.Context
import android.content.Intent
Expand All @@ -25,14 +25,12 @@ import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.currentBackStackEntryAsState
import androidx.navigation.compose.rememberNavController
import com.example.jetpack_compose_all_in_one.demos.tiktok.TiktokDemoDataProvider
import com.example.jetpack_compose_all_in_one.demos.tiktok.TiktokHomeInteractionEvents
import com.guru.composecookbook.theme.ComposeCookBookTheme
import com.guru.composecookbook.theme.tiktokBlack
import com.guru.composecookbook.tiktok.components.discovers.DiscoverScreen
import com.example.jetpack_compose_all_in_one.demos.tiktok.components.home.HomeScreen
import com.example.jetpack_compose_all_in_one.demos.tiktok.components.home.TiktokCreateIcon
import com.example.jetpack_compose_all_in_one.demos.tiktok.components.profile.ProfileScreen
import com.example.jetpack_compose_all_in_one.ui.theme.JetpackComposeAllInOneTheme
import com.example.jetpack_compose_all_in_one.ui.theme.tiktokBlack
import com.example.jetpack_compose_all_in_one.demos.tiktok.components.discovers.DiscoverScreen

class TiktokActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
Expand All @@ -41,7 +39,7 @@ class TiktokActivity : ComponentActivity() {
window.statusBarColor = ContextCompat.getColor(this, android.R.color.black)

setContent {
ComposeCookBookTheme(darkTheme = true) {
JetpackComposeAllInOneTheme(darkTheme = true) {
TiktokAppContent()
}
}
Expand Down Expand Up @@ -137,8 +135,9 @@ fun handleInteractionEvent(
is TiktokHomeInteractionEvents.OpenProfile -> {
navController.navigate("${TikTokScreen.Profile.route}/${tiktokHomeInteractionEvents.album.id}")
}

else -> {
//TODO
//
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guru.composecookbook.tiktok.components.discovers
package com.example.jetpack_compose_all_in_one.demos.tiktok.components.discovers

import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
Expand All @@ -7,11 +7,11 @@ import androidx.compose.material.Surface
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.guru.composecookbook.theme.ComposeCookBookTheme
import com.example.jetpack_compose_all_in_one.ui.theme.JetpackComposeAllInOneTheme

@Composable
fun DiscoverScreen() {
ComposeCookBookTheme(darkTheme = false) {
JetpackComposeAllInOneTheme(darkTheme = false) {
Surface {
Column {
SearchSection()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guru.composecookbook.tiktok.components.discovers
package com.example.jetpack_compose_all_in_one.demos.tiktok.components.discovers

import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.background
Expand All @@ -13,15 +13,15 @@ import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.lazy.itemsIndexed
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.Icon
import androidx.compose.material.MaterialTheme.typography
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.guru.composecookbook.theme.typography
import com.guru.composecookbook.tiktok.R
import com.example.jetpack_compose_all_in_one.R
import com.example.jetpack_compose_all_in_one.demos.tiktok.TiktokDemoDataProvider
import com.example.jetpack_compose_all_in_one.demos.tiktok.TiktokDemoDataProvider.customGray

Expand All @@ -43,7 +43,7 @@ fun LaneSection(
Column(modifier = modifier.padding(vertical = 8.dp)) {
Row(modifier = Modifier.padding(8.dp)) {
Icon(
painter = painterResource(id = R.drawable.ic_hashtag_solid),
painter = painterResource(id = R.drawable.ic_share_solid),
contentDescription = null,
modifier = Modifier
.size(32.dp)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guru.composecookbook.tiktok.components.discovers
package com.example.jetpack_compose_all_in_one.demos.tiktok.components.discovers

import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.height
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.guru.composecookbook.tiktok.components.discovers
package com.example.jetpack_compose_all_in_one.demos.tiktok.components.discovers

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Row
Expand Down

0 comments on commit fcbee8f

Please sign in to comment.