Skip to content

Commit f94c70a

Browse files
author
MoreOrLessSoftware
committed
Separate landscape/portrait views for the overrides section
1 parent 3a1e615 commit f94c70a

File tree

2 files changed

+108
-11
lines changed

2 files changed

+108
-11
lines changed
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Overrides Section Layout - Landscape -->
3+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:seekbar="http://schemas.moonlight-stream.com/apk/res/seekbar"
5+
android:id="@+id/overridesSection"
6+
android:layout_width="match_parent"
7+
android:layout_height="wrap_content"
8+
android:orientation="vertical"
9+
android:padding="12dp"
10+
android:background="?android:attr/selectableItemBackground">
11+
12+
<TextView
13+
android:id="@+id/overridesSectionTitle"
14+
android:layout_width="wrap_content"
15+
android:layout_height="wrap_content"
16+
android:text="@string/overrides_section_title"
17+
android:textAppearance="?android:attr/textAppearanceMedium"
18+
android:textStyle="bold"
19+
android:layout_marginBottom="8dp" />
20+
21+
<!-- Overrides Controls - Horizontal for landscape -->
22+
<LinearLayout
23+
android:layout_width="match_parent"
24+
android:layout_height="wrap_content"
25+
android:orientation="horizontal"
26+
android:gravity="center_vertical">
27+
28+
<!-- Stats Overlay Button -->
29+
<LinearLayout
30+
android:id="@+id/perfOverlayButton"
31+
android:layout_width="wrap_content"
32+
android:layout_height="wrap_content"
33+
android:minHeight="44dp"
34+
android:orientation="horizontal"
35+
android:gravity="center_vertical"
36+
android:padding="6dp"
37+
android:clickable="true"
38+
android:focusable="true"
39+
android:background="@drawable/button_border_rounded"
40+
android:layout_marginEnd="16dp">
41+
42+
<ImageView
43+
android:id="@+id/perfOverlayIcon"
44+
android:layout_width="28dp"
45+
android:layout_height="28dp"
46+
android:src="@drawable/ic_perf_overlay_default"
47+
android:contentDescription="Performance Overlay Override" />
48+
49+
<TextView
50+
android:id="@+id/perfOverlayLabel"
51+
android:layout_width="160dp"
52+
android:layout_height="wrap_content"
53+
android:text="Stats overlay: Default"
54+
android:textSize="13sp"
55+
android:singleLine="true"
56+
android:ellipsize="end"
57+
android:layout_marginStart="8dp" />
58+
59+
</LinearLayout>
60+
61+
<!-- Bitrate Override -->
62+
<LinearLayout
63+
android:layout_width="wrap_content"
64+
android:layout_height="wrap_content"
65+
android:maxWidth="600dp"
66+
android:minHeight="44dp"
67+
android:orientation="horizontal"
68+
android:gravity="center_vertical"
69+
android:padding="6dp"
70+
android:paddingEnd="20dp"
71+
android:background="@drawable/button_border_rounded">
72+
73+
<TextView
74+
android:id="@+id/bitrateOverrideValue"
75+
android:layout_width="wrap_content"
76+
android:layout_height="wrap_content"
77+
android:text="@string/bitrate_use_default"
78+
android:textSize="13sp"
79+
android:minWidth="130dp"
80+
android:focusable="true"
81+
android:clickable="true"
82+
android:padding="2dp"
83+
android:background="@drawable/text_focus_selector" />
84+
85+
<SeekBar
86+
android:id="@+id/bitrateOverrideSeekBar"
87+
android:minWidth="200dp"
88+
android:layout_width="0dp"
89+
android:layout_height="wrap_content"
90+
android:layout_weight="1"
91+
android:max="40"
92+
android:progress="0" />
93+
94+
</LinearLayout>
95+
96+
<!-- Spacer to absorb extra space -->
97+
<View
98+
android:layout_width="0dp"
99+
android:layout_height="1dp"
100+
android:layout_weight="1" />
101+
102+
</LinearLayout>
103+
104+
</LinearLayout>

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

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- Overrides Section Layout -->
2+
<!-- Overrides Section Layout - Portrait -->
33
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
44
xmlns:seekbar="http://schemas.moonlight-stream.com/apk/res/seekbar"
55
android:id="@+id/overridesSection"
@@ -18,12 +18,11 @@
1818
android:textStyle="bold"
1919
android:layout_marginBottom="8dp" />
2020

21-
<!-- Overrides Controls -->
21+
<!-- Overrides Controls - Vertical stack for portrait -->
2222
<LinearLayout
2323
android:layout_width="match_parent"
2424
android:layout_height="wrap_content"
25-
android:orientation="horizontal"
26-
android:gravity="center_vertical">
25+
android:orientation="vertical">
2726

2827
<!-- Stats Overlay Button -->
2928
<LinearLayout
@@ -37,7 +36,7 @@
3736
android:clickable="true"
3837
android:focusable="true"
3938
android:background="@drawable/button_border_rounded"
40-
android:layout_marginEnd="16dp">
39+
android:layout_marginBottom="8dp">
4140

4241
<ImageView
4342
android:id="@+id/perfOverlayIcon"
@@ -93,12 +92,6 @@
9392

9493
</LinearLayout>
9594

96-
<!-- Spacer to absorb extra space -->
97-
<View
98-
android:layout_width="0dp"
99-
android:layout_height="1dp"
100-
android:layout_weight="1" />
101-
10295
</LinearLayout>
10396

10497
</LinearLayout>

0 commit comments

Comments
 (0)