|
|
|
|
@ -4,6 +4,7 @@ import android.content.Context; |
|
|
|
|
import android.content.Intent; |
|
|
|
|
import android.content.res.AssetManager; |
|
|
|
|
import android.content.res.Resources; |
|
|
|
|
import android.os.Build; |
|
|
|
|
import android.os.Bundle; |
|
|
|
|
import android.os.Looper; |
|
|
|
|
import android.view.View; |
|
|
|
|
@ -43,6 +44,25 @@ public abstract class BaseActivity extends AppCompatActivity { |
|
|
|
|
init(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected void onResume() { |
|
|
|
|
super.onResume(); |
|
|
|
|
hideSysBar(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void hideSysBar() { |
|
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { |
|
|
|
|
int uiOptions = getWindow().getDecorView().getSystemUiVisibility(); |
|
|
|
|
uiOptions |= View.SYSTEM_UI_FLAG_LAYOUT_STABLE; |
|
|
|
|
uiOptions |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION; |
|
|
|
|
uiOptions |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN; |
|
|
|
|
uiOptions |= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION; |
|
|
|
|
uiOptions |= View.SYSTEM_UI_FLAG_FULLSCREEN; |
|
|
|
|
uiOptions |= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; |
|
|
|
|
getWindow().getDecorView().setSystemUiVisibility(uiOptions); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public Resources getResources() { |
|
|
|
|
if (Looper.myLooper() == Looper.getMainLooper()) { |
|
|
|
|
|