Category "android-jetpack-compose"

Multi style text editing for TextField composable in android jetpack compose

I want to change the text style (fontSize , color , fontWeight , ...) of a selected text in a TextFiled() composable , with a button in android jetpack compose.

ViewModels creation is not supported in Preview

I followed the official guide to create viewModel instance and it works perfectly. However, when there is any viewModel in the @composable, Android Studio isn't

How to show keyboard with Jetpack Compose?

How can I slide in the keyboard? I tried: val keyboardController: SoftwareKeyboardController? = LocalSoftwareKeyboardController.current keyboardController?.sh

How to get activity in compose

Is there a way to get current activity in compose function? @Composable fun CameraPreviewScreen() { val context = ContextAmbient.current if (ActivityCom

How to create an instance of Room Dao or Repository or Viewmodel in GlanceAppWidget class using Jetpack Compose

I am trying to load list of data in App Widget using jetpack compose and i have stored in Room Local database, how i can retrive the data in GlanceAppWidget cla

Jetpack Compose: Custom TextField design

In general, most components in Jetpack Compose seem to be very easy to customize. However, the same cannot be said for the TextField. For example, say that I wa

Jetpack compose can not inspect in AS Layout Inspector

Jetpack compose can not inspect in AS Layout Inspector. Is there any tools can inspect compose layoutnode.

How to display title and snippet on a google maps composable marker, without clicking on it?

I'm using the new google maps integration library with jetpack compose, however I want to modify a behavior of my markers: when the map initializes I want to sh

Software keyboard overlaps content of jetpack compose view

Suppose I have some activity with a jetpack-compose content class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) {

Provided camera selector unable to resolve a camera for the given use case

I use camera in compose to take picture. Code for camera preview^ @Composable fun CameraPreview( modifier: Modifier = Modifier, scaleType: PreviewView.S

Kotlin Multiplatform Compose + Desktop + Web + Mobile

Is it possible at the moment to have a kotlin multiplatform project using compose for sharing the ui code for desktop, web, and mobile at the same time? All the

Why Surface child compasable fill max size if i don't wrap it in an other container?

This code fills the full screen if i specify the size to be 100.dp. ComposeTheme { Surface( modifier = Modifier.fillMaxSize(), color = Mater

How to add/remove characters inside TextField?

I have a Room database with a table that holds users. Each user has an ID and a name. My goal is to change the name of the user based on the ID. Here is what I

Problems with android Compose

I am trying to work through a tutorial on android compose. It works well while I use:kotlin-gradle-plugin:1.5.31, but the android studio has updated to :kotlin-

Android Jetpack Compose - java.lang.NoSuchMethodError: No virtual method setContent(Lkotlin/jvm/functions/Function0;)

I'm getting a java.lang.NoSuchMethodError exception when trying to run setContent{ Composable() }. Full code: class ComposeFragment : Fragment() { override fun

Jetpack compose with Google Place API

I am trying to use Place SDK with jetpack compose but I can not find any resource on how to implement this. @Composable fun PlaceSearchView() { // Initializ

Modal Bottom Sheet in Jetpack Compose for Activity

I have bottom navigation bar. So my composable functions do not take up the full screen size. When I use ModalBottomSheetLayout, it opens in the composable fun,

What is the Jetpack Compose equivalent of RecyclerView or ListView?

In Jetpack Compose, how can I display a large list of data while laying out only the visible items, instead of composing and laying out every item on the initia

Compose: remember() with keys vs. derivedStateOf()

What is the difference between these two approaches? val result = remember(key1, key2) { computeIt(key1, key2) } (Docs) val result by remember { derivedStateOf

Does Android Jetpack Compose support Toolbar widget?

I'd like to use Toolbar with Jetpack Compose. Does it have such a Composable component?