diff --git a/app/src/main/java/emu/skyline/EmulationActivity.kt b/app/src/main/java/emu/skyline/EmulationActivity.kt index a0900b1a..1ee28892 100644 --- a/app/src/main/java/emu/skyline/EmulationActivity.kt +++ b/app/src/main/java/emu/skyline/EmulationActivity.kt @@ -14,6 +14,7 @@ import android.os.* import android.util.Log import android.view.* import androidx.appcompat.app.AppCompatActivity +import androidx.core.view.isGone import androidx.core.view.isInvisible import emu.skyline.input.* import emu.skyline.loader.getRomFormat @@ -224,10 +225,15 @@ class EmulationActivity : AppCompatActivity(), SurfaceHolder.Callback, View.OnTo game_view.setOnTouchListener(this) // Hide on screen controls when first controller is not set - on_screen_controller_view.isInvisible = !InputManager.controllers[0]!!.type.firstController || !settings.onScreenControl + on_screen_controller_view.isGone = !InputManager.controllers[0]!!.type.firstController || !settings.onScreenControl on_screen_controller_view.setOnButtonStateChangedListener(::onButtonStateChanged) on_screen_controller_view.setOnStickStateChangedListener(::onStickStateChanged) + on_screen_controller_toggle.isGone = on_screen_controller_toggle.isGone + on_screen_controller_toggle.setOnClickListener { + on_screen_controller_view.isInvisible = !on_screen_controller_view.isInvisible + } + executeApplication(intent.data!!) } diff --git a/app/src/main/res/drawable/ic_show.xml b/app/src/main/res/drawable/ic_show.xml new file mode 100644 index 00000000..77f2e909 --- /dev/null +++ b/app/src/main/res/drawable/ic_show.xml @@ -0,0 +1,10 @@ + + + + diff --git a/app/src/main/res/layout/emu_activity.xml b/app/src/main/res/layout/emu_activity.xml index 1c083858..16dfa2ae 100644 --- a/app/src/main/res/layout/emu_activity.xml +++ b/app/src/main/res/layout/emu_activity.xml @@ -1,15 +1,18 @@ + android:layout_height="match_parent" + tools:visibility="invisible" /> + +