summaryrefslogtreecommitdiffstats
path: root/src/android/app/src/main/res/layout/fragment_emulation.xml
blob: c01117d144ff7e827270f68dfbd15841eb9bb344 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:keepScreenOn="true"
    android:defaultFocusHighlightEnabled="false"
    tools:context="org.yuzu.yuzu_emu.fragments.EmulationFragment"
    tools:openDrawer="start">

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <FrameLayout
            android:id="@+id/emulation_container"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <!-- This is what everything is rendered to during emulation -->
            <org.yuzu.yuzu_emu.views.FixedRatioSurfaceView
                android:id="@+id/surface_emulation"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_gravity="center"
                android:focusable="false"
                android:focusableInTouchMode="false"
                android:defaultFocusHighlightEnabled="false" />

            <com.google.android.material.card.MaterialCardView
                android:id="@+id/loading_indicator"
                style="?attr/materialCardViewOutlinedStyle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:defaultFocusHighlightEnabled="false"
                android:clickable="false">

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/loading_layout"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="center_horizontal">

                    <ImageView
                        android:id="@+id/loading_image"
                        android:layout_width="wrap_content"
                        android:layout_height="0dp"
                        android:adjustViewBounds="true"
                        app:layout_constraintBottom_toBottomOf="@+id/linearLayout"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="@+id/linearLayout"
                        tools:src="@drawable/default_icon" />

                    <LinearLayout
                        android:id="@+id/linearLayout"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:orientation="vertical"
                        android:paddingHorizontal="24dp"
                        android:paddingVertical="36dp"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toEndOf="@id/loading_image"
                        app:layout_constraintTop_toTopOf="parent">

                        <com.google.android.material.textview.MaterialTextView
                            android:id="@+id/loading_title"
                            style="@style/TextAppearance.Material3.TitleMedium"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:ellipsize="marquee"
                            android:marqueeRepeatLimit="marquee_forever"
                            android:requiresFadingEdge="horizontal"
                            android:singleLine="true"
                            android:textAlignment="viewStart"
                            tools:text="@string/games" />

                        <com.google.android.material.textview.MaterialTextView
                            android:id="@+id/loading_text"
                            style="@style/TextAppearance.Material3.TitleSmall"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="4dp"
                            android:ellipsize="marquee"
                            android:marqueeRepeatLimit="marquee_forever"
                            android:requiresFadingEdge="horizontal"
                            android:singleLine="true"
                            android:text="@string/loading"
                            android:textAlignment="viewStart" />

                        <com.google.android.material.progressindicator.LinearProgressIndicator
                            android:id="@+id/loading_progress_indicator"
                            android:layout_width="192dp"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="12dp"
                            android:indeterminate="true"
                            app:trackCornerRadius="8dp" />

                    </LinearLayout>

                </androidx.constraintlayout.widget.ConstraintLayout>

            </com.google.android.material.card.MaterialCardView>

        </FrameLayout>

        <FrameLayout
            android:id="@+id/input_container"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="bottom">

            <!-- This is the onscreen input overlay -->
            <org.yuzu.yuzu_emu.overlay.InputOverlay
                android:id="@+id/surface_input_overlay"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_gravity="center"
                android:focusable="true"
                android:focusableInTouchMode="true"
                android:defaultFocusHighlightEnabled="false"
                android:visibility="invisible" />

            <Button
                android:id="@+id/done_control_config"
                style="@style/Widget.Material3.Button.ElevatedButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:text="@string/emulation_done"
                android:visibility="gone" />

        </FrameLayout>

        <FrameLayout
            android:id="@+id/overlay_container"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:fitsSystemWindows="true">

            <com.google.android.material.textview.MaterialTextView
                android:id="@+id/show_fps_text"
                style="@style/TextAppearance.Material3.BodySmall"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="left"
                android:clickable="false"
                android:focusable="false"
                android:paddingHorizontal="20dp"
                android:textColor="@android:color/white"
                android:shadowColor="@android:color/black"
                android:shadowRadius="3"
                tools:ignore="RtlHardcoded" />

        </FrameLayout>

    </androidx.coordinatorlayout.widget.CoordinatorLayout>

    <com.google.android.material.navigation.NavigationView
        android:id="@+id/in_game_menu"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:focusedByDefault="true"
        app:headerLayout="@layout/header_in_game"
        app:menu="@menu/menu_in_game"
        tools:visibility="gone" />

</androidx.drawerlayout.widget.DrawerLayout>