From 03d240ca46eb48c56448f0ece12ef57c6a4014b1 Mon Sep 17 00:00:00 2001 From: konik Date: Sun, 30 Jun 2019 17:42:02 +0300 Subject: [PATCH] Added and used Glide library and parcelable implementing for Movie class --- app/build.gradle | 1 + app/src/main/image_not_available-web.png | Bin 0 -> 15164 bytes .../kaput/popularmoviesapp/MainActivity.java | 6 ++- .../kaput/popularmoviesapp/MovieAdapter.java | 29 +++++++------- .../popularmoviesapp/MovieDetailActivity.java | 6 ++- .../kaput/popularmoviesapp/model/Movie.java | 36 +++++++++++++++++- .../main/res/drawable-v24/no_img_avail.png | Bin 0 -> 13320 bytes app/src/main/res/layout/custom_item_card.xml | 8 ++-- 8 files changed, 61 insertions(+), 25 deletions(-) create mode 100644 app/src/main/image_not_available-web.png create mode 100644 app/src/main/res/drawable-v24/no_img_avail.png diff --git a/app/build.gradle b/app/build.gradle index 70552bc..d52b4a6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -19,6 +19,7 @@ android { } dependencies { + implementation 'com.github.bumptech.glide:glide:4.9.0' implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' diff --git a/app/src/main/image_not_available-web.png b/app/src/main/image_not_available-web.png new file mode 100644 index 0000000000000000000000000000000000000000..9c6676412aa31c4e572704fd2f731edfb2567c87 GIT binary patch literal 15164 zcmdtJcT`i|wsuZP#PlV8e zR4E}?5Dh{U&`1d&EkYonh0v0HH|TfYIrsNF=iN8P8{>{~^GC9?)?Bl#x#yf~&$%C7 zFgM=DzndQbfNkf_p0NS|ICKdI_%=a53%9yg06?4P+?i9>w|b|kVdd4frLS2i70@EetXD6Akv+ajcp34~$?Cn`H1x7d@T7xh*fnLV_~Xq!P&#(Wd4haCM^ zbrU%~o4mAD`2V_3QsE)7$K?7|Mg!QsI>2rMgYPq!;|7=FG@1SZ_qR{a%-B|_pxN^(g-S4HJ#mX6Bzn9!%d#P zabjZpuJqavPl)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tK#iLnQ=(iK!y@95F~whFfoRzZyWdi2Yc(#TUf(`=>a6k^GKI3e}+MSgp&bstodsash%(`Vw+qUQCm`Rt}}1AimA zO}ZTjpya*vbNe&`fgf#`haXN$G0aK1oxKwP1hbv(BK1XyQup{`@41?6h1BV3EohNK zm6c4nt#t(eejEyHb5BC4@&K5wyL=Fpl*R}DXFgJnT$eP-f{&fEPh6mE7dU5Vex}U8 H_0InQ$s}e; literal 0 HcmV?d00001 diff --git a/app/src/main/java/com/kaput/popularmoviesapp/MainActivity.java b/app/src/main/java/com/kaput/popularmoviesapp/MainActivity.java index 15c9ee8..ca49bf4 100644 --- a/app/src/main/java/com/kaput/popularmoviesapp/MainActivity.java +++ b/app/src/main/java/com/kaput/popularmoviesapp/MainActivity.java @@ -12,6 +12,7 @@ import android.support.v7.widget.RecyclerView; import android.view.View; +import com.bumptech.glide.Glide; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.kaput.popularmoviesapp.model.MovieListItem; @@ -52,7 +53,8 @@ protected void onCreate(Bundle savedInstanceState) { viewModel = ViewModelProviders.of(this).get(MovieViewModel.class); - final MovieAdapter movieAdapter = new MovieAdapter(this); + final MovieAdapter movieAdapter = new MovieAdapter(this, Glide.with(this)); + viewModel.movieList.observe(this, new Observer>() { @Override @@ -70,7 +72,7 @@ public void onChanged(@Nullable PagedList pagedList) { @Override public void onClick(View view, Movie m) { Intent i = new Intent(this, MovieDetailActivity.class); - i.putExtra("title", m.title); + i.putExtra("movie", m); startActivity(i); } } \ No newline at end of file diff --git a/app/src/main/java/com/kaput/popularmoviesapp/MovieAdapter.java b/app/src/main/java/com/kaput/popularmoviesapp/MovieAdapter.java index 94f1981..413482c 100644 --- a/app/src/main/java/com/kaput/popularmoviesapp/MovieAdapter.java +++ b/app/src/main/java/com/kaput/popularmoviesapp/MovieAdapter.java @@ -14,6 +14,8 @@ import android.widget.ImageView; import android.widget.TextView; +import com.bumptech.glide.Glide; +import com.bumptech.glide.RequestManager; import com.kaput.popularmoviesapp.model.Movie; import com.kaput.popularmoviesapp.R; import com.kaput.popularmoviesapp.model.MovieListItem; @@ -31,10 +33,12 @@ public class MovieAdapter extends PagedListAdapter DIFF_CALLBACK = new DiffUtil.ItemCallback() { @Override public boolean areItemsTheSame(@NonNull Movie movie, @NonNull Movie t1) { @@ -33,6 +35,25 @@ public boolean areContentsTheSame(@NonNull Movie movie, @NonNull Movie t1) { @Expose public String rating; + protected Movie(Parcel in) { + ranking = in.readInt(); + title = in.readString(); + posterPath = in.readString(); + rating = in.readString(); + } + + public static final Creator CREATOR = new Creator() { + @Override + public Movie createFromParcel(Parcel in) { + return new Movie(in); + } + + @Override + public Movie[] newArray(int size) { + return new Movie[size]; + } + }; + public void setRanking(int ranking) { this.ranking = ranking; } @@ -48,4 +69,17 @@ public void setPosterPath(String posterPath) { public void setRating(String rating) { this.rating = rating; } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + dest.writeInt(ranking); + dest.writeString(title); + dest.writeString(posterPath); + dest.writeString(rating); + } } diff --git a/app/src/main/res/drawable-v24/no_img_avail.png b/app/src/main/res/drawable-v24/no_img_avail.png new file mode 100644 index 0000000000000000000000000000000000000000..348d51472018763c98d7a7ceb847c795c4f7edbb GIT binary patch literal 13320 zcmeHuXIN8PyDjd$tuz}&s&1@wrH8f^X-ZLgk93d@p+jN=L}ua0E^3k&PHUq44!GP8NXhsR;M`kKe7$As8r z&x&*$_hezY$fA4qwn@nF;uyuBs`X6Xb7^?XKV@;19JIck-936(xPDh}UGH^QP@|2J zdzwz{`HsVj2-gCc+b4$a8SRB~2vooN^Yb5Xr2KE^9c&Q}n~t*dz|J3Garm93>d2EJ zmcKk%F3Pi<=6}WV@8>Kp*)>`Iut%rZU-*5Z}uCE(h3l3LTR}4jbe|pgLqy2MNj3r?LYHd9- zJUj=3xNkQ#h~M@6)D<89{Q2|mZYH(rc4Iv5*b(YVh>DQm)ugepF>fqC;br%aqkX!q zr7$=g9vHa6XU%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5@ z?^)V8PrQ%9yBP%V>GbSPi6OlGuexSDObBrX6^Zr~1sC$dL`?^raNs}hz!kT;9b2?0 zhv*zfO5WwB?UuJ|=r?V_W_)PpiooWHg~!aDcKNCAl%H3hdvd$%hknm|ZqJa%CEPbm z4>?u%{sEqt*XyM=3Y+J08}rs#;x9pzYSMz{KWVHz{Zi z;T~O1h9jfd)2s;#jz|LKk#ExT%`!-1CDab~G(5 zDBV6GM?bh-p;kY$s8MyM4|*DIwu(u~^F-!n8ob**Fha0bxose?J$4m`eCUsj)90>{ zTNZ?YbHfwCjBEAx?6(nt>p@e9qG>e7uzJ zu6SbqB^lSVcbz9?M781^BiP<(yeS=dmPQ*t=qxFsg^{~5AGpz+D7%&c8w^VsKdMl9 zujZABpSkPUr3p_fN1~LqvA3LHI_CtVr?O`0fGyU4aw}X45}t@*PR{rQDbJ`%`a-`A zY3Ub}OlIYvQi4-rdylh{O+vBSq2I`erGCM!lrhrQQg8jn6AxY?%1~QgaF-Uk|FLYO zCy{FRR^{G9GTWNkPoo=6B={Et+(*ow(4K-de6gZSTypNB)j)&~yyNgX4Zpr z=`3gCR~xZ{v_mk~u+{p9vmdnstJJ6duwh}+0{>_C{{QUW|Ce2G|J^r3e)KM?GpXue z2c6Y_Zm9d`C6RxBRpi%hyMNwW`PZ#<{~s?|K0Ffi*UyTQDX1%Wi-$#5)8KB!ok!39 E7b-e8bpQYW literal 0 HcmV?d00001 diff --git a/app/src/main/res/layout/custom_item_card.xml b/app/src/main/res/layout/custom_item_card.xml index fae00db..6aafbf4 100644 --- a/app/src/main/res/layout/custom_item_card.xml +++ b/app/src/main/res/layout/custom_item_card.xml @@ -18,7 +18,7 @@