Skip to content

Commit 7efc636

Browse files
authored
Merge pull request #2167 from Luna712/player-source-portrait
Add portrait mode layouts for dialogs in player
2 parents f321e98 + 8f41722 commit 7efc636

File tree

3 files changed

+446
-0
lines changed

3 files changed

+446
-0
lines changed
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:app="http://schemas.android.com/apk/res-auto"
5+
xmlns:tools="http://schemas.android.com/tools"
6+
android:layout_width="match_parent"
7+
android:layout_height="match_parent"
8+
android:orientation="vertical"
9+
android:padding="8dp">
10+
11+
<LinearLayout
12+
android:layout_width="match_parent"
13+
android:layout_height="0dp"
14+
android:layout_weight="1"
15+
android:orientation="vertical">
16+
17+
<LinearLayout
18+
android:id="@+id/sort_sources_holder"
19+
android:layout_width="match_parent"
20+
android:layout_height="0dp"
21+
android:layout_weight="1"
22+
android:layout_marginBottom="8dp"
23+
android:orientation="vertical">
24+
25+
<LinearLayout
26+
android:id="@+id/profiles_click_settings"
27+
android:layout_width="match_parent"
28+
android:layout_height="wrap_content"
29+
android:gravity="center_vertical"
30+
android:orientation="horizontal"
31+
android:padding="10dp">
32+
33+
<TextView
34+
android:layout_width="0dp"
35+
android:layout_height="wrap_content"
36+
android:layout_weight="1"
37+
android:text="@string/pick_source"
38+
android:textColor="?attr/textColor"
39+
android:textSize="20sp"
40+
android:textStyle="bold" />
41+
42+
<TextView
43+
android:id="@+id/source_settings_btt"
44+
android:layout_width="wrap_content"
45+
android:layout_height="wrap_content"
46+
android:gravity="center"
47+
android:minWidth="140dp"
48+
android:paddingHorizontal="10dp"
49+
android:textColor="?attr/textColor"
50+
android:textSize="15sp"
51+
app:drawableEndCompat="@drawable/ic_outline_settings_24"
52+
tools:text="@string/profile_number" />
53+
</LinearLayout>
54+
55+
<ListView
56+
android:id="@+id/sort_providers"
57+
android:layout_width="match_parent"
58+
android:layout_height="0dp"
59+
android:layout_weight="1"
60+
android:background="?attr/primaryBlackBackground"
61+
android:listSelector="@drawable/outline_drawable_forced"
62+
android:requiresFadingEdge="vertical"
63+
tools:listitem="@layout/sort_bottom_single_choice" />
64+
</LinearLayout>
65+
66+
<LinearLayout
67+
android:id="@+id/sort_subtitles_holder"
68+
android:layout_width="match_parent"
69+
android:layout_height="0dp"
70+
android:layout_weight="1"
71+
android:orientation="vertical">
72+
73+
<LinearLayout
74+
android:layout_width="match_parent"
75+
android:layout_height="wrap_content"
76+
android:orientation="horizontal"
77+
android:gravity="center_vertical"
78+
android:padding="10dp">
79+
80+
<LinearLayout
81+
android:layout_width="0dp"
82+
android:layout_height="wrap_content"
83+
android:layout_weight="1"
84+
android:orientation="horizontal"
85+
android:gravity="center_vertical">
86+
87+
<TextView
88+
android:id="@+id/subtitles_text"
89+
android:layout_width="wrap_content"
90+
android:layout_height="wrap_content"
91+
android:text="@string/pick_subtitle"
92+
android:textColor="?attr/textColor"
93+
android:textSize="20sp"
94+
android:textStyle="bold" />
95+
96+
<TextView
97+
android:id="@+id/subtitles_encoding_format"
98+
android:layout_width="wrap_content"
99+
android:layout_height="wrap_content"
100+
android:layout_marginStart="8dp"
101+
android:layout_marginTop="3dp"
102+
android:textColor="?attr/textColor"
103+
android:textSize="14sp"
104+
android:ellipsize="end"
105+
android:singleLine="true"
106+
tools:text="Thai (TIS 620-2533/ISO 8859-11)" />
107+
</LinearLayout>
108+
109+
<ImageView
110+
android:id="@+id/subtitle_settings_btt"
111+
android:layout_width="44dp"
112+
android:layout_height="44dp"
113+
android:contentDescription="@string/subtitles_settings"
114+
android:foreground="@drawable/outline_drawable_forced"
115+
android:padding="10dp"
116+
android:src="@drawable/ic_outline_settings_24" />
117+
</LinearLayout>
118+
119+
<LinearLayout
120+
android:layout_width="match_parent"
121+
android:layout_height="0dp"
122+
android:layout_weight="1"
123+
android:orientation="horizontal">
124+
125+
<ListView
126+
android:id="@+id/sort_subtitles"
127+
android:layout_width="0dp"
128+
android:layout_height="match_parent"
129+
android:layout_weight="1"
130+
android:background="?attr/primaryBlackBackground"
131+
android:listSelector="@drawable/outline_drawable_forced"
132+
android:requiresFadingEdge="vertical"
133+
tools:listitem="@layout/sort_bottom_single_choice" />
134+
135+
<ListView
136+
android:id="@+id/sort_subtitles_options"
137+
android:layout_width="0dp"
138+
android:layout_height="match_parent"
139+
android:layout_weight="1"
140+
android:background="?attr/primaryBlackBackground"
141+
android:listSelector="@drawable/outline_drawable_forced"
142+
android:requiresFadingEdge="vertical"
143+
tools:listitem="@layout/sort_bottom_single_choice" />
144+
</LinearLayout>
145+
</LinearLayout>
146+
</LinearLayout>
147+
148+
<LinearLayout
149+
android:id="@+id/apply_btt_holder"
150+
android:layout_width="match_parent"
151+
android:layout_height="wrap_content"
152+
android:gravity="end|center_vertical"
153+
android:padding="8dp"
154+
android:orientation="horizontal">
155+
156+
<com.google.android.material.button.MaterialButton
157+
android:id="@+id/apply_btt"
158+
android:layout_width="0dp"
159+
android:layout_weight="1"
160+
android:text="@string/sort_apply"
161+
style="@style/WhiteButton" />
162+
163+
<com.google.android.material.button.MaterialButton
164+
android:id="@+id/cancel_btt"
165+
android:layout_width="0dp"
166+
android:layout_weight="1"
167+
android:text="@string/sort_cancel"
168+
style="@style/BlackButton" />
169+
</LinearLayout>
170+
</LinearLayout>
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:app="http://schemas.android.com/apk/res-auto"
5+
xmlns:tools="http://schemas.android.com/tools"
6+
android:layout_width="match_parent"
7+
android:layout_height="match_parent"
8+
android:orientation="vertical">
9+
10+
<LinearLayout
11+
android:id="@+id/sort_sources_holder"
12+
android:layout_width="match_parent"
13+
android:layout_height="0dp"
14+
android:layout_weight="1"
15+
android:orientation="vertical"
16+
android:paddingBottom="8dp">
17+
18+
<LinearLayout
19+
android:id="@+id/subtitles_click_settings"
20+
android:layout_width="match_parent"
21+
android:layout_height="wrap_content"
22+
android:orientation="horizontal"
23+
android:gravity="center_vertical"
24+
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
25+
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
26+
27+
<TextView
28+
android:layout_width="0dp"
29+
android:layout_height="wrap_content"
30+
android:layout_weight="1"
31+
android:text="@string/pick_source"
32+
android:textColor="?attr/textColor"
33+
android:textSize="20sp"
34+
android:textStyle="bold" />
35+
36+
<ImageView
37+
android:id="@+id/help_btt"
38+
android:layout_width="44dp"
39+
android:layout_height="44dp"
40+
android:background="?attr/selectableItemBackgroundBorderless"
41+
android:padding="10dp"
42+
android:src="@drawable/baseline_help_outline_24"
43+
android:contentDescription="@string/help" />
44+
</LinearLayout>
45+
46+
<androidx.recyclerview.widget.RecyclerView
47+
android:id="@+id/sort_sources"
48+
android:layout_width="match_parent"
49+
android:layout_height="0dp"
50+
android:layout_weight="1"
51+
android:background="?attr/primaryBlackBackground"
52+
android:requiresFadingEdge="vertical"
53+
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
54+
tools:layout_height="200dp"
55+
tools:listitem="@layout/player_prioritize_item" />
56+
</LinearLayout>
57+
58+
<LinearLayout
59+
android:id="@+id/sort_subtitles_holder"
60+
android:layout_width="match_parent"
61+
android:layout_height="0dp"
62+
android:layout_weight="1"
63+
android:orientation="vertical"
64+
android:paddingBottom="8dp">
65+
66+
<TextView
67+
android:layout_width="wrap_content"
68+
android:layout_height="wrap_content"
69+
android:layout_marginTop="10dp"
70+
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
71+
android:paddingTop="10dp"
72+
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
73+
android:paddingBottom="10dp"
74+
android:text="@string/qualities"
75+
android:textColor="?attr/textColor"
76+
android:textSize="20sp"
77+
android:textStyle="bold" />
78+
79+
<androidx.recyclerview.widget.RecyclerView
80+
android:id="@+id/sort_qualities"
81+
android:layout_width="match_parent"
82+
android:layout_height="0dp"
83+
android:layout_weight="1"
84+
android:background="?attr/primaryBlackBackground"
85+
android:requiresFadingEdge="vertical"
86+
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
87+
tools:layout_height="200dp"
88+
tools:listfooter="@layout/sort_bottom_footer_add_choice"
89+
tools:listitem="@layout/player_prioritize_item" />
90+
</LinearLayout>
91+
92+
<LinearLayout
93+
android:id="@+id/apply_btt_holder"
94+
android:layout_width="match_parent"
95+
android:layout_height="60dp"
96+
android:orientation="horizontal"
97+
android:gravity="center_vertical"
98+
android:paddingHorizontal="?android:attr/listPreferredItemPaddingStart">
99+
100+
<EditText
101+
android:id="@+id/profile_text_editable"
102+
android:layout_width="0dp"
103+
android:layout_height="wrap_content"
104+
android:layout_weight="1"
105+
android:inputType="text"
106+
android:maxLength="32"
107+
android:textColor="?attr/textColor"
108+
android:textSize="20sp"
109+
android:textStyle="bold"
110+
android:autofillHints="username"
111+
tools:text="@string/profile_number" />
112+
113+
<com.google.android.material.button.MaterialButton
114+
android:id="@+id/save_btt"
115+
android:layout_width="wrap_content"
116+
android:text="@string/sort_save"
117+
style="@style/WhiteButton" />
118+
119+
<com.google.android.material.button.MaterialButton
120+
android:id="@+id/close_btt"
121+
android:layout_width="wrap_content"
122+
android:text="@string/sort_close"
123+
style="@style/BlackButton" />
124+
</LinearLayout>
125+
</LinearLayout>

0 commit comments

Comments
 (0)