thomaskioko / android-livedata-viewmodel Goto Github PK
View Code? Open in Web Editor NEWAndroid app that demonstrates how to use new Architecture components.
Home Page: https://medium.com/@code_wizard/android-livedata-viewmodel-81dd71d69e1f
Android app that demonstrates how to use new Architecture components.
Home Page: https://medium.com/@code_wizard/android-livedata-viewmodel-81dd71d69e1f
its has to do with giving a unique transitionName for sharedElements.
๐
Is Movie class will be used as a response class for retrofit and will be used for database Movie table as well?
Update the movie model to contain a parent movie object and code stopped compiling with the below
app:javaPreCompileDebug UP-TO-DATE
/Users/hari/Manch/android-liveData-viewModel/app/src/main/java/com/thomaskioko/livedatademo/di/AppInjector.java:11: error: cannot find symbol
import com.thomaskioko.livedatademo.di.component.DaggerAppComponent;
^
symbol: class DaggerAppComponent
location: package com.thomaskioko.livedatademo.di.component
warning: Supported source version 'RELEASE_7' from annotation processor 'android.arch.lifecycle.LifecycleProcessor' less than -source '1.8'
warning: Supported source version 'RELEASE_7' from annotation processor 'android.arch.persistence.room.RoomProcessor' less than -source '1.8'
/Users/hari/Manch/android-liveData-viewModel/app/src/main/java/com/thomaskioko/livedatademo/db/entity/Movie.java:48: error: Cannot figure out how to save this field into database. You can consider adding a type converter for it.
public Movie parent;
^
/Users/hari/Manch/android-liveData-viewModel/app/src/main/java/com/thomaskioko/livedatademo/db/TmdbDb.java:17: warning: Schema export directory is not provided to the annotation processor so we cannot export the schema. You can either provide `room.schemaLocation` annotation processor argument OR set exportSchema to false.
public abstract class TmdbDb extends RoomDatabase {
^
/Users/hari/Manch/android-liveData-viewModel/app/src/main/java/com/thomaskioko/livedatademo/di/component/AppComponent.java:24: error: [ComponentProcessor:MiscError] dagger.internal.codegen.ComponentProcessor was unable to process this interface because not all of its dependencies could be resolved. Check for compilation errors or a circular dependency with generated code.
public interface AppComponent {
^
3 errors
3 warnings
:app:compileDebugJavaWithJavac FAILED
Updated Model
@Entity(indices = {@Index("id")},
primaryKeys = {"id"})
@TypeConverters(TmdbTypeConverters.class)
public class Movie {
@SerializedName("id")
@Expose
@NonNull
public final int id;
@SerializedName(value = "poster_path")
public String posterUrl;
public Double rating;
@SerializedName(value = "release_date")
public String releaseYear;
public String title;
public Boolean adult;
public String overview;
@SerializedName(value = "original_title")
public String originalTitle;
@SerializedName(value = "original_language")
public String originalLanguage;
@SerializedName(value = "backdrop_path")
public String backdropPath;
public Double popularity;
@SerializedName(value = "vote_count")
public Integer voteCount;
public Boolean video;
@SerializedName(value = "vote_average")
public Double voteAverage;
@SerializedName(value = "genre_ids")
public List<Integer> genreIds;
@SerializedName(value = "parent")
public Movie parent;
public Movie(int id, String posterUrl, Double rating, String releaseYear, String title, Boolean adult,
String overview, String originalTitle, String originalLanguage, String backdropPath,
Double popularity, Integer voteCount, Boolean video, Double voteAverage, List<Integer> genreIds, Movie parent) {
this.id = id;
this.posterUrl = posterUrl;
this.rating = rating;
this.releaseYear = releaseYear;
this.title = title;
this.adult = adult;
this.overview = overview;
this.originalLanguage = originalLanguage;
this.originalTitle = originalTitle;
this.backdropPath = backdropPath;
this.popularity = popularity;
this.voteCount = voteCount;
this.video = video;
this.voteAverage = voteAverage;
this.genreIds = genreIds;
this.parent = parent;
}
}
Would be great of you if you can let me know how to go about this issue.
Have tried with stack over flow and other places but could find a solution or may be I was not able to get it right.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.