From 18330df2f0aff058c12093fc6bca8bf56d264dc4 Mon Sep 17 00:00:00 2001 From: khy <18814188563@163.com> Date: Tue, 19 Jul 2016 16:02:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BB=E9=A1=B5=E8=BD=AE?= =?UTF-8?q?=E6=92=AD=E7=82=B9=E7=9A=84=E4=BD=8D=E7=BD=AE=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=BC=95=E5=AF=BC?= =?UTF-8?q?=E9=A1=B5=E7=9A=84=E5=90=AF=E5=8A=A8=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/gh/gamecenter/MainActivity.java | 7 +++---- .../java/com/gh/gamecenter/SplashScreenActivity.java | 8 ++++---- .../com/gh/gamecenter/game/Game1FragmentAdapter.java | 9 ++++----- .../layout/plugin1_autoscrollviewpager_viewholder.xml | 4 +++- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/com/gh/gamecenter/MainActivity.java b/app/src/main/java/com/gh/gamecenter/MainActivity.java index cbf29614cd..fd03d0b2d1 100644 --- a/app/src/main/java/com/gh/gamecenter/MainActivity.java +++ b/app/src/main/java/com/gh/gamecenter/MainActivity.java @@ -70,7 +70,6 @@ import com.gh.gamecenter.news.NewsFragment; import com.gh.gamecenter.personal.PersonalFragment; import com.gh.gamecenter.volley.extended.JsonArrayExtendedRequest; import com.gh.gamecenter.volley.extended.JsonObjectExtendedRequest; -import com.gh.gamecenter.volley.extended.StringExtendedRequest; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; @@ -411,15 +410,15 @@ public class MainActivity extends BaseFragmentActivity implements sp = getSharedPreferences(Config.PREFERENCE, Context.MODE_PRIVATE); - if (!sp.getBoolean("isFirstLaunch", true) + if (!sp.getBoolean("isNewsFirstLaunch", true) && sp.getBoolean("autoupdate", true)) { checkUpdate(); } - if (sp.getBoolean("isFirstLaunch", true)) { + if (sp.getBoolean("isNewsFirstLaunch", true)) { getPluginUpdate(); getDisclaimer(true); - sp.edit().putBoolean("isFirstLaunch", false).apply(); + sp.edit().putBoolean("isNewsFirstLaunch", false).apply(); } else { getDisclaimer(false); handler.postDelayed(runnable, 500); diff --git a/app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java b/app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java index 1224ef78b8..04e03dd4dd 100644 --- a/app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java +++ b/app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java @@ -97,7 +97,7 @@ public class SplashScreenActivity extends BaseActivity { from = getIntent().getStringExtra("from"); - if (sp.getBoolean("isFirstLaunch", true) + if (sp.getBoolean("isNewsFirstLaunch", true) || sp.getInt("actionbar_height", 0) != 0) { setTheme(R.style.AppTheme_Guide); } else { @@ -116,7 +116,7 @@ public class SplashScreenActivity extends BaseActivity { setContentView(R.layout.activity_splash); - if (sp.getBoolean("isFirstLaunch", true)) { + if (sp.getBoolean("isNewsFirstLaunch", true)) { findViewById(R.id.splash_ll_normal).setVisibility(View.GONE); ViewPager splash_viewPager = (ViewPager) findViewById(R.id.splash_viewPager); @@ -171,7 +171,7 @@ public class SplashScreenActivity extends BaseActivity { @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) { - if (sp.getBoolean("isFirstLaunch", true)) { + if (sp.getBoolean("isNewsFirstLaunch", true)) { Intent intent = new Intent(SplashScreenActivity.this, MainActivity.class); startActivity(intent); @@ -664,7 +664,7 @@ public class SplashScreenActivity extends BaseActivity { concernManager.updateByConcern(concernEntity); } } - if (!sp.getBoolean("isFirstLaunch", true)) { + if (!sp.getBoolean("isNewsFirstLaunch", true)) { int height = sp.getInt("actionbar_height", 0); if (height == 0) { diff --git a/app/src/main/java/com/gh/gamecenter/game/Game1FragmentAdapter.java b/app/src/main/java/com/gh/gamecenter/game/Game1FragmentAdapter.java index f0154f8773..a3885097eb 100644 --- a/app/src/main/java/com/gh/gamecenter/game/Game1FragmentAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/game/Game1FragmentAdapter.java @@ -31,7 +31,6 @@ import com.gh.common.util.GameViewUtils; import com.gh.common.util.ImageUtils; import com.gh.common.util.PlatformUtils; import com.gh.common.util.TimestampUtils; -import com.gh.common.util.Utils; import com.gh.common.view.AutoScrollViewPager; import com.gh.download.DownloadEntry; import com.gh.gamecenter.GameDetailsActivity; @@ -567,16 +566,16 @@ public class Game1FragmentAdapter extends RecyclerView.Adapter + android:orientation="horizontal" + android:layout_alignParentRight="true" + android:layout_marginRight="10dp">