feat: reviews
This commit is contained in:
parent
831b99ae40
commit
a0fabd3ca6
16 changed files with 642 additions and 34 deletions
12
app/src/main/res/drawable/ic_thumbs.xml
Normal file
12
app/src/main/res/drawable/ic_thumbs.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M7.24,11V20H5.63C4.73,20 4.01,19.28 4.01,18.39V12.62C4.01,11.73 4.74,11 5.63,11H7.24ZM18.5,9.5H13.72V6C13.72,4.9 12.82,4 11.73,4H11.64C11.24,4 10.88,4.24 10.72,4.61L7.99,11V20H17.19C17.92,20 18.54,19.48 18.67,18.76L19.99,11.26C20.15,10.34 19.45,9.5 18.51,9.5H18.5Z" />
|
||||
|
||||
</vector>
|
5
app/src/main/res/drawable/surface_rounded_bg.xml
Normal file
5
app/src/main/res/drawable/surface_rounded_bg.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="?attr/colorSurfaceVariant" />
|
||||
<corners android:radius="16dp" />
|
||||
</shape>
|
155
app/src/main/res/layout/activity_review_view.xml
Normal file
155
app/src/main/res/layout/activity_review_view.xml
Normal file
|
@ -0,0 +1,155 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView 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">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/reviewContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/userContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/userAvatarContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:layout_margin="12dp"
|
||||
android:backgroundTint="@color/transparent"
|
||||
app:cardCornerRadius="64dp"
|
||||
app:strokeColor="@color/transparent">
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/userAvatar"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_gravity="center"
|
||||
app:srcCompat="@drawable/ic_round_add_circle_24"
|
||||
tools:ignore="ContentDescription,ImageContrastCheck"
|
||||
tools:tint="@color/bg_black_50" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/userName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:paddingTop="1dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:singleLine="true"
|
||||
android:text="Username"
|
||||
android:textColor="@color/bg_opp"
|
||||
android:textSize="18sp"
|
||||
tools:ignore="HardcodedText,RtlSymmetry" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:alpha="0.6"
|
||||
android:fontFamily="@font/poppins_semi_bold"
|
||||
android:text="•"
|
||||
android:textSize="18sp"
|
||||
tools:ignore="HardcodedText,RtlSymmetry" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/userTime"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_weight="1"
|
||||
android:alpha="0.6"
|
||||
android:fontFamily="@font/poppins_semi_bold"
|
||||
android:text="Time"
|
||||
android:textSize="14sp"
|
||||
tools:ignore="HardcodedText,RtlSymmetry" />
|
||||
</LinearLayout>
|
||||
|
||||
<WebView
|
||||
android:id="@+id/profileUserBio"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:ellipsize="end"
|
||||
android:nestedScrollingEnabled="true"
|
||||
android:padding="16dp"
|
||||
android:textAlignment="textStart"
|
||||
tools:text="@string/slogan" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/reviewContent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_marginBottom="32dp"
|
||||
android:background="@drawable/surface_rounded_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/downvote"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:scaleX="-1"
|
||||
android:scaleY="-1"
|
||||
android:src="@drawable/ic_thumbs"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/voteCount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:fontFamily="@font/poppins_semi_bold"
|
||||
android:text="0"
|
||||
android:textSize="18sp"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/upvote"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/ic_thumbs"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/voteText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="8dp"
|
||||
android:fontFamily="@font/poppins_semi_bold"
|
||||
android:text="@string/vote_out_of_total"
|
||||
android:textSize="14sp"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
|
@ -52,14 +52,34 @@
|
|||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/profileUserName"
|
||||
<LinearLayout
|
||||
android:id="@+id/profileUserInfoContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:layout_marginStart="120dp"
|
||||
android:fontFamily="@font/poppins_semi_bold"
|
||||
android:text="@string/username"
|
||||
android:textSize="18sp" />
|
||||
android:layout_marginStart="100dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/profileUserName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/poppins_semi_bold"
|
||||
android:text="@string/username"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/altText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/poppins_semi_bold"
|
||||
android:maxLines="2"
|
||||
android:text="@string/lorem_ipsum"
|
||||
android:textSize="14sp"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</FrameLayout>
|
|
@ -50,7 +50,7 @@
|
|||
android:gravity="center"
|
||||
android:maxLines="2"
|
||||
android:padding="4dp"
|
||||
android:text="@string/search"
|
||||
android:text="@string/reviews"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/bg_white"
|
||||
android:textSize="14sp" />
|
||||
|
|
|
@ -430,7 +430,7 @@
|
|||
<string name="error_message">Error: %1$s</string>
|
||||
<string name="install_step">Step: %1$s</string>
|
||||
<string name="review">Review</string>
|
||||
|
||||
<string name="reviews">Reviews</string>
|
||||
<string name="discord_nothing_button">Display only the first button</string>
|
||||
<string name="discord_dantotsu_button">Display dantotsu in the second button</string>
|
||||
<string name="discord_anilist_button">Display your AniList profile instead</string>
|
||||
|
@ -850,8 +850,6 @@ Non quae tempore quo provident laudantium qui illo dolor vel quia dolor et exerc
|
|||
<string name="do_it">Do it!</string>
|
||||
<string name="password">Password</string>
|
||||
|
||||
<string name="search_title">Search %1$s</string>
|
||||
|
||||
<string name="profile_stats_widget">Track progress directly from your home screen</string>
|
||||
<string name="anime_watched">Anime\nWatched</string>
|
||||
<string name="manga_read">Manga\nRead</string>
|
||||
|
@ -981,4 +979,5 @@ Non quae tempore quo provident laudantium qui illo dolor vel quia dolor et exerc
|
|||
<string name="download_subtitle">Download Subtitle</string>
|
||||
<string name="no_video_selected">No video selected</string>
|
||||
<string name="no_subtitles_available">No subtitles available</string>
|
||||
<string name="vote_out_of_total">(%1$s out of %2$s liked this review)</string>
|
||||
</resources>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue