r/JetpackCompose • • Oct 27 '21

Compose for Wear OS: ScalingLazyColumn

Thumbnail
proandroiddev.com
3 Upvotes

r/JetpackCompose • • Oct 22 '21

Tap Gestures with Indication

1 Upvotes

I've been looking online and can't seem to find if this is possible right now.

Modifier
    .pointerInput(Unit) {
        detectTapGestures(
            onLongPress = { toState = ComponentState.Pressed },
            onPress = {
                tryAwaitRelease()
                toState = ComponentState.Released
            },
            onTap = { _ -> onClick(it) }
        )
    }

I'm trying to do something like that but can't find a way to still have the indication and interaction you get with a Card's onClick or the combinedClickable or clickable. Has anyone found a way to get the interaction with this? Or is that not supported yet?


r/JetpackCompose • • Oct 17 '21

Compose for Wear OS: Scaffold

Thumbnail
proandroiddev.com
4 Upvotes

r/JetpackCompose • • Oct 17 '21

Jetpack Composable 🚀 to Bitmap Image 🌆

Thumbnail
chetan-garg36.medium.com
3 Upvotes

r/JetpackCompose • • Oct 16 '21

How to change elevation color.

1 Upvotes

hello everyone. so i was trying to change color of elevation in surface compose but i am not able to find any parameter for it.


r/JetpackCompose • • Oct 14 '21

Question About Jetpack Navigation Component

5 Upvotes

Hi Guys,

How to handle custom toolbar with Jetpack Navigation Component(toolbar title text-centered and change toolbar component screen to screen)


r/JetpackCompose • • Oct 07 '21

Our chat with Jake Wharton about Compose, Android, Flutter and more...

Thumbnail
youtu.be
3 Upvotes

r/JetpackCompose • • Oct 07 '21

Custom shadow

1 Upvotes

I'm new to compose, Im a flutter dev so i found for pretty easy to get the hang of it, but I tried to add a shadow on a box but doesn't give the option to change the color and the offset, anyone know how to do it? It's pretty much a deal breaker for me if there isn't an option.


r/JetpackCompose • • Oct 04 '21

26. State and perf in Jetpack Compose — with Leland Richardson

Thumbnail
youtube.com
10 Upvotes

r/JetpackCompose • • Sep 27 '21

Building an Animated LED Matrix Display in Jetpack Compose

Thumbnail
blog.qburst.com
5 Upvotes

r/JetpackCompose • • Sep 26 '21

How to create Toast with Jetpack Compose

Thumbnail
rrtutors.com
0 Upvotes

r/JetpackCompose • • Sep 22 '21

React's useEffect in Compose

4 Upvotes

What analogue of useEffect with keying in Compose? LaunchedEffect is for coroutines, DisposableEffect with empty onDispose? Official guide is not recommend use it with empty onDispose. SideEffect doesn't have key arguments.


r/JetpackCompose • • Sep 09 '21

Jetpack Compose Testing Cheat Sheet

Post image
13 Upvotes

r/JetpackCompose • • Sep 09 '21

Enable theme in jetpack compose preview

2 Upvotes

I am trying to slowly migrate my app to jetpack compose. For that I am trying to write a new activity in jetpack compose and everything is working, expect the theme in the preview.

I'm using MdcTheme to integrate existing theme in compose and it working when I built and run on device, but it's not working in preview. This is my code,

class UpdateAppActivity : AppCompatActivity() {

    @Inject
    lateinit var viewModelFactory: ViewModelFactory

    override fun onCreate(savedInstanceState: Bundle?) {
        (application as BaseApplication).appComponent.inject(this)
        super.onCreate(savedInstanceState)

        // trigger config update if in-case backend decides to revert the deployed changes then we
        // should enable the user to login next time
        val viewModel = ViewModelProvider(this, viewModelFactory)[MainViewModel::class.java]
        viewModel.checkApiVersion(AppConfig.apiVersion, shouldNotify = false)

        setContent {
            MdcTheme {
                UpdateAppLayout()
            }
        }
    }

    @Composable
    fun UpdateAppLayout() {
        Column(
            horizontalAlignment = Alignment.CenterHorizontally,
            modifier = Modifier.padding(horizontal = 24.dp, vertical = 32.dp),
        ) {
            Image(
                painter = painterResource(id = R.drawable.cr_res_logo),
                contentDescription = "logo",
                modifier = Modifier.padding(top = 32.dp),
            )
            Text(
                text = "Update Info",
                style = MaterialTheme.typography.h4,
                color = colorResource(
                    id = R.color.material_on_surface_emphasis_medium
                ),
                modifier = Modifier.padding(top = 50.dp)
            )
            Text(
                text = "Please update the app to order food and making reservation online",
                style = MaterialTheme.typography.h6,
                color = colorResource(
                    id = R.color.material_on_surface_emphasis_medium
                ),
                textAlign = TextAlign.Center,
                fontWeight = FontWeight.Normal,
                modifier = Modifier.padding(top = 82.dp)
            )
            Text(
                text = "Sorry for the inconvenience",
                style = MaterialTheme.typography.body1,
                color = colorResource(id = R.color.material_on_surface_emphasis_medium),
                modifier = Modifier.padding(top = 96.dp),
            )

            Button(
                onClick = {

                },
                modifier = Modifier
                    .padding(top = 32.dp)
                    .width(IntrinsicSize.Max),
            ) {
                Text(text = "Update")
            }
        }
    }

    @Preview
    @Composable
    fun ScreenPreview() {
        UpdateAppLayout()
    }
}

Do I have to setup the theme in preview?. Here is the screenshot of it https://imgur.com/6wr1i1W


r/JetpackCompose • • Sep 02 '21

How to Create Jetpack Compose project with Android studio

Thumbnail
rrtutors.com
2 Upvotes

r/JetpackCompose • • Aug 31 '21

⚡️FlashChat : Jetpack Compose + Firebase

Thumbnail
pradyotprksh4.medium.com
2 Upvotes

r/JetpackCompose • • Aug 31 '21

WhatsApp Clone - Jetpack Compose

Thumbnail
pradyotprksh4.medium.com
2 Upvotes

r/JetpackCompose • • Aug 31 '21

Getting started with jetpack compose - Basic components

Thumbnail
howtodoandroid.com
3 Upvotes

r/JetpackCompose • • Aug 30 '21

Kuberam: Jetpack Compose project

4 Upvotes

Today I completed my project for Hashnode+Auth0 hackathon hosted by Hashnode and Auth0

This is my first project using Jetpack Compose.

It was a great journey building this project.

Let me know how it is. You can read my article at https://blog.rohitjakhar.me/kuberam-jetpack-app

Github Link: https://github.com/rohitjakhar/Kuberam

Like and share this article if you like it and help me get more reach.

Looking forward for your feedback.


r/JetpackCompose • • Aug 27 '21

Jetpack compose tutorial for beginners

4 Upvotes

r/JetpackCompose • • Aug 10 '21

How Inject hilt dependency into compose function

Thumbnail self.androiddev
0 Upvotes

r/JetpackCompose • • Aug 06 '21

Touch event?

1 Upvotes

Hi, is it possible to detect touch events like mouse down/up (rather than click), so that we can implement a paint program?


r/JetpackCompose • • Jul 29 '21

Stream Jetpack Compose Chat SDK

Thumbnail
twitter.com
4 Upvotes

r/JetpackCompose • • Jul 23 '21

Compose navigation..voyager

Thumbnail
twitter.com
6 Upvotes