-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented search feature in search fragment
- Loading branch information
Showing
8 changed files
with
181 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 0 additions & 65 deletions
65
app/src/main/java/com/example/moviemate/adapter/WatchlistMovieAdapter.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:shape="rectangle"> | ||
<corners android:radius="64dp" /> <!-- Adjust the radius to your preference --> | ||
<solid android:color="@color/fg_dark" /> <!-- Background color --> | ||
</shape> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,71 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
|
||
|
||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".fragments.SearchFragment"> | ||
android:background="@color/black" | ||
android:fillViewport="true"> | ||
|
||
<!-- TODO: Update blank fragment layout --> | ||
<TextView | ||
<RelativeLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:text="@string/hello_blank_fragment" /> | ||
android:layout_height="wrap_content" | ||
android:paddingBottom="64dp" | ||
tools:context=".fragments.SearchFragment"> | ||
|
||
<LinearLayout | ||
android:id="@+id/searchFragRootLayout" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="vertical" | ||
android:paddingTop="8dp" | ||
android:paddingBottom="16dp"> | ||
|
||
<TextView | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginHorizontal="16dp" | ||
android:layout_marginVertical="16dp" | ||
android:fontFamily="@font/montserrat_bold" | ||
android:text="@string/search" | ||
android:textColor="@color/white" | ||
android:textSize="24sp" /> | ||
|
||
|
||
<android.widget.SearchView | ||
android:id="@+id/searchBarNew" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_marginHorizontal="8dp" | ||
android:layout_marginVertical="8dp" | ||
android:background="@drawable/rounded_corner_search_view" | ||
android:iconifiedByDefault="false" | ||
android:queryBackground="@android:color/transparent" | ||
android:queryHint="Search for a movie" | ||
android:textColorHint="@color/white" /> | ||
|
||
<androidx.recyclerview.widget.RecyclerView | ||
android:id="@+id/rvSearchFragment" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center" | ||
android:gravity="center" | ||
android:orientation="vertical" | ||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" | ||
app:spanCount="3" | ||
tools:listitem="@layout/card_movie" /> | ||
</LinearLayout> | ||
|
||
</FrameLayout> | ||
<com.google.android.material.progressindicator.CircularProgressIndicator | ||
android:id="@+id/cpiSearch" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_centerInParent="true" | ||
android:indeterminate="true" | ||
android:visibility="gone" | ||
app:indicatorColor="@color/primary" | ||
app:trackColor="@color/white" /> | ||
</RelativeLayout> | ||
</ScrollView> |