Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/button_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?attr/colorControlHighlight">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/button_primary" />
<corners android:radius="@dimen/radius_medium" />
</shape>
</item>
</ripple>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/circle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="oval" xmlns:android="http://schemas.android.com/apk/res/android">

<solid android:color="@color/additional_secondary_red"/>
</shape>
26 changes: 26 additions & 0 deletions app/src/main/res/drawable/due_tone_station.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"
android:viewportWidth="24"
android:viewportHeight="24"
android:width="24dp"
android:height="24dp">
<path
android:pathData="M10.8325 10.6241C10.3283 10.261 9.99997 9.66883 9.99997 9C9.99997 7.89543 10.8954 7 12 7C13.1045 7 14 7.89543 14 9C14 9.66883 13.6717 10.261 13.1674 10.6241L16.7147 21.7726C16.8231 22.1134 16.6759 22.4833 16.3629 22.6563C16.05 22.8294 15.6584 22.7574 15.4274 22.4845L12 18.4338L8.57251 22.4845C8.34152 22.7574 7.94994 22.8294 7.63701 22.6563C7.32408 22.4833 7.17685 22.1134 7.28527 21.7726L10.8325 10.6241ZM12.9824 17.2727L14.1465 18.6485L13.5103 16.6489L12.9824 17.2727ZM12.9745 14.9648C12.9582 14.9809 12.9425 14.9978 12.9274 15.0155L12 16.1116L11.0725 15.0155C11.0575 14.9978 11.0418 14.9809 11.0255 14.9648L12 11.9022L12.9745 14.9648ZM10.4896 16.6489L11.0175 17.2727L9.85342 18.6485L10.4896 16.6489Z"
android:fillType="evenOdd"
android:fillColor="#313131" />
<path
android:pathData="M5.46583 2.53086C5.75902 2.23826 5.75949 1.76338 5.46689 1.4702C5.17429 1.17701 4.69941 1.17654 4.40623 1.46914C2.45721 3.41428 1.25 6.10595 1.25 9.07816C1.25 12.0852 2.48564 14.805 4.47497 16.7552C4.77076 17.0451 5.24561 17.0404 5.53557 16.7446C5.82554 16.4488 5.82082 15.974 5.52503 15.684C3.81163 14.0043 2.75 11.6659 2.75 9.07816C2.75 6.5203 3.78722 4.20612 5.46583 2.53086Z"
android:fillColor="#313131"
android:fillAlpha="0.4" />
<path
android:pathData="M19.677 1.55312C19.387 1.25733 18.9122 1.25262 18.6164 1.54258C18.3206 1.83255 18.3159 2.3074 18.6059 2.60319C20.2422 4.27243 21.25 6.55686 21.25 9.07816C21.25 11.6293 20.2182 13.9381 18.5473 15.6123C18.2547 15.9055 18.2552 16.3804 18.5484 16.673C18.8415 16.9656 19.3164 16.9651 19.609 16.6719C21.5491 14.728 22.75 12.0426 22.75 9.07816C22.75 6.14855 21.5771 3.49139 19.677 1.55312Z"
android:fillColor="#313131"
android:fillAlpha="0.4" />
<path
android:pathData="M8.27408 5.62574C8.57652 5.34272 8.59226 4.86811 8.30923 4.56567C8.02621 4.26323 7.5516 4.24749 7.24916 4.53051C6.02148 5.67937 5.25 7.28109 5.25 9.06033C5.25 10.8605 6.03967 12.4787 7.29244 13.6303C7.59739 13.9106 8.07185 13.8906 8.35216 13.5857C8.63248 13.2807 8.61251 12.8063 8.30756 12.526C7.33869 11.6354 6.75 10.4078 6.75 9.06033C6.75 7.72833 7.32517 6.51373 8.27408 5.62574Z"
android:fillColor="#313131"
android:fillAlpha="0.7" />
<path
android:pathData="M16.8033 4.58011C16.5039 4.2938 16.0292 4.30436 15.7429 4.60369C15.4566 4.90302 15.4671 5.37778 15.7664 5.66409C16.6911 6.54855 17.25 7.74727 17.25 9.06033C17.25 10.3889 16.6778 11.6006 15.7333 12.488C15.4315 12.7716 15.4167 13.2462 15.7003 13.5481C15.9839 13.85 16.4586 13.8648 16.7604 13.5811C17.9825 12.4329 18.75 10.8349 18.75 9.06033C18.75 7.30668 18.0005 5.72524 16.8033 4.58011Z"
android:fillColor="#313131"
android:fillAlpha="0.7" />
</vector>
30 changes: 30 additions & 0 deletions app/src/main/res/drawable/gradiant_progressbar.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

<item android:id="@android:id/background">
<shape
android:shape="ring"
android:thicknessRatio="10"
android:useLevel="false">
<solid android:color="#CCCCCC" />
</shape>
</item>
<item android:id="@android:id/progress">
<rotate
android:fromDegrees="270"
android:pivotX="50%"
android:pivotY="50%"
android:toDegrees="270">
<shape
android:shape="ring"
android:thicknessRatio="10"
android:useLevel="true">
<gradient
android:startColor="#FF0000"
android:endColor="#0000FF"
android:angle="0"
android:type="sweep" />
</shape>
</rotate>
</item>
</layer-list>
46 changes: 26 additions & 20 deletions app/src/main/res/layout/error2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,59 +17,65 @@
android:layout_width="match_parent"
android:layout_height="match_parent">

<com.airbnb.lottie.LottieAnimationView
android:id="@+id/animation_lost_connection"
android:layout_width="128dp"
android:layout_height="128dp"
android:layout_marginBottom="@dimen/spacing_small"
app:layout_constraintBottom_toTopOf="@+id/title_lost_connection"
<ImageView
android:id="@+id/lost_connection_img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/spacing_medium"
android:background="@drawable/circle"
android:padding="18dp"
android:src="@drawable/due_tone_station"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"

app:layout_constraintStart_toStartOf="parent"
app:lottie_autoPlay="true"
app:lottie_rawRes="@raw/lost_internet_animation" />
app:layout_constraintTop_toTopOf="parent"
app:tint="@color/additional_primary_red" />

<TextView
android:id="@+id/title_lost_connection"
style="@style/SemiBold.Large"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_extra_large"
android:layout_marginTop="@dimen/spacing_medium"
android:text="@string/oops"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toBottomOf="@id/lost_connection_img"
/>

<TextView
android:id="@+id/description_lost_connection"
style="@style/Regular.Medium"
android:layout_width="wrap_content"
android:layout_width="240dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_medium"
android:layout_marginTop="@dimen/spacing_small"
android:gravity="center"
android:text="@string/description"
android:textColor="@color/brand_primary"
android:text="@string/offline_reconnect"
android:textColor="@color/shade_secondary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/title_lost_connection" />

<Button
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The button radius is not correct, it should be 10.dp, and I think it's a squircle shape

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I double check this, I think it's correct you can see this line is using radius medium which is 10.dp

android:background="@drawable/button_background"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I think the problem is that it's a squircle shape

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes you're right I'm working to extend the style of the button in order to match the design

android:id="@+id/button_retry"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_medium"
android:layout_marginTop="@dimen/spacing_large"
android:background="@drawable/button_background"
android:onClick="@{() -> viewModel.getData()}"
android:text="@string/retry"
android:textAllCaps="false"
android:textColor="@color/white_primary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="@+id/description_lost_connection"
app:layout_constraintStart_toStartOf="@+id/description_lost_connection"
app:layout_constraintTop_toBottomOf="@+id/description_lost_connection" />


<androidx.constraintlayout.widget.Group
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="title_lost_connection,animation_lost_connection,description_lost_connection,button_retry"
app:constraint_referenced_ids="title_lost_connection,lost_connection_img,description_lost_connection,button_retry"
app:isVisible="@{isError}" />


Expand Down
6 changes: 4 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<string name="biography">Biography</string>
<string name="movies">Movies</string>
<string name="actors">Actors</string>
<string name="oops">Oops!</string>
<string name="oops">Oops! No Internet</string>
<string name="description">There is no internet connection\nPlease check it out</string>
<string name="all_movies_of_actor">All Movies Of Actor</string>
<!-- Titles -->
Expand Down Expand Up @@ -87,7 +87,7 @@
<string name="one_season">%1$d Season</string>
<string name="more_than_one_season">%1$d Seasons</string>
<string name="internet_connection">There is no internet connection.</string>
<string name="retry">Retry</string>
<string name="retry">Try Again</string>
<string name="you_must_be_logged_in_to_see_the_profile">You must be logged in to see the profile and use additional features.</string>
<string name="new_list">New List</string>
<string name="log_in">Log In</string>
Expand All @@ -102,7 +102,9 @@
<string name="this_list_has_no_lists">No lists found</string>
<string name="episode_title">%1$d. %2$s</string>
<string name="season_number">(%1$s Seasons)</string>
<string name="offline_reconnect">Looks like you\'re offline. Let\'s reconnect so you don\'t miss out!</string>
<string name="no_history_yet">No History Yet</string>
<string name="no_history_description">It’s quiet in here… Start watching and we’ll keep track for you.</string>
<string name="watch_something">Find Something to Watch</string>

</resources>