All Questions
Tagged with android-jetpack androidx
108
questions
2
votes
1
answer
337
views
Room DB: What does UPSERT returns?
While @Insert returns Long or collection of it for rowId and @Delete or @Update returns Int for number of rows affected, then what does @Upsert can return?
Reference: https://developer.android.com/...
1
vote
0
answers
47
views
Should calls to onBackPressed() be treated differently from API 33? [duplicate]
I am using onBackPressedDispatcher.addCallback() to handle back press.
I am not using override of onBackPressed() to handle back press.
However, I do call onBackPressed() when following the back press ...
7
votes
1
answer
2k
views
Jetpack compose unresolved reference errors
I'm keep getting this issues please help to fix these.
I want to show an animated drawable in jetpack compose.
Error -
e: /myproject/../MainActivity.kt: (42, 17): Unresolved reference: ...
2
votes
0
answers
239
views
AndroidX DataStore: Multiple Profiles
In my app I'm using AndroidX DataStore to save preferences.
To do this, I followed the documentation and added a Context property at file-level like this:
val Context.dataStore: DataStore<...
0
votes
1
answer
68
views
When does OnItemActivatedListener.onItemActivated gets triggered in RecyclerView?
The documentation for OnItemActivatedListener.onItemActivated says that this method is
Called when an item is "activated". An item is activated, for example, when no selection exists and ...
5
votes
2
answers
1k
views
Is there any correct (effective) way to use CustomView (with or without androidx.compose.ui.viewinterop.AndroidView) inside LazyColumn?
What is the problem?
Now I'm trying to use my custom Android view inside LazyColumn. In my opinion, because of recreating my custom views every time I scrolling, picture is very laggy. So, is there ...
1
vote
1
answer
437
views
How to update timeInterval for PeriodicWorkRequest after doWork() call
I'm new to Work manager in android and I want to update the timeInterval of PeriodicWorkRequest once I got the response from server. Here is my sample code where I'm trying to update the timeInterval. ...
1
vote
0
answers
556
views
Navigation component crash onOptionsItemSelected
I have started to receive this crash in Firebase Crashlytics. It is quite scarce.
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'androidx.navigation.q androidx....
0
votes
1
answer
270
views
Android AutoCompleteTextView width
I am following this guide to create a dropdown menu:
https://material.io/components/menus/android#exposed-dropdown-menus
So I have a TextInputLayout containing a custom subclass of ...
2
votes
0
answers
171
views
No matching key found for the ciphertext in the stream
I am getting an exception while decrypting the encrypted file.
Exception happening in the decryptFile() method. Line where exception happening is
while (fileInputStream.read(buffer).also { read = it }...
4
votes
0
answers
881
views
Using SavedStateHandle with a shared ViewModel
I have a shared ViewModel that is shared across my MainActivity and all my fragments so it basically serves as a shared data model for my entire android app.
I basically access it like this everywhere:...
0
votes
1
answer
517
views
How can I set the exact creation time of a video as a file name with Camerax
I'm currently developing a video recorder with androidx because I need video files with their exact creation time as millisecond timestamp as title for another project. The problem is that I just ...
3
votes
1
answer
2k
views
Duplicate class com.google.android.a.a found in modules?
I tried adding Installreferrer to my app after adding it to gradle, when rebuilding the app. I'm getting this error.
Duplicate class com.google.android.a.a found in modules jetified-installreferrer-2....
11
votes
8
answers
9k
views
Linkify with Compose Text
I can't find how to linkify my Text() using Jetpack Compose.
Before compose all I had to do was:
Linkify.addLinks(myTextView, Linkify.EMAIL_ADDRESSES or Linkify.WEB_URLS)
And all the links contained ...
4
votes
2
answers
1k
views
AndroidX and Android Jetpack
As per my knowledge Androidx is itself a library, and android jetpack is a set of libraries. Is Androidx a library in Android Jetpack? I am a little bit confused about Androidx vs Android Jetpack. Can ...