diff --git a/.gradle/7.3.3/executionHistory/executionHistory.lock b/.gradle/7.3.3/executionHistory/executionHistory.lock index c41e9806ac783a6a763ac7e7d8333cf8e78cd4f3..406dc8a79a5616184a22efbc9c745acc62fc1658 100644 Binary files a/.gradle/7.3.3/executionHistory/executionHistory.lock and b/.gradle/7.3.3/executionHistory/executionHistory.lock differ diff --git a/.gradle/7.3.3/fileHashes/fileHashes.bin b/.gradle/7.3.3/fileHashes/fileHashes.bin index 6a58db0f47cedb2b3c629567bbc6f1827e652adf..e4f133c2ba74b431cd552e1805534daf4635c4a6 100644 Binary files a/.gradle/7.3.3/fileHashes/fileHashes.bin and b/.gradle/7.3.3/fileHashes/fileHashes.bin differ diff --git a/.gradle/7.3.3/fileHashes/fileHashes.lock b/.gradle/7.3.3/fileHashes/fileHashes.lock index cf8dc8c0682cd765086a7bdef66aa1acc0c5f5d9..e9193af9913004162df4507be871a28b8c9756a2 100644 Binary files a/.gradle/7.3.3/fileHashes/fileHashes.lock and b/.gradle/7.3.3/fileHashes/fileHashes.lock differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 0d8081ab3b7ec6220c85bdddf04424e1a3bd9acb..06248381ebfc9b73cdba19f7533d23771047cc86 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin index 511bcd26875f005ad91452cbf2215a858daa50ec..4df35562fd76e45873ff29ffc07676b0c53e8926 100644 Binary files a/.gradle/buildOutputCleanup/outputFiles.bin and b/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/.idea/misc.xml b/.idea/misc.xml index d4773db8c26b017fb1741afb75890151fb784c33..24999951bf83a5332864aadd52a348e4f6944dec 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -4,6 +4,7 @@ <option name="filePathToZoomLevelMap"> <map> <entry key="..\:/Users/Fair/Desktop/android-basics-kotlin-mars-photos-app-starter/app/src/main/res/drawable/ic_broken_image.xml" value="0.226" /> + <entry key="..\:/Users/Fair/Desktop/android-basics-kotlin-mars-photos-app-starter/app/src/main/res/layout/fragment_overview.xml" value="0.33" /> <entry key="..\:/Users/Fair/Desktop/android-basics-kotlin-mars-photos-app-starter/app/src/main/res/layout/grid_view_item.xml" value="0.24048913043478262" /> </map> </option> diff --git a/app/src/main/res/layout/fragment_overview.xml b/app/src/main/res/layout/fragment_overview.xml index cd3093848bf2f40982ce4921211c1c49280acd10..252183982a445034710dfda7406d77b283f6b8e2 100644 --- a/app/src/main/res/layout/fragment_overview.xml +++ b/app/src/main/res/layout/fragment_overview.xml @@ -30,14 +30,20 @@ android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.android.marsphotos.overview.OverViewFragment"> - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@{viewModel.status}" + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/photos_grid" + android:layout_width="0dp" + android:layout_height="0dp" + android:padding="6dp" + app:layoutManager= + "androidx.recyclerview.widget.GridLayoutManager" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" - app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toTopOf="parent" + tools:itemCount="16" + tools:listitem="@layout/grid_view_item" + app:spanCount="2" /> </androidx.constraintlayout.widget.ConstraintLayout> </layout> \ No newline at end of file diff --git a/app/src/main/res/layout/grid_view_item.xml b/app/src/main/res/layout/grid_view_item.xml index 9353304d789b77ec85b52b9f81f92fe7646c44b5..56adc846799874eb7cd62c2b31aa3025de442c86 100644 --- a/app/src/main/res/layout/grid_view_item.xml +++ b/app/src/main/res/layout/grid_view_item.xml @@ -21,8 +21,8 @@ xmlns:tools="http://schemas.android.com/tools"> <data> <variable - name="viewModel" - type="com.example.android.marsphotos.overview.OverviewViewModel" /> + name="photo" + type="com.example.android.marsphotos.network.MarsPhoto" /> </data> <ImageView android:id="@+id/mars_image" @@ -31,6 +31,6 @@ android:scaleType="fitXY" android:adjustViewBounds="true" android:padding="2dp" - app:imageUrl="@{viewModel.photos.imgSrcUrl}" + app:imageUrl="@{photo.imgSrcUrl}" tools:src="@tools:sample/backgrounds/scenic"/> </layout>