Category "android-jetpack"

Android: no start destination defined via app:startDestination for x.x.x:id/nav_graph

In the nav_graph even though I have used, I get warning project level gradle: // Top-level build file where you can add configuration options common to all

Android Jetpack Navigation - Custom Action with Drawer Item

I am using the new Jetpack Android Navigation in combination with a Drawer Layout. Everything is working as expected when using the same IDs in the Drawer XML i

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

State of nested Fragments is lost when returned to same tab in 'Navigation Architecture Component'

I'm exploring the the 'Navigation Architecture Component' concept which introduced in Google I/O 2018 last month. Let say I have an activity with a bottom nav

Does Android Jetpack Compose support Toolbar widget?

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

Do I still need to use traditional way to implement Preferences Settings Screen in Jetpack Compose?

At present I use Jetpack Compose in my Android Studio project. I find many projects still to use traditional way to implement a Preferences Settings Screen afte

Jetpack Compose navigate for result

I'm using the Jetpack Navigation library with the Compose version. I'm setting up navigation like it's shown here I want to be able to navigate from screen A to

How to upgrade an Android project to Java 11

I am using the latest Android Studio Arctic Fox 2020.03.01 Canary 8 and AGP 7, and I want to convert my project to use Java 11. Apparently just doing the follow

How to know if Text is visible on Jetpack Compose?

I have a scrollable screen and I would like to do action when a specific text appears/disappears in that screen. Is there any way to do that? Thanks

How to show ellipsis (three dots) at the end of a Text line in Android Jetpack Compose?

Whether I use androidx.compose.foundation.text.BasicText or androidx.compose.material.Text, if there isn't enough space for a text it wraps to the next line, fo

Composable not recomposing when ViewModel updated from a different Composable

I am developing an Android app using Jetpack Compose. The app shows a list of items. It also has a top bar containing a search bar. We have 3 composable: the li

android:autoSizeTextType in Jetpack Compose

Is there a way to adjust the text to always resize depending a fixed height ? I have a column that has a fixed height and in which the text inside should always

Compose preview doesn't work at all - project needs to be compiled

I use Android Studio Bumblebee 2021.1.1 Patch 3 built on March 16, 2022 androidx.compose.ui:ui-tooling, androidx.compose.ui:ui-tooling-preview, androidx.compose

How can I get string resource in Jetpack composable test

We can get the string resource in Composable through stringResource like @Composable fun Heading( @StringRes textResource: Int ) { Text( text =

Cannot create instance of viewmodel after using Hilt in Android

Here is my AllFilesListViewModel class. class AllFilesListViewModel @ViewModelInject constructor( private val pdfItemRepository: PdfItemRepository):ViewMod

Cannot create instance of viewmodel after using Hilt in Android

Here is my AllFilesListViewModel class. class AllFilesListViewModel @ViewModelInject constructor( private val pdfItemRepository: PdfItemRepository):ViewMod

How to identify multiple instances of Glance App Widget

I am trying to create a widget which shows information about a hardware device. There can be multiple of these devices and user will be able to add same widget

Is it possible to use Paging (As part of android jetpack) without using Room DB?

Right now I'm working on an Android project which contains a RecyclerView with a large amount of data. For improving the app's performance I wish to implement

Navigation Component: IllegalStateException Fragment not associated with a fragment manager

I'm using the Navigation Component version 2.1.0-rc01 and I navigate back and forth between 3 screens using Navigation.findNavController(it).navigate(R.id.act

Resources$NotFoundException - Failed to open file '...fragment_list.xml': No such file or directory

I am learning MVVM and have run into an issue, and I am getting the following errors: Resources$NotFoundException: File res/layout/fragment_list.xml from xml ty