能力值:
( LV2,RANK:10 )
|
-
-
2 楼
问题解决了。
我修改了两个地方:
1、res/xml/preferences.xml中,我把<CheckBoxPreference android:title="@string/t_showtipscreens" android:key="showTipScreens" android:defaultValue="ture" />改为<CheckBoxPreference android:title="@string/t_showtipscreens" android:key="showTipScreens" android:defaultValue="false" />
修改后,软件的设置中,show tip screens还是灰色的,默认打的勾,已经去掉了。
2、把ActMain.smali中的method protected onResume()V这一段程序全部删掉了。删掉的内容如下:
.method protected onResume()V
.locals 6
const/4 v3, 0x1
const/4 v5, 0x0
invoke-super {p0}, Landroid/app/Activity;->onResume()V
invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;
move-result-object v0
const-string v1, "showTipScreens"
invoke-interface {v0, v1, v3}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
move-result v1
const-string v2, "showTut"
invoke-interface {v0, v2, v3}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
move-result v2
const-string v3, "lastVer"
const/4 v4, 0x0
invoke-interface {v0, v3, v4}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
if-eqz v2, :cond_3
iget-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;
if-eqz v1, :cond_0
iget-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;
invoke-virtual {v1}, Lmco/prj/app/bwgofree/cs;->b()Z
move-result v1
if-nez v1, :cond_1
:cond_0
new-instance v1, Lmco/prj/app/bwgofree/cx;
iget-boolean v2, p0, Lmco/prj/app/bwgofree/ActMain;->D:Z
invoke-direct {v1, p0, v2}, Lmco/prj/app/bwgofree/cx;-><init>(Landroid/content/Context;Z)V
iput-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;
:cond_1
iget-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;
invoke-virtual {v1}, Lmco/prj/app/bwgofree/cs;->a()V
:cond_2
:goto_0
invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
move-result-object v0
const-string v1, "lastVer"
invoke-static {}, Lmco/prj/app/bwgofree/dt;->a()Ljava/lang/String;
move-result-object v2
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
move-result-object v0
invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z
invoke-virtual {p0}, Lmco/prj/app/bwgofree/ActMain;->getResources()Landroid/content/res/Resources;
move-result-object v0
invoke-virtual {v0}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
move-result-object v0
iget v0, v0, Landroid/content/res/Configuration;->orientation:I
sput v0, Lmco/prj/app/bwgofree/et;->a:I
invoke-direct {p0}, Lmco/prj/app/bwgofree/ActMain;->o()V
return-void
:cond_3
invoke-static {}, Lmco/prj/app/bwgofree/dt;->a()Ljava/lang/String;
move-result-object v2
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-nez v2, :cond_6
iget-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;
if-eqz v1, :cond_4
iget-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;
invoke-virtual {v1}, Lmco/prj/app/bwgofree/cs;->b()Z
move-result v1
if-nez v1, :cond_5
:cond_4
new-instance v1, Lmco/prj/app/bwgofree/dc;
iget-boolean v2, p0, Lmco/prj/app/bwgofree/ActMain;->D:Z
invoke-direct {v1, p0, v2}, Lmco/prj/app/bwgofree/dc;-><init>(Landroid/content/Context;Z)V
iput-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;
:cond_5
iget-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;
invoke-virtual {v1}, Lmco/prj/app/bwgofree/cs;->a()V
goto :goto_0
:cond_6
iget-boolean v2, p0, Lmco/prj/app/bwgofree/ActMain;->H:Z
if-eqz v2, :cond_7
if-nez v1, :cond_8
:cond_7
invoke-virtual {p0}, Lmco/prj/app/bwgofree/ActMain;->getResources()Landroid/content/res/Resources;
move-result-object v1
invoke-virtual {v1}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
move-result-object v1
iget v1, v1, Landroid/content/res/Configuration;->orientation:I
sget v2, Lmco/prj/app/bwgofree/et;->a:I
if-ne v1, v2, :cond_2
:cond_8
iget-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;
if-eqz v1, :cond_9
iget-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;
invoke-virtual {v1}, Lmco/prj/app/bwgofree/cs;->b()Z
move-result v1
if-nez v1, :cond_a
:cond_9
new-instance v1, Lmco/prj/app/bwgofree/cv;
iget-boolean v2, p0, Lmco/prj/app/bwgofree/ActMain;->D:Z
invoke-direct {v1, p0, v2, v5}, Lmco/prj/app/bwgofree/cv;-><init>(Landroid/content/Context;ZZ)V
iput-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;
:cond_a
iput-boolean v5, p0, Lmco/prj/app/bwgofree/ActMain;->H:Z
iget-object v1, p0, Lmco/prj/app/bwgofree/ActMain;->z:Lmco/prj/app/bwgofree/cs;
invoke-virtual {v1}, Lmco/prj/app/bwgofree/cs;->a()V
goto :goto_0
.end method
修改这两处,保存后重新编译。安装测试,问题解决。
|