Conversation
Deploying kvideo with
|
| Latest commit: |
eb72a36
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://842662ab.kvideo.pages.dev |
| Branch Preview URL: | https://codex-issue-129-android-tv-a.kvideo.pages.dev |
There was a problem hiding this comment.
Code Review
This pull request introduces a dynamic configuration system for the Android TV WebView application, replacing the hardcoded server URL with a user-configurable setup screen. Key updates include increasing the minSdk to 26, adding SharedPreferences for URL persistence, and providing a new setup UI. The README.md has been updated to reflect these changes, including a new Gradle property for pre-configuring the URL. Review feedback highlights opportunities to improve the Android TV user experience by handling IME actions, adopting the modern OnBackPressedDispatcher API, and correcting an unsupported layout attribute.
| saveButton.setOnClickListener { | ||
| openConfiguredUrl() | ||
| } |
There was a problem hiding this comment.
The 'url_input' EditText has 'android:imeOptions="actionDone"' in the layout, but there is no listener to handle the 'Done' action from the on-screen keyboard. Adding an 'OnEditorActionListener' would allow users to submit the URL directly from the keyboard, which significantly improves the user experience on Android TV.
saveButton.setOnClickListener {
openConfiguredUrl()
}
urlInput.setOnEditorActionListener { _, actionId, _ ->
if (actionId == android.view.inputmethod.EditorInfo.IME_ACTION_DONE) {
openConfiguredUrl()
true
} else {
false
}
}| override fun onBackPressed() { | ||
| if (isSetupVisible()) { | ||
| @Suppress("DEPRECATION") | ||
| super.onBackPressed() | ||
| return | ||
| } | ||
|
|
||
| if (webView.canGoBack()) { | ||
| webView.goBack() | ||
| } else { | ||
| @Suppress("DEPRECATION") | ||
| super.onBackPressed() | ||
| showSetup(getString(R.string.status_settings_hint)) | ||
| } | ||
| } |
There was a problem hiding this comment.
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" | ||
| android:background="#F31A1C22" | ||
| android:elevation="12dp" | ||
| android:maxWidth="680dp" | ||
| android:orientation="vertical" | ||
| android:padding="32dp"> |
There was a problem hiding this comment.
The 'android:maxWidth' attribute is not supported by 'LinearLayout' and will be ignored. On large TV screens, the setup dialog will stretch to the full width of the screen, which may result in a poor user experience. To limit the width, you can set a fixed 'android:layout_width' (e.g., '680dp') and rely on the parent's 'gravity="center"' to keep it centered.
| android:layout_width="match_parent" | |
| android:layout_height="wrap_content" | |
| android:background="#F31A1C22" | |
| android:elevation="12dp" | |
| android:maxWidth="680dp" | |
| android:orientation="vertical" | |
| android:padding="32dp"> | |
| android:layout_width="680dp" | |
| android:layout_height="wrap_content" | |
| android:background="#F31A1C22" | |
| android:elevation="12dp" | |
| android:orientation="vertical" | |
| android:padding="32dp"> |
Deploying kuekhaoyang with
|
| Latest commit: |
eb72a36
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://748f586a.kuekhaoyang.pages.dev |
| Branch Preview URL: | https://codex-issue-129-android-tv-a.kuekhaoyang.pages.dev |
Summary
Root cause
The repository already contained an Android TV wrapper, but it hardcoded a placeholder URL and did not ship a complete Gradle wrapper or a GitHub-side delivery path. In practice that meant users still had to edit source code and compile locally.
Validation
Closes #129