android-architecture-components Questions
5
Solved
I'm trying to write simple integration test in my current android project written totally in Kotlin.
The problem is that the test doesn't even start and fails with the following error:
Error:(4, ...
Lely asked 23/2, 2018 at 14:43
3
I have an abstract BaseActivity in my library module:
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//Normal method to inflate th...
Rosy asked 3/11, 2019 at 15:27
36
I'm converting a project to Kotlin and I'm trying to make my model (which is also my entity) a data class
I intend to use Moshi to convert the JSON responses from the API
@Entity(tableName = "movi...
Factor asked 11/6, 2017 at 15:38
16
Solved
What is the difference between those 2 methods of the LiveData class? The official doc and tutorial are pretty vague on that. In the map() method the first parameter called source but in the switch...
Mauchi asked 30/11, 2017 at 14:36
7
Solved
I am trying to understand ViewModel and LiveData concepts in android. I am making a practice project but when i added implementation 'androidx.lifecycle:lifecycle-extensions-ktx:2.0.0-alpha1' line ...
Cumquat asked 17/6, 2018 at 4:21
14
Solved
I have next use case: User comes to registration form, enters name, email and password and clicks on register button. After that system needs to check if email is taken or not and based on that sho...
Chatterjee asked 30/5, 2018 at 8:26
32
Solved
Error:Not sure how to convert a Cursor to this method's return type
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
...
Abm asked 27/9, 2017 at 10:48
2
I would like to refactor my Custom View to use android architecture components. However, I see that
ViewModelProviders.of(...)
takes only Activity or fragment. Any idea how to make it work? Sho...
Mussorgsky asked 28/3, 2018 at 11:3
12
Solved
I'm working on a small project and trying to use the new navigation architecture components. When i'm trying to add some arguments to a destination i got "Unresolved reference: NavArgs" error.
I f...
Abampere asked 24/1, 2019 at 19:29
18
Solved
Is it possible to prevent LiveData receive the last value when start observing?
I am considering to use LiveData as events.
For example events like show message, a navigation event or a dialog tri...
Siouan asked 14/4, 2018 at 14:56
13
Solved
I have an activity A that start activity B passing to it some intent data. Activity B host a navigation graph from the new Navigation Architecture Component.I want to pass that intent data to the s...
Synonymous asked 14/5, 2018 at 15:59
2
I am following MVVM architecture for my app. In Activity I need to getNews() from a URL, if news is not already cached.
Activity will ask ViewModel to give the News Json and ViewModel will look in...
Botello asked 22/5, 2018 at 11:37
15
Solved
My understanding on LiveData is that, it will trigger observer on the current state change of data, and not a series of history state change of data.
Currently, I have a MainFragment, which perform...
Orit asked 8/5, 2018 at 15:5
10
Solved
I have a separate class in which I handle data fetching (specifically Firebase) and I usually return LiveData objects from it and update them asynchronously. Now I want to have the returned data st...
Erectile asked 27/11, 2017 at 16:51
13
Solved
Edit: This question is a bit out of date now that Google has given us the ability to scope ViewModel to navigation graphs. The better approach (rather than trying to clear activity-scoped models) w...
Quarles asked 6/12, 2018 at 14:4
5
Solved
I have one entity in room
@Entity(foreignKeys ={
@ForeignKey(entity = Label.class, parentColumns = "_id", childColumns = "labelId", onDelete = CASCADE),
@ForeignKey(entity = Task.class, parentCo...
Jordanjordana asked 24/2, 2018 at 11:3
3
Solved
I have three top-level destination fragments in my activity:
appBarConfiguration = AppBarConfiguration(
setOf(
R.id.trackerFragment,
R.id.nutrientFragment,
R.id.settingsFragment
),
drawerLayo...
Henandchickens asked 17/6, 2021 at 21:27
2
I'm using the Android Paging 3 library in my project in order to load my data page by page. In this project, I'm not using database which means I'm using network only requests. The problem is that ...
Hounding asked 3/2, 2021 at 8:40
5
Solved
I am new to android development and I am trying to make a notes app by following the android architecture components but on running I am getting errors in my DAO if any one could help would be high...
Tridimensional asked 8/6, 2021 at 20:17
4
I am using paging library to load data and populate my recyclerview which is placed inside a nestedscrollview. But it is like, pagination works automatically until all the data fetched from API. I ...
Serenity asked 6/2, 2019 at 6:26
7
Solved
In recent Android Architecture Components library released by Google, we have two static functions in the Transformations class. While the map function is straight forward and easily understandable...
Satisfied asked 2/12, 2017 at 17:42
2
Solved
I'm trying to implement Android ListenableWorker that startWork() method returns com.google.common.util.concurrent.ListenableFuture interface, but the last one isn't available. Also I need com.goog...
Grath asked 1/8, 2019 at 10:41
21
Solved
I am using The new Navigation Architecture Component in android and I am stuck in clearing the navigation stack after moving to a new fragment.
Example:
I am in the loginFragment and I want this...
Whitehot asked 24/5, 2018 at 17:10
4
Solved
On 7th May, 2019 androidx.lifecycle:*:2.2.0-alpha01 was released announcing:
This release adds new features that adds support for Kotlin coroutines for Lifecycle and LiveData. Detailed documenta...
Parmer asked 8/5, 2019 at 7:0
36
Solved
I am trying to write a sample app using Android architecture components and but even after trying for days I could not get it to work. It gives me the above exception.
Lifecycle owner:-
public cl...
Corinnacorinne asked 9/7, 2017 at 15:30
1 Next >
© 2022 - 2024 — McMap. All rights reserved.