Android: Convert NVidiaShieldWorkaroundView to Kotlin

This commit is contained in:
Charles Lombardo 2023-06-03 20:40:54 -04:00
parent 2434c2db59
commit 90ac08c98d
2 changed files with 21 additions and 27 deletions

View File

@ -1,27 +0,0 @@
/*
* Copyright 2013 Dolphin Emulator Project
* SPDX-License-Identifier: GPL-2.0-or-later
*/
package org.dolphinemu.dolphinemu.ui;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
/**
* Work around a bug with the nVidia Shield.
*
* Without this View, the emulation SurfaceView acts like it has the
* highest Z-value, blocking any other View, such as the menu fragments.
*/
public final class NVidiaShieldWorkaroundView extends View
{
public NVidiaShieldWorkaroundView(Context context, AttributeSet attrs)
{
super(context, attrs);
// Setting this seems to workaround the bug
setWillNotDraw(false);
}
}

View File

@ -0,0 +1,21 @@
// SPDX-License-Identifier: GPL-2.0-or-later
package org.dolphinemu.dolphinemu.ui
import android.content.Context
import android.util.AttributeSet
import android.view.View
/**
* Work around a bug with the nVidia Shield.
*
*
* Without this View, the emulation SurfaceView acts like it has the
* highest Z-value, blocking any other View, such as the menu fragments.
*/
class NVidiaShieldWorkaroundView(context: Context?, attrs: AttributeSet?) : View(context, attrs) {
init {
// Setting this seems to workaround the bug
setWillNotDraw(false)
}
}