Skip to content

Commit 521e917

Browse files
committed
optimize remote settings on mobile
1 parent 763eeda commit 521e917

File tree

5 files changed

+25
-3
lines changed

5 files changed

+25
-3
lines changed

HISTORY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## 更新日誌
22

3-
### v1.3.9.1
3+
### v1.3.9.2
44

55
* 優化手機上遠程配置
66

app/src/main/java/com/lizongying/mytv0/MainActivity.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,15 @@ class MainActivity : AppCompatActivity() {
650650
RelativeLayout.LayoutParams.MATCH_PARENT
651651
)
652652

653-
popupWindow.showAtLocation(this.window.decorView, Gravity.CENTER, 0, 0)
653+
popupWindow.inputMethodMode = PopupWindow.INPUT_METHOD_NEEDED
654+
popupWindow.isFocusable = true
655+
popupWindow.isTouchable = true
656+
657+
popupWindow.isClippingEnabled = false
658+
659+
popupWindow.showAtLocation(window.decorView, Gravity.CENTER, 0, 0)
660+
661+
webView.requestFocus()
654662

655663
binding.close.setOnClickListener {
656664
popupWindow.dismiss()

app/src/main/res/layout/settings_web.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
android:layout_height="50dp"
1313
android:padding="10dp"
1414
android:text="X"
15+
android:textColor="@color/title_blur"
16+
android:background="@android:color/transparent"
1517
app:layout_constraintEnd_toEndOf="parent"
1618
app:layout_constraintTop_toTopOf="parent" />
1719

app/src/main/res/raw/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ <h4>視頻源可以设置為地址/文本/文件其中之一</h4>
157157
</div>
158158

159159
<hr/>
160+
161+
<div style="height: 100%"></div>
160162
</body>
161163
<script>
162164
const lang = {
@@ -225,6 +227,16 @@ <h4>視頻源可以设置為地址/文本/文件其中之一</h4>
225227
reader.readAsText(file);
226228
}
227229

230+
['#uri', '#plain-text', '#channel', '#epg', '#proxy'].forEach(e => {
231+
const ele = document.querySelector(e);
232+
ele.addEventListener('focus', function() {
233+
ele.scrollIntoView({
234+
behavior: 'smooth',
235+
block: 'start'
236+
});
237+
});
238+
})
239+
228240
document.querySelector('#confirm-uri').onclick = () => {
229241
let uri = document.querySelector('#uri').value.trim();
230242
if (!uri) {

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version_code": 16976129, "version_name": "v1.3.9.1"}
1+
{"version_code": 16976130, "version_name": "v1.3.9.2"}

0 commit comments

Comments
 (0)