今奥全景相机
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

265 lines
5.9 KiB

.class public Lcom/viatech/util/UIUtils;
.super Ljava/lang/Object;
.source "UIUtils.java"
# static fields
.field public static sSystemBarManager:Lcom/viatech/util/SystemBarTintManager;
# direct methods
.method public constructor <init>()V
.locals 0
.prologue
.line 12
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static dp2px(Landroid/content/Context;F)F
.locals 2
.prologue
.line 23
const/4 v0, 0x0
.line 25
invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
invoke-virtual {v1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
move-result-object v1
.line 23
invoke-static {v0, p1, v1}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F
move-result v0
.line 26
return v0
.end method
.method public static exitFullScreen(Landroid/app/Activity;)V
.locals 3
.prologue
.line 54
invoke-virtual {p0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;
move-result-object v0
invoke-virtual {v0}, Landroid/view/Window;->getDecorView()Landroid/view/View;
move-result-object v0
invoke-virtual {v0}, Landroid/view/View;->getSystemUiVisibility()I
move-result v0
.line 55
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v2, 0xe
if-lt v1, v2, :cond_0
.line 57
xor-int/lit8 v0, v0, 0x2
.line 58
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v2, 0x10
if-lt v1, v2, :cond_0
.line 61
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v2, 0x12
if-lt v1, v2, :cond_0
.line 62
xor-int/lit16 v0, v0, 0x1000
.line 66
:cond_0
invoke-virtual {p0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;
move-result-object v1
invoke-virtual {v1}, Landroid/view/Window;->getDecorView()Landroid/view/View;
move-result-object v1
invoke-virtual {v1, v0}, Landroid/view/View;->setSystemUiVisibility(I)V
.line 67
invoke-virtual {p0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;
move-result-object v0
const/16 v1, 0x400
invoke-virtual {v0, v1}, Landroid/view/Window;->clearFlags(I)V
.line 68
return-void
.end method
.method public static fullScreen(Landroid/app/Activity;)V
.locals 3
.prologue
.line 37
invoke-virtual {p0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;
move-result-object v0
invoke-virtual {v0}, Landroid/view/Window;->getDecorView()Landroid/view/View;
move-result-object v0
invoke-virtual {v0}, Landroid/view/View;->getSystemUiVisibility()I
move-result v0
.line 38
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v2, 0xe
if-lt v1, v2, :cond_0
.line 40
or-int/lit8 v0, v0, 0x2
.line 41
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v2, 0x10
if-lt v1, v2, :cond_0
.line 44
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v2, 0x12
if-lt v1, v2, :cond_0
.line 45
or-int/lit16 v0, v0, 0x1000
.line 49
:cond_0
invoke-virtual {p0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;
move-result-object v1
invoke-virtual {v1}, Landroid/view/Window;->getDecorView()Landroid/view/View;
move-result-object v1
invoke-virtual {v1, v0}, Landroid/view/View;->setSystemUiVisibility(I)V
.line 50
invoke-virtual {p0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;
move-result-object v0
const/16 v1, 0x400
invoke-virtual {v0, v1}, Landroid/view/Window;->addFlags(I)V
.line 51
return-void
.end method
.method public static px2dp(Landroid/content/Context;F)F
.locals 2
.prologue
.line 30
const/4 v0, 0x1
.line 32
invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
invoke-virtual {v1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
move-result-object v1
.line 30
invoke-static {v0, p1, v1}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F
move-result v0
return v0
.end method
.method public static setupStatusBar(Landroid/app/Activity;)V
.locals 4
.prologue
.line 74
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x13
if-lt v0, v1, :cond_0
.line 75
invoke-virtual {p0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;
move-result-object v0
.line 76
invoke-virtual {v0}, Landroid/view/Window;->getAttributes()Landroid/view/WindowManager$LayoutParams;
move-result-object v1
.line 79
iget v2, v1, Landroid/view/WindowManager$LayoutParams;->flags:I
const/high16 v3, 0x4000000
or-int/2addr v2, v3
iput v2, v1, Landroid/view/WindowManager$LayoutParams;->flags:I
.line 83
invoke-virtual {v0, v1}, Landroid/view/Window;->setAttributes(Landroid/view/WindowManager$LayoutParams;)V
.line 84
new-instance v0, Lcom/viatech/util/SystemBarTintManager;
invoke-direct {v0, p0}, Lcom/viatech/util/SystemBarTintManager;-><init>(Landroid/app/Activity;)V
sput-object v0, Lcom/viatech/util/UIUtils;->sSystemBarManager:Lcom/viatech/util/SystemBarTintManager;
.line 85
sget-object v0, Lcom/viatech/util/UIUtils;->sSystemBarManager:Lcom/viatech/util/SystemBarTintManager;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Lcom/viatech/util/SystemBarTintManager;->setStatusBarTintEnabled(Z)V
.line 87
sget-object v0, Lcom/viatech/util/UIUtils;->sSystemBarManager:Lcom/viatech/util/SystemBarTintManager;
const/high16 v1, -0x1000000
invoke-virtual {v0, v1}, Lcom/viatech/util/SystemBarTintManager;->setStatusBarTintColor(I)V
.line 89
:cond_0
return-void
.end method