diff --git a/src/acr/browser/lightning/BrowserActivity.java b/src/acr/browser/lightning/BrowserActivity.java index aa1852a..49a9050 100644 --- a/src/acr/browser/lightning/BrowserActivity.java +++ b/src/acr/browser/lightning/BrowserActivity.java @@ -55,7 +55,6 @@ import android.webkit.*; import android.webkit.WebChromeClient.CustomViewCallback; import android.webkit.WebView.HitTestResult; import android.widget.*; -import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBar; import android.support.v7.graphics.Palette; import android.support.v7.widget.Toolbar; @@ -72,7 +71,7 @@ import java.net.URL; import java.net.URLEncoder; import java.util.*; -public class BrowserActivity extends ActionBarActivity implements BrowserController, OnClickListener { +public class BrowserActivity extends ThemableActivity implements BrowserController, OnClickListener { private DrawerLayout mDrawerLayout; private ListView mDrawerListLeft, mDrawerListRight; @@ -642,12 +641,6 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl mBrowserFrame.removeView(mToolbarLayout); mUiLayout.addView(mToolbarLayout, 0); } - if (mPreferences.getBoolean(PreferenceConstants.HIDE_STATUS_BAR, false)) { - getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, - WindowManager.LayoutParams.FLAG_FULLSCREEN); - } else { - getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); - } switch (mPreferences.getInt(PreferenceConstants.SEARCH, 1)) { case 0: diff --git a/src/acr/browser/lightning/MainActivity.java b/src/acr/browser/lightning/MainActivity.java index 8a4403e..5f295e3 100644 --- a/src/acr/browser/lightning/MainActivity.java +++ b/src/acr/browser/lightning/MainActivity.java @@ -13,16 +13,11 @@ public class MainActivity extends BrowserActivity { SharedPreferences mPreferences; CookieManager mCookieManager; - private boolean mDark; @Override protected void onCreate(Bundle savedInstanceState) { - mPreferences = getSharedPreferences(PreferenceConstants.PREFERENCES, 0); - mDark = mPreferences.getBoolean(PreferenceConstants.DARK_THEME, false); - if (mDark) { - this.setTheme(R.style.Theme_DarkTheme); - } super.onCreate(savedInstanceState); + mPreferences = getSharedPreferences(PreferenceConstants.PREFERENCES, 0); } @Override @@ -62,15 +57,6 @@ public class MainActivity extends BrowserActivity { saveOpenTabs(); } - @Override - protected void onResume() { - super.onResume(); - if (mPreferences != null - && mPreferences.getBoolean(PreferenceConstants.DARK_THEME, false) != mDark) { - this.recreate(); - } - } - @Override public void updateHistory(String title, String url) { super.updateHistory(title, url);