-
Couldn't load subscription status.
- Fork 1
Upgrade to Java/Kotlin 17, add UI resources, and refactor code structure #913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -88,7 +88,7 @@ class LiveStreamFragment : BaseContentDetailFragment(), LiveStreamCallbackListen | |
| exoPlayerView = view!!.findViewById(R.id.exo_player_main_frame) | ||
| exoPlayerView.visibility = View.VISIBLE | ||
| exoPlayerView.setAspectRatio(16f / 9f) | ||
| exoPlayerView.findViewById<TextView>(R.id.exo_duration).visibility = View.GONE | ||
| //exoPlayerView.findViewById<TextView>(R.id.exo_duration).visibility = View.GONE | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| exoPlayerView.findViewById<RelativeLayout>(R.id.live_label).visibility = View.VISIBLE | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:shape="rectangle" > | ||
|
|
||
| <solid android:color="@color/testpress_text_gray_light" /> | ||
|
|
||
| <corners | ||
| android:bottomLeftRadius="100dp" | ||
| android:bottomRightRadius="0dp" | ||
| android:topLeftRadius="100dp" | ||
| android:topRightRadius="0dp" /> | ||
|
|
||
| </shape> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:shape="rectangle" > | ||
|
|
||
| <solid android:color="@color/testpress_difficulty_level_1" /> | ||
|
|
||
| <corners | ||
| android:bottomLeftRadius="100dp" | ||
| android:bottomRightRadius="0dp" | ||
| android:topLeftRadius="100dp" | ||
| android:topRightRadius="0dp" /> | ||
|
|
||
| </shape> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:shape="rectangle" > | ||
|
|
||
| <solid android:color="@color/testpress_text_gray_light" /> | ||
|
|
||
| <corners | ||
| android:bottomLeftRadius="0dp" | ||
| android:bottomRightRadius="100dp" | ||
| android:topLeftRadius="0dp" | ||
| android:topRightRadius="100dp" /> | ||
|
|
||
| </shape> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:shape="rectangle" > | ||
|
|
||
| <solid android:color="@color/testpress_difficulty_level_5" /> | ||
|
|
||
| <corners | ||
| android:bottomLeftRadius="0dp" | ||
| android:bottomRightRadius="100dp" | ||
| android:topLeftRadius="0dp" | ||
| android:topRightRadius="100dp" /> | ||
|
|
||
| </shape> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="match_parent"> | ||
|
|
||
| <com.facebook.shimmer.ShimmerFrameLayout | ||
| android:id="@+id/shimmer_view_container" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="match_parent" | ||
| android:visibility="gone" | ||
| app:shimmer_duration="1000"> | ||
|
|
||
| <LinearLayout | ||
| android:layout_width="match_parent" | ||
| android:layout_height="match_parent" | ||
| android:orientation="vertical" | ||
| > | ||
|
|
||
| <include | ||
| layout="@layout/testpress_list_placholder"> | ||
| </include> | ||
| <include | ||
| layout="@layout/testpress_list_placholder"> | ||
| </include> | ||
| <include | ||
| layout="@layout/testpress_list_placholder"> | ||
| </include> | ||
| <include | ||
| layout="@layout/testpress_list_placholder"> | ||
| </include> | ||
| <include | ||
| layout="@layout/testpress_list_placholder"> | ||
| </include> | ||
| <include | ||
| layout="@layout/testpress_list_placholder"> | ||
| </include> | ||
| <include | ||
| layout="@layout/testpress_list_placholder"> | ||
| </include> | ||
| <include | ||
| layout="@layout/testpress_list_placholder"> | ||
| </include> | ||
| <include | ||
| layout="@layout/testpress_list_placholder"> | ||
| </include> | ||
|
|
||
| </LinearLayout> | ||
| </com.facebook.shimmer.ShimmerFrameLayout> | ||
|
|
||
| <androidx.recyclerview.widget.RecyclerView | ||
| android:id="@+id/recycler_view" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="match_parent" /> | ||
|
|
||
| <FrameLayout | ||
| android:id="@+id/empty_view_fragment" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="match_parent" /> | ||
|
|
||
| </RelativeLayout> |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,167 @@ | ||||||||||||||||||||||||||||||||||||||||||
| <?xml version="1.0" encoding="utf-8"?> | ||||||||||||||||||||||||||||||||||||||||||
| <androidx.constraintlayout.widget.ConstraintLayout 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="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||
| android:paddingBottom="10dp" | ||||||||||||||||||||||||||||||||||||||||||
| tools:ignore="MissingDefaultResource"> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| <androidx.constraintlayout.widget.ConstraintLayout | ||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/container" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintEnd_toStartOf="@+id/info_conatainer" | ||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintStart_toStartOf="parent" | ||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintTop_toTopOf="parent"> | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+14
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo in id breaks Kotlin/Java bindings
- android:id="@+id/info_conatainer"
+ android:id="@+id/info_container"
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| <androidx.constraintlayout.widget.ConstraintLayout | ||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/thumbnailContainer" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="160dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="87dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_margin="10dp" | ||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintStart_toStartOf="parent" | ||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintTop_toTopOf="parent"> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| <androidx.cardview.widget.CardView | ||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/thumbnailImageContainer" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="155dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="87dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:visibility="visible" | ||||||||||||||||||||||||||||||||||||||||||
| app:cardCornerRadius="4dp" | ||||||||||||||||||||||||||||||||||||||||||
| app:cardElevation="0dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:paddingRight="10dp" | ||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintStart_toStartOf="parent" | ||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintTop_toTopOf="parent"> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| <FrameLayout | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||
| android:gravity="center"> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| <ImageView | ||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/thumbnail" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="155dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="87dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:adjustViewBounds="true" | ||||||||||||||||||||||||||||||||||||||||||
| android:background="#CAC8C8" /> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| <ImageView | ||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/content_type_icon" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="48dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="48dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_gravity="center_horizontal|center_vertical" | ||||||||||||||||||||||||||||||||||||||||||
| android:paddingBottom="10dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:visibility="visible" /> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| </FrameLayout> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| </androidx.cardview.widget.CardView> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| <LinearLayout | ||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/lock_container" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="36dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="36dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_alignParentEnd="true" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_alignParentRight="true" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginEnd="8dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginTop="4dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginRight="8dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:background="@drawable/testpress_round_gray_background" | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+61
to
+70
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Deprecated RTL-unaware margins
- android:layout_marginRight="8dp"
+ android:layout_marginEnd="8dp"(Apply to all instances in the file.) 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
| android:gravity="center" | ||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintEnd_toEndOf="parent" | ||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintTop_toTopOf="parent"> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| <ImageView | ||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/lock_image" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="16dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginLeft="10dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginTop="10dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginRight="10dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginBottom="10dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:scaleType="fitXY" | ||||||||||||||||||||||||||||||||||||||||||
| android:src="@drawable/testpress_lock_outline_white" /> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| </LinearLayout> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| </androidx.constraintlayout.widget.ConstraintLayout> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| <LinearLayout | ||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/attempted_tick_container" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="30dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="25dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:gravity="end|bottom" | ||||||||||||||||||||||||||||||||||||||||||
| android:visibility="gone" | ||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintEnd_toEndOf="parent" | ||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintTop_toTopOf="parent"> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| <ImageView | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="20dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="20dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:gravity="end|bottom" | ||||||||||||||||||||||||||||||||||||||||||
| android:background="@drawable/green_circle_background" | ||||||||||||||||||||||||||||||||||||||||||
| android:src="@drawable/ic_tick" /> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| </LinearLayout> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| </androidx.constraintlayout.widget.ConstraintLayout> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| <LinearLayout | ||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/info_conatainer" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="0dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginStart="8dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginTop="8dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginLeft="0dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:orientation="vertical" | ||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintEnd_toEndOf="parent" | ||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintStart_toEndOf="@+id/container" | ||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintTop_toTopOf="parent"> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| <TextView | ||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/title" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_gravity="center_vertical" | ||||||||||||||||||||||||||||||||||||||||||
| android:ellipsize="end" | ||||||||||||||||||||||||||||||||||||||||||
| android:maxLines="2" | ||||||||||||||||||||||||||||||||||||||||||
| android:text="Title goes here" | ||||||||||||||||||||||||||||||||||||||||||
| android:textColor="@color/testpress_black" | ||||||||||||||||||||||||||||||||||||||||||
| android:textSize="16sp" /> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| <LinearLayout | ||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/content_details_container" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginStart="8dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginTop="8dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_marginLeft="0dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:orientation="vertical" | ||||||||||||||||||||||||||||||||||||||||||
| android:visibility="visible" | ||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintEnd_toEndOf="parent" | ||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintStart_toEndOf="@+id/container" | ||||||||||||||||||||||||||||||||||||||||||
| app:layout_constraintTop_toTopOf="parent"> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| </LinearLayout> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| <LinearLayout | ||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/scheduled_info_container" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="match_parent" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||
| android:orientation="horizontal" | ||||||||||||||||||||||||||||||||||||||||||
| android:visibility="gone"> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| <TextView | ||||||||||||||||||||||||||||||||||||||||||
| android:id="@+id/scheduled_info" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_width="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||
| android:layout_height="wrap_content" | ||||||||||||||||||||||||||||||||||||||||||
| android:lineSpacingExtra="4dp" | ||||||||||||||||||||||||||||||||||||||||||
| android:maxLines="1" | ||||||||||||||||||||||||||||||||||||||||||
| android:text="" | ||||||||||||||||||||||||||||||||||||||||||
| android:textColor="@color/testpress_text_gray_medium" | ||||||||||||||||||||||||||||||||||||||||||
| android:textSize="12sp" /> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| </LinearLayout> | ||||||||||||||||||||||||||||||||||||||||||
| </LinearLayout> | ||||||||||||||||||||||||||||||||||||||||||
| </androidx.constraintlayout.widget.ConstraintLayout> | ||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kotlin 1.8.0 + JVM 17 is an invalid combination
jvmTarget = 17(andJavaVersion.VERSION_17) is only supported from Kotlin 1.9.0 (¹).With the project still pinned to
ext.kotlin_version = "1.8.0"the build will fail at compile time.Quick fixes:
or upgrade every module to Kotlin 1.9.x (and its matching Compose compiler).
(¹) see Kotlin release notes: https://kotlinlang.org/docs/whatsnew19.html#kotlin-jvm-target-17
📝 Committable suggestion
🤖 Prompt for AI Agents