Skip to content

Commit

Permalink
fav feature - layout
Browse files Browse the repository at this point in the history
  • Loading branch information
shalenMathew committed Jun 3, 2024
1 parent 4c877eb commit dd401ad
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ data class MovieResponseVideoResultList(
val results: List<MovieResponseVideoResult>?
){
fun toMovieVideoResultList():MovieVideoResultList{
return MovieVideoResultList(id = id,results = results?.map { it.toMovieVideoResult() })
return MovieVideoResultList(
id = id,
results = results?.map {
it.toMovieVideoResult()
})
}
}
Binary file added app/src/main/res/drawable/fav.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/fav_outline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 16 additions & 5 deletions app/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@

<ImageView
android:id="@+id/fragment_home_search"
android:layout_width="@dimen/_20sdp"
android:layout_height="@dimen/_20sdp"
android:layout_width="@dimen/_23sdp"
android:layout_height="@dimen/_23sdp"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/_15sdp"
android:src="@drawable/ic_nav_search_24"
Expand All @@ -73,8 +73,8 @@

<ImageView
android:id="@+id/fragment_home_dice"
android:layout_width="@dimen/_15sdp"
android:layout_height="@dimen/_15sdp"
android:layout_width="@dimen/_18sdp"
android:layout_height="@dimen/_18sdp"
android:layout_centerVertical="true"
android:src="@drawable/dice"
app:tint="@color/white"
Expand All @@ -85,11 +85,22 @@

<ImageView
android:id="@+id/fragment_home_watchList"
android:layout_width="@dimen/_25sdp"
android:layout_height="@dimen/_25sdp"
android:layout_centerVertical="true"
android:src="@drawable/baseline_playlist_add_check_24"
app:tint="@color/white"
android:layout_marginEnd="@dimen/_8sdp"
android:layout_toStartOf="@id/fragment_home_favorite"
/>

<ImageView
android:id="@+id/fragment_home_favorite"
android:layout_width="@dimen/_20sdp"
android:layout_height="@dimen/_20sdp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:src="@drawable/baseline_playlist_add_check_24"
android:src="@drawable/fav_outline"
app:tint="@color/white"
android:layout_marginEnd="@dimen/_10sdp"
/>
Expand Down
40 changes: 34 additions & 6 deletions app/src/main/res/layout/fragment_movie_details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,40 @@
>

<com.google.android.material.card.MaterialCardView
android:id="@+id/fragment_movie_details_watchlist_btn"
android:id="@+id/fragment_movie_details_share_btn"
style="@style/Widget.Material3.CardView.Filled"
android:layout_width="@dimen/_35sdp"
android:layout_height="@dimen/_30sdp"

app:cardBackgroundColor="@color/app_color"
app:cardCornerRadius="8dp">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center">

<ImageView
android:layout_width="@dimen/_14sdp"
android:layout_height="@dimen/_14sdp"
android:src="@drawable/baseline_share_24"
app:tint="@color/white" />

</LinearLayout>

</com.google.android.material.card.MaterialCardView>

<com.google.android.material.card.MaterialCardView
android:id="@+id/fragment_movie_details_watchlist_btn"
style="@style/Widget.Material3.CardView.Filled"
android:layout_width="@dimen/_35sdp"
android:layout_height="@dimen/_30sdp"
app:cardBackgroundColor="@color/app_color"
app:cardCornerRadius="8dp"
android:layout_marginStart="@dimen/_15sdp"
>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -225,15 +252,15 @@

</com.google.android.material.card.MaterialCardView>


<com.google.android.material.card.MaterialCardView
android:id="@+id/fragment_movie_details_share_btn"
android:id="@+id/fragment_movie_details_like_btn"
style="@style/Widget.Material3.CardView.Filled"
android:layout_width="@dimen/_35sdp"
android:layout_height="@dimen/_30sdp"
android:layout_marginStart="@dimen/_15sdp"
app:cardBackgroundColor="@color/app_color"
app:cardCornerRadius="8dp">
app:cardCornerRadius="8dp"
android:layout_marginStart="@dimen/_15sdp"
>

<LinearLayout
android:layout_width="match_parent"
Expand All @@ -242,9 +269,10 @@
android:gravity="center">

<ImageView
android:id="@+id/fav_icon"
android:layout_width="@dimen/_14sdp"
android:layout_height="@dimen/_14sdp"
android:src="@drawable/baseline_share_24"
android:src="@drawable/fav"
app:tint="@color/white" />

</LinearLayout>
Expand Down

0 comments on commit dd401ad

Please sign in to comment.