summaryrefslogtreecommitdiff
path: root/Source/Android
diff options
context:
space:
mode:
authorzackhow <zackhow@gmail.com>2018-09-09 11:21:53 -0400
committerzackhow <zackhow@gmail.com>2018-09-21 17:20:13 -0400
commit67902a7091f6510e8e5ded55a4df2a0ec40140ac (patch)
tree9f60a35f7c39541ea0584d1d8435b5868d492252 /Source/Android
parentf05d85dfe4a889f59f7d8c6c1376959b031d251f (diff)
Android: Layout for emulation when phone is portrait
This sets the surfaceview to the top half of the screen instead of it sitting in the middle which gives more room for onscreen controls.
Diffstat (limited to 'Source/Android')
-rw-r--r--Source/Android/app/src/main/res/layout-port/fragment_emulation.xml47
1 files changed, 47 insertions, 0 deletions
diff --git a/Source/Android/app/src/main/res/layout-port/fragment_emulation.xml b/Source/Android/app/src/main/res/layout-port/fragment_emulation.xml
new file mode 100644
index 0000000000..4f54974a5b
--- /dev/null
+++ b/Source/Android/app/src/main/res/layout-port/fragment_emulation.xml
@@ -0,0 +1,47 @@
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:keepScreenOn="true"
+ tools:context="org.dolphinemu.dolphinemu.fragments.EmulationFragment">
+
+ <!-- Places the emulation surface to the top half of the screen -->
+ <LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:baselineAligned="false">
+ <!-- This is what everything is rendered to during emulation -->
+ <SurfaceView
+ android:id="@+id/surface_emulation"
+ android:layout_height="0dp"
+ android:layout_width="wrap_content"
+ android:layout_weight="1"
+ android:focusable="false"
+ android:focusableInTouchMode="false"/>
+ <RelativeLayout
+ android:layout_width="wrap_content"
+ android:layout_height="0dp"
+ android:layout_weight="1"/>
+ </LinearLayout>
+ <!-- This is the onscreen input overlay -->
+ <org.dolphinemu.dolphinemu.overlay.InputOverlay
+ android:id="@+id/surface_input_overlay"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:focusable="true"
+ android:focusableInTouchMode="true"/>
+
+ <Button
+ android:id="@+id/done_control_config"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:padding="@dimen/spacing_small"
+ android:background="@color/dolphin_blue"
+ android:textColor="@color/lb_tv_white"
+ android:text="@string/emulation_done"
+ android:visibility="gone"/>
+
+</FrameLayout>