-
-
Save sagar-viradiya/64b6a8331b3f4d436ae499b9700ac1f4 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?> | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:background="@color/backgroundColor" | |
tools:context=".MainActivity"> | |
<androidx.core.widget.ContentLoadingProgressBar | |
android:id="@+id/progressBar" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_gravity="center" | |
style="?android:attr/progressBarStyle" /> | |
<androidx.recyclerview.widget.RecyclerView | |
android:id="@+id/recyclerView" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |
android:orientation="vertical" | |
android:visibility="gone" | |
tools:visibility="visible" | |
tools:listitem="@layout/movie_item_layout" /> | |
<com.google.android.material.textview.MaterialTextView | |
android:id="@+id/errorView" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_gravity="center" | |
android:gravity="center" | |
android:visibility="gone" | |
tools:visibility="visible" | |
android:fontFamily="@font/roboto" | |
android:text="@string/error_msg"/> | |
</FrameLayout> |
@soni1468 As I already mentioned in the session, tools
namespace is only for preview purposes. You have to either use android namspace and use image stored locally in your app or load it from a remote sever. Niharika and Shreyank did it in the 2nd session.
@RB-93 Thanks for constant support in answering queries.
Thanks to you and the team, made possible these talks, explained and covered all the aspects to create wonderful app.
Learnt a lot! 😀
And for support, always ready for it any time. 🙂
I am also facing the same exact issue.
Not able to get the image using static links even though internet permission is added.
I am also facing the same exact issue.
Not able to get the image using static links even though internet permission is added.
Well I fixed it ...... It was a simple error in logic from my end .... I typed wrap_content where it should be match_parent
Could you provide the gist of the whole app?
Hi,
It's available on DevFest India resources link page under Mobile track.
The image is not getting shown in the card even though it's coming fine in preview.
below is the movie_item_layout.xml for reference:
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:contentPaddingBottom="16dp"
xmlns:tools="http://schemas.android.com/tools">
</com.google.android.material.card.MaterialCardView>