mirror of
https://github.com/jpd002/Play-.git
synced 2025-04-28 13:47:57 +03:00
Offset FPS label to make sure it's not hidden by rounded screen corners.
This commit is contained in:
parent
251ec2a37f
commit
81284985fb
1 changed files with 14 additions and 0 deletions
|
@ -133,6 +133,20 @@ public class EmulatorActivity extends Activity
|
||||||
updateOnScreenWidgets();
|
updateOnScreenWidgets();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAttachedToWindow()
|
||||||
|
{
|
||||||
|
super.onAttachedToWindow();
|
||||||
|
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.P)
|
||||||
|
{
|
||||||
|
DisplayCutout displayCutout = getWindow().getDecorView().getRootWindowInsets().getDisplayCutout();
|
||||||
|
if(displayCutout != null)
|
||||||
|
{
|
||||||
|
_fpsTextView.setX(displayCutout.getSafeInsetLeft());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onActivityResult(int requestCode, int resultCode, Intent data)
|
protected void onActivityResult(int requestCode, int resultCode, Intent data)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue