Skip to content

Commit f6e6cb7

Browse files
committed
tts: wrap toolbar in a transparent fullscreen overlay
1 parent 8608eef commit f6e6cb7

2 files changed

Lines changed: 24 additions & 9 deletions

File tree

android/res/layout/tts_toolbar.xml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- Layout for TTS dialog -->
3-
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
4-
android:id="@+id/tts_toolbar_body"
3+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
54
android:layout_width="fill_parent"
6-
android:layout_height="wrap_content"
7-
android:layout_marginTop="3dip"
8-
android:layout_marginBottom="3dip"
9-
android:background="?attr/tts_toolbar_background"
10-
android:baselineAligned="true"
11-
android:orientation="vertical">
5+
android:layout_height="fill_parent">
6+
7+
<LinearLayout
8+
android:id="@+id/tts_glass_panel"
9+
android:orientation="vertical"
10+
android:layout_width="fill_parent"
11+
android:layout_height="fill_parent"
12+
android:background="#00000000"
13+
android:gravity="top">
14+
</LinearLayout>
15+
16+
<LinearLayout
17+
android:id="@+id/tts_toolbar_body"
18+
android:layout_width="fill_parent"
19+
android:layout_height="wrap_content"
20+
android:layout_alignParentBottom="true"
21+
android:layout_marginTop="3dip"
22+
android:layout_marginBottom="3dip"
23+
android:background="?attr/tts_toolbar_background"
24+
android:baselineAligned="true"
25+
android:orientation="vertical">
1226

1327
<LinearLayout
1428
android:id="@+id/tts_toolbar_buttons"
@@ -189,3 +203,4 @@
189203
android:layout_weight="1" />
190204
</LinearLayout>
191205
</LinearLayout>
206+
</RelativeLayout>

android/src/org/coolreader/crengine/TTSToolbarDlg.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ public void onStopTrackingTouch(SeekBar seekBar) {
531531

532532
mWindow.setBackgroundDrawable(new BitmapDrawable());
533533
mWindow.setWidth(WindowManager.LayoutParams.FILL_PARENT);
534-
mWindow.setHeight(WindowManager.LayoutParams.WRAP_CONTENT);
534+
mWindow.setHeight(WindowManager.LayoutParams.FILL_PARENT);
535535
mWindow.setFocusable(true);
536536
mWindow.setTouchable(true);
537537
mWindow.setOutsideTouchable(true);

0 commit comments

Comments
 (0)