Commit 644bd398 authored by fallenstardust's avatar fallenstardust

Logo显示时隐藏虚拟键

parent b7547be8
package cn.garymb.ygomobile.ui.activities;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.widget.Toast;
import cn.garymb.ygomobile.AppsSettings;
......@@ -17,6 +19,7 @@ public class LogoActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
hideBottomUIMenu();
setContentView(R.layout.activity_logo);
if (AppsSettings.get().isOnlyGame()) {
YGOStarter.startGame(this, null);
......@@ -55,41 +58,18 @@ public class LogoActivity extends BaseActivity {
}
}
/* @Override
protected void onCreate(Bundle savedInstanceState) {
requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
if(BuildConfig.DEBUG){
startActivity(new Intent(LogoActivity.this, MainActivity.class));
finish();
return;
protected void hideBottomUIMenu() {
//隐藏虚拟按键,并且全屏
if (Build.VERSION.SDK_INT > 11 && Build.VERSION.SDK_INT < 19) { // lower api
View v = this.getWindow().getDecorView();
v.setSystemUiVisibility(View.GONE);
} else if (Build.VERSION.SDK_INT >= 19) {
//for new api versions.
View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
}
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_logo);
ImageView image = (ImageView) $(R.id.logo);
AlphaAnimation anim = new AlphaAnimation(0.1f, 1.0f);
anim.setDuration(Constants.LOG_TIME);
anim.setAnimationListener(new AnimationListener() {
@Override
public void onAnimationStart(Animation arg0) {
Toast.makeText(LogoActivity.this, R.string.logo_text, Toast.LENGTH_SHORT).show();
}
@Override
public void onAnimationRepeat(Animation arg0) {
}
@Override
public void onAnimationEnd(Animation arg0) {
startActivity(new Intent(LogoActivity.this, MainActivity.class));
finish();
}
});
image.setAnimation(anim);
anim.start();
}*/
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment