Browse Source

Merge pull request #168 from DF1E/dev

material design for erveryone..
master
Anthony Restaino 10 years ago
parent
commit
a201f88906
  1. 16
      AndroidManifest.xml
  2. 13
      res/layout/about_settings.xml
  3. 19
      res/layout/activity_main.xml
  4. 13
      res/layout/advanced_settings.xml
  5. 2
      res/layout/bookmark_activity.xml
  6. 13
      res/layout/display_settings.xml
  7. 13
      res/layout/general_settings.xml
  8. 7
      res/layout/license_activity.xml
  9. 13
      res/layout/privacy_settings.xml
  10. 15
      res/layout/settings.xml
  11. 22
      res/layout/toolbar.xml
  12. 70
      res/values-v21/styles.xml
  13. 107
      res/values/styles.xml
  14. 16
      src/acr/browser/lightning/AboutSettingsActivity.java
  15. 15
      src/acr/browser/lightning/AdvancedSettingsActivity.java
  16. 17
      src/acr/browser/lightning/BookmarkActivity.java
  17. 16
      src/acr/browser/lightning/DisplaySettingsActivity.java
  18. 16
      src/acr/browser/lightning/GeneralSettingsActivity.java
  19. 16
      src/acr/browser/lightning/PrivacySettingsActivity.java
  20. 17
      src/acr/browser/lightning/SettingsActivity.java

16
AndroidManifest.xml

@ -105,7 +105,7 @@ @@ -105,7 +105,7 @@
android:name="acr.browser.lightning.SettingsActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/settings"
android:theme="@style/Theme.SettingsTheme" >
android:theme="@style/Theme.LightTheme" >
<intent-filter>
<action android:name="android.intent.action.SETTINGS" />
@ -116,7 +116,7 @@ @@ -116,7 +116,7 @@
android:name="acr.browser.lightning.GeneralSettingsActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/settings_general"
android:theme="@style/Theme.SettingsTheme" >
android:theme="@style/Theme.LightTheme" >
<intent-filter>
<action android:name="android.intent.action.GENERAL_SETTINGS" />
@ -127,7 +127,7 @@ @@ -127,7 +127,7 @@
android:name="acr.browser.lightning.DisplaySettingsActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/settings_display"
android:theme="@style/Theme.SettingsTheme" >
android:theme="@style/Theme.LightTheme" >
<intent-filter>
<action android:name="android.intent.action.DISPLAY_SETTINGS" />
@ -138,7 +138,7 @@ @@ -138,7 +138,7 @@
android:name="acr.browser.lightning.PrivacySettingsActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/settings_privacy"
android:theme="@style/Theme.SettingsTheme" >
android:theme="@style/Theme.LightTheme" >
<intent-filter>
<action android:name="android.intent.action.PRIVACY_SETTINGS" />
@ -149,7 +149,7 @@ @@ -149,7 +149,7 @@
android:name="acr.browser.lightning.AdvancedSettingsActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/settings_advanced"
android:theme="@style/Theme.SettingsTheme" >
android:theme="@style/Theme.LightTheme" >
<intent-filter>
<action android:name="android.intent.action.ADVANCED_SETTINGS" />
@ -160,7 +160,7 @@ @@ -160,7 +160,7 @@
android:name="acr.browser.lightning.AboutSettingsActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/settings_about"
android:theme="@style/Theme.SettingsTheme" >
android:theme="@style/Theme.LightTheme" >
<intent-filter>
<action android:name="android.intent.action.ABOUT_SETTINGS" />
@ -185,7 +185,7 @@ @@ -185,7 +185,7 @@
android:name="acr.browser.lightning.LicenseActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/licenses"
android:theme="@style/Theme.SettingsTheme" >
android:theme="@style/Theme.LightTheme" >
<intent-filter>
<action android:name="android.intent.action.LICENSE" />
@ -196,7 +196,7 @@ @@ -196,7 +196,7 @@
android:name="acr.browser.lightning.BookmarkActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/bookmark_settings"
android:theme="@style/Theme.SettingsTheme" >
android:theme="@style/Theme.LightTheme" >
<intent-filter>
<action android:name="android.intent.action.BOOKMARK" />

13
res/layout/about_settings.xml

@ -1,5 +1,12 @@ @@ -1,5 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<include layout="@layout/toolbar" />
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent" >
@ -124,7 +131,7 @@ @@ -124,7 +131,7 @@
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:background="#cdcdcd" />
</LinearLayout>
</ScrollView>
</ScrollView>
</LinearLayout>

19
res/layout/activity_main.xml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<!-- Copyright 2014 ACR Development -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:custom="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -19,8 +19,25 @@ @@ -19,8 +19,25 @@
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/toolbar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:elevation="2dp"
android:orientation="vertical" >
<include layout="@layout/toolbar" />
<acr.browser.lightning.AnimatedProgressBar
android:id="@+id/progress_view"
android:layout_width="match_parent"
android:layout_height="2dp"
custom:backgroundColor="?progressBackgroundColor"
custom:bidirectionalAnimate="false"
custom:progressColor="?colorAccent" />
</LinearLayout>
<include layout="@layout/browser_content" />
<include layout="@layout/search_interface" />

13
res/layout/advanced_settings.xml

@ -1,5 +1,12 @@ @@ -1,5 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<include layout="@layout/toolbar" />
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent" >
@ -220,7 +227,7 @@ @@ -220,7 +227,7 @@
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:background="#cdcdcd" />
</LinearLayout>
</ScrollView>
</ScrollView>
</LinearLayout>

2
res/layout/bookmark_activity.xml

@ -4,6 +4,8 @@ @@ -4,6 +4,8 @@
android:layout_height="match_parent"
android:orientation="vertical" >
<include layout="@layout/toolbar" />
<LinearLayout
android:id="@+id/exportBackup"
android:layout_width="match_parent"

13
res/layout/display_settings.xml

@ -1,5 +1,12 @@ @@ -1,5 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<include layout="@layout/toolbar" />
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent" >
@ -241,7 +248,7 @@ @@ -241,7 +248,7 @@
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:background="#cdcdcd" />
</LinearLayout>
</ScrollView>
</ScrollView>
</LinearLayout>

13
res/layout/general_settings.xml

@ -1,5 +1,12 @@ @@ -1,5 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<include layout="@layout/toolbar" />
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent" >
@ -225,7 +232,7 @@ @@ -225,7 +232,7 @@
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:background="#cdcdcd" />
</LinearLayout>
</ScrollView>
</ScrollView>
</LinearLayout>

7
res/layout/license_activity.xml

@ -4,6 +4,8 @@ @@ -4,6 +4,8 @@
android:layout_height="match_parent"
android:orientation="vertical" >
<include layout="@layout/toolbar" />
<LinearLayout
android:id="@+id/browserLicense"
android:layout_width="match_parent"
@ -64,6 +66,7 @@ @@ -64,6 +66,7 @@
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/light" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="1dp"
@ -97,12 +100,14 @@ @@ -97,12 +100,14 @@
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/light" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:background="#cdcdcd" />
<LinearLayout
android:id="@+id/licenseOrbot"
android:layout_width="match_parent"
@ -129,10 +134,12 @@ @@ -129,10 +134,12 @@
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/light" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:background="#cdcdcd" />
</LinearLayout>

13
res/layout/privacy_settings.xml

@ -1,5 +1,12 @@ @@ -1,5 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<include layout="@layout/toolbar" />
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent" >
@ -330,7 +337,7 @@ @@ -330,7 +337,7 @@
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:background="#cdcdcd" />
</LinearLayout>
</ScrollView>
</ScrollView>
</LinearLayout>

15
res/layout/settings.xml

@ -1,10 +1,15 @@ @@ -1,10 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scrollView1"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:layout_height="match_parent"
android:orientation="vertical" >
<include layout="@layout/toolbar" />
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="match_parent"
@ -369,7 +374,7 @@ @@ -369,7 +374,7 @@
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:background="#cdcdcd" />
</LinearLayout>
</ScrollView>
</ScrollView>
</LinearLayout>

22
res/layout/toolbar.xml

@ -1,26 +1,10 @@ @@ -1,26 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:elevation="2dp"
android:orientation="vertical" >
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?colorPrimary"
android:minHeight="?attr/actionBarSize"
custom:contentInsetEnd="0dp"
custom:contentInsetStart="0dp" />
<acr.browser.lightning.AnimatedProgressBar
android:id="@+id/progress_view"
android:layout_width="match_parent"
android:layout_height="2dp"
custom:bidirectionalAnimate="false"
custom:backgroundColor="?attr/progressBackgroundColor"
custom:progressColor="?attr/colorAccent" />
</LinearLayout>

70
res/values-v21/styles.xml

@ -1,70 +0,0 @@ @@ -1,70 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="Theme.SettingsTheme" parent="android:Theme.Material.Light">
<!-- customize the color palette -->
<item name="listBackground">?attr/listChoiceBackgroundIndicator</item>
<item name="android:colorPrimary">@color/primary_color</item>
<item name="android:colorPrimaryDark">@color/secondary_color_settings</item>
<item name="android:colorAccent">@color/accent_color</item>
<item name="android:windowContentOverlay">@null</item>
<item name="progressColor">@color/gray_medium</item>
<item name="arrowBackDrawable">@drawable/ic_action_back</item>
<item name="numberColor">@color/gray_dark</item>
<item name="autoCompleteTitleColor">@color/black</item>
<item name="autoCompleteUrlColor">@color/gray_medium</item>
<item name="arrowForwardDrawable">@drawable/ic_action_forward</item>
<item name="actionOverflowButtonStyle">@style/overFlowButtonStyle</item>
</style>
<style name="Theme.LightTheme" parent="Theme.AppCompat.Light">
<!-- customize the color palette -->
<item name="searchBackground">@drawable/card_bg</item>
<item name="listBackground">?attr/listChoiceBackgroundIndicator</item>
<item name="colorPrimary">@color/primary_color</item>
<item name="colorPrimaryDark">@color/secondary_color</item>
<item name="colorAccent">@color/accent_color</item>
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="progressBackgroundColor">#00000000</item>
<item name="android:windowContentOverlay">@null</item>
<item name="progressColor">@color/gray_medium</item>
<item name="arrowBackDrawable">@drawable/ic_action_back</item>
<item name="numberColor">@color/gray_dark</item>
<item name="autoCompleteTitleColor">@color/black</item>
<item name="autoCompleteUrlColor">@color/gray_medium</item>
<item name="arrowForwardDrawable">@drawable/ic_action_forward</item>
<item name="android:actionBarStyle">@style/LightActionBar</item>
<item name="actionOverflowButtonStyle">@style/overFlowButtonStyle</item>
</style>
<style name="Theme.DarkTheme" parent="Theme.AppCompat">
<!-- customize the color palette -->
<item name="searchBackground">@drawable/card_bg</item>
<item name="listBackground">?attr/listChoiceBackgroundIndicator</item>
<item name="colorPrimary">@color/primary_color_dark</item>
<item name="colorPrimaryDark">@color/secondary_color</item>
<item name="colorAccent">@color/accent_color</item>
<item name="android:windowNoTitle">true</item>
<item name="progressBackgroundColor">#00000000</item>
<item name="windowActionBar">false</item>
<item name="android:windowContentOverlay">@null</item>
<item name="progressColor">@color/gray_medium</item>
<item name="arrowBackDrawable">@drawable/ic_action_back</item>
<item name="numberColor">@color/gray_dark</item>
<item name="autoCompleteTitleColor">@color/black</item>
<item name="autoCompleteUrlColor">@color/gray_medium</item>
<item name="arrowForwardDrawable">@drawable/ic_action_forward</item>
<item name="android:actionBarStyle">@style/LightActionBar</item>
<item name="actionOverflowButtonStyle">@style/overFlowButtonStyle</item>
</style>
<style name="overFlowButtonStyle" parent="@style/Widget.AppCompat.ActionButton.Overflow">
<item name="android:minWidth">48dp</item>
<item name="android:padding">0dp</item>
</style>
</resources>

107
res/values/styles.xml

@ -1,94 +1,17 @@ @@ -1,94 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="DefaultTheme" parent="android:Theme.Holo.Light">
<item name="progressColor">@color/gray_medium</item>
<item name="arrowBackDrawable">@drawable/ic_action_back</item>
<item name="numberColor">@color/gray_dark</item>
<item name="autoCompleteTitleColor">@color/black</item>
<item name="autoCompleteUrlColor">@color/gray_medium</item>
<item name="arrowForwardDrawable">@drawable/ic_action_forward</item>
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="LightTheme" parent="android:Theme.Holo.Light">
<item name="android:windowContentOverlay">@null</item>
<item name="progressColor">@color/gray_medium</item>
<item name="arrowBackDrawable">@drawable/ic_action_back</item>
<item name="numberColor">@color/gray_dark</item>
<item name="autoCompleteTitleColor">@color/black</item>
<item name="autoCompleteUrlColor">@color/gray_medium</item>
<item name="arrowForwardDrawable">@drawable/ic_action_forward</item>
<item name="android:actionBarStyle">@style/LightActionBar</item>
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<style name="DarkTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<item name="android:windowContentOverlay">@null</item>
<item name="progressColor">@color/gray_extra_dark</item>
<item name="numberColor">@color/gray_light</item>
<item name="autoCompleteTitleColor">@color/white</item>
<item name="autoCompleteUrlColor">@color/gray_light</item>
<item name="arrowBackDrawable">@drawable/ic_action_back_dark</item>
<item name="arrowForwardDrawable">@drawable/ic_action_forward_dark</item>
<item name="android:actionBarStyle">@style/DarkActionBar</item>
</style>
<style name="DarkActionBar" parent="android:Widget.Holo.Light.ActionBar.Solid.Inverse">
<item name="android:background">@color/gray_dark</item>
</style>
<style name="LightActionBar" parent="android:Widget.Holo.Light.ActionBar.Solid">
<item name="android:background">@color/gray_light</item>
</style>
<style name="boldText">
<item name="android:textStyle">bold</item>
</style>
<style name="normalText">
<item name="android:textStyle">normal</item>
<item name="android:fontFamily">sans-serif-light</item>
</style>
<style name="Theme.SettingsTheme" parent="android:Theme.Holo.Light">
<!-- customize the color palette -->
<item name="listBackground">@drawable/list_bg</item>
<item name="colorPrimary">@color/primary_color</item>
<item name="colorPrimaryDark">@color/secondary_color_settings</item>
<item name="colorAccent">@color/accent_color</item>
<item name="android:windowContentOverlay">@null</item>
<item name="progressColor">@color/gray_medium</item>
<item name="arrowBackDrawable">@drawable/ic_action_back</item>
<item name="numberColor">@color/gray_dark</item>
<item name="autoCompleteTitleColor">@color/black</item>
<item name="autoCompleteUrlColor">@color/gray_medium</item>
<item name="arrowForwardDrawable">@drawable/ic_action_forward</item>
<item name="actionOverflowButtonStyle">@style/overFlowButtonStyle</item>
</style>
<style name="Theme.LightTheme" parent="Theme.AppCompat.Light">
<!-- customize the color palette -->
<item name="searchBackground">@drawable/card_bg_elevate</item>
<item name="searchBackground">@drawable/card_bg</item>
<item name="listBackground">?attr/listChoiceBackgroundIndicator</item>
<item name="colorPrimary">@color/primary_color</item>
<item name="colorPrimaryDark">@color/secondary_color</item>
<item name="colorAccent">@color/accent_color</item>
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="progressBackgroundColor">@color/secondary_color</item>
<item name="listBackground">@drawable/list_bg</item>
<item name="progressBackgroundColor">#00000000</item>
<item name="android:windowContentOverlay">@null</item>
<item name="progressColor">@color/gray_medium</item>
<item name="arrowBackDrawable">@drawable/ic_action_back</item>
@ -103,14 +26,14 @@ @@ -103,14 +26,14 @@
<style name="Theme.DarkTheme" parent="Theme.AppCompat">
<!-- customize the color palette -->
<item name="searchBackground">@drawable/card_bg_elevate</item>
<item name="searchBackground">@drawable/card_bg</item>
<item name="listBackground">?attr/listChoiceBackgroundIndicator</item>
<item name="colorPrimary">@color/primary_color_dark</item>
<item name="colorPrimaryDark">@color/secondary_color</item>
<item name="colorAccent">@color/accent_color</item>
<item name="android:windowNoTitle">true</item>
<item name="progressBackgroundColor">#00000000</item>
<item name="windowActionBar">false</item>
<item name="progressBackgroundColor">@color/secondary_color</item>
<item name="listBackground">@drawable/list_bg</item>
<item name="android:windowContentOverlay">@null</item>
<item name="progressColor">@color/gray_medium</item>
<item name="arrowBackDrawable">@drawable/ic_action_back</item>
@ -118,6 +41,7 @@ @@ -118,6 +41,7 @@
<item name="autoCompleteTitleColor">@color/black</item>
<item name="autoCompleteUrlColor">@color/gray_medium</item>
<item name="arrowForwardDrawable">@drawable/ic_action_forward</item>
<item name="android:actionBarStyle">@style/LightActionBar</item>
<item name="actionOverflowButtonStyle">@style/overFlowButtonStyle</item>
</style>
@ -126,4 +50,21 @@ @@ -126,4 +50,21 @@
<item name="android:padding">0dp</item>
</style>
<style name="boldText">
<item name="android:textStyle">bold</item>
</style>
<style name="normalText">
<item name="android:textStyle">normal</item>
<item name="android:fontFamily">sans-serif-light</item>
</style>
<style name="DarkActionBar" parent="android:Widget.Holo.Light.ActionBar.Solid.Inverse">
<item name="android:background">@color/gray_dark</item>
</style>
<style name="LightActionBar" parent="android:Widget.Holo.Light.ActionBar.Solid">
<item name="android:background">@color/gray_light</item>
</style>
</resources>

16
src/acr/browser/lightning/AboutSettingsActivity.java

@ -3,8 +3,6 @@ @@ -3,8 +3,6 @@
*/
package acr.browser.lightning;
import android.app.ActionBar;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
@ -12,6 +10,8 @@ import android.content.pm.PackageInfo; @@ -12,6 +10,8 @@ import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
@ -19,7 +19,7 @@ import android.view.WindowManager; @@ -19,7 +19,7 @@ import android.view.WindowManager;
import android.widget.RelativeLayout;
import android.widget.TextView;
public class AboutSettingsActivity extends Activity {
public class AboutSettingsActivity extends ActionBarActivity {
// mPreferences variables
private SharedPreferences mPreferences;
@ -31,11 +31,11 @@ public class AboutSettingsActivity extends Activity { @@ -31,11 +31,11 @@ public class AboutSettingsActivity extends Activity {
super.onCreate(savedInstanceState);
setContentView(R.layout.about_settings);
ActionBar actionBar = getActionBar();
if (actionBar != null) {
actionBar.setHomeButtonEnabled(true);
actionBar.setDisplayHomeAsUpEnabled(true);
}
// set up ActionBar
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
mPreferences = getSharedPreferences(PreferenceConstants.PREFERENCES, 0);
if (mPreferences.getBoolean(PreferenceConstants.HIDE_STATUS_BAR, false)) {

15
src/acr/browser/lightning/AdvancedSettingsActivity.java

@ -3,13 +3,14 @@ @@ -3,13 +3,14 @@
*/
package acr.browser.lightning;
import android.app.ActionBar;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
@ -21,7 +22,7 @@ import android.widget.LinearLayout; @@ -21,7 +22,7 @@ import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
public class AdvancedSettingsActivity extends Activity {
public class AdvancedSettingsActivity extends ActionBarActivity {
// mPreferences variables
private static final int API = android.os.Build.VERSION.SDK_INT;
@ -37,11 +38,11 @@ public class AdvancedSettingsActivity extends Activity { @@ -37,11 +38,11 @@ public class AdvancedSettingsActivity extends Activity {
super.onCreate(savedInstanceState);
setContentView(R.layout.advanced_settings);
ActionBar actionBar = getActionBar();
if (actionBar != null) {
actionBar.setHomeButtonEnabled(true);
actionBar.setDisplayHomeAsUpEnabled(true);
}
// set up ActionBar
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
mPreferences = getSharedPreferences(PreferenceConstants.PREFERENCES, 0);
if (mPreferences.getBoolean(PreferenceConstants.HIDE_STATUS_BAR, false)) {

17
src/acr/browser/lightning/BookmarkActivity.java

@ -4,8 +4,6 @@ import java.io.File; @@ -4,8 +4,6 @@ import java.io.File;
import java.util.Arrays;
import java.util.Comparator;
import android.app.ActionBar;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.Dialog;
@ -13,13 +11,15 @@ import android.content.DialogInterface; @@ -13,13 +11,15 @@ import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Environment;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;
import android.widget.TextView;
public class BookmarkActivity extends Activity implements OnClickListener {
public class BookmarkActivity extends ActionBarActivity implements OnClickListener {
private BookmarkManager mBookmarkManager;
private boolean mSystemBrowser;
@ -32,14 +32,13 @@ public class BookmarkActivity extends Activity implements OnClickListener { @@ -32,14 +32,13 @@ public class BookmarkActivity extends Activity implements OnClickListener {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.bookmark_activity);
ActionBar actionBar = getActionBar();
if (actionBar != null) {
actionBar.setHomeButtonEnabled(true);
actionBar.setDisplayHomeAsUpEnabled(true);
}
// set up ActionBar
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
LinearLayout exportBackup = (LinearLayout) findViewById(R.id.exportBackup);
LinearLayout importBackup = (LinearLayout) findViewById(R.id.importBackup);

16
src/acr/browser/lightning/DisplaySettingsActivity.java

@ -3,13 +3,13 @@ @@ -3,13 +3,13 @@
*/
package acr.browser.lightning;
import android.app.ActionBar;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
@ -19,7 +19,7 @@ import android.widget.CompoundButton; @@ -19,7 +19,7 @@ import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.RelativeLayout;
public class DisplaySettingsActivity extends Activity {
public class DisplaySettingsActivity extends ActionBarActivity {
// mPreferences variables
private static final int API = android.os.Build.VERSION.SDK_INT;
@ -33,11 +33,11 @@ public class DisplaySettingsActivity extends Activity { @@ -33,11 +33,11 @@ public class DisplaySettingsActivity extends Activity {
super.onCreate(savedInstanceState);
setContentView(R.layout.display_settings);
ActionBar actionBar = getActionBar();
if (actionBar != null) {
actionBar.setHomeButtonEnabled(true);
actionBar.setDisplayHomeAsUpEnabled(true);
}
// set up ActionBar
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
mPreferences = getSharedPreferences(PreferenceConstants.PREFERENCES, 0);
if (mPreferences.getBoolean(PreferenceConstants.HIDE_STATUS_BAR, false)) {

16
src/acr/browser/lightning/GeneralSettingsActivity.java

@ -3,15 +3,15 @@ @@ -3,15 +3,15 @@
*/
package acr.browser.lightning;
import android.app.ActionBar;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnCancelListener;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Environment;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.util.TypedValue;
import android.view.MenuItem;
@ -26,7 +26,7 @@ import android.widget.LinearLayout; @@ -26,7 +26,7 @@ import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
public class GeneralSettingsActivity extends Activity {
public class GeneralSettingsActivity extends ActionBarActivity {
// mPreferences variables
private static final int API = android.os.Build.VERSION.SDK_INT;
@ -47,11 +47,11 @@ public class GeneralSettingsActivity extends Activity { @@ -47,11 +47,11 @@ public class GeneralSettingsActivity extends Activity {
super.onCreate(savedInstanceState);
setContentView(R.layout.general_settings);
ActionBar actionBar = getActionBar();
if (actionBar != null) {
actionBar.setHomeButtonEnabled(true);
actionBar.setDisplayHomeAsUpEnabled(true);
}
// set up ActionBar
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
mPreferences = getSharedPreferences(PreferenceConstants.PREFERENCES, 0);
if (mPreferences.getBoolean(PreferenceConstants.HIDE_STATUS_BAR, false)) {

16
src/acr/browser/lightning/PrivacySettingsActivity.java

@ -3,8 +3,6 @@ @@ -3,8 +3,6 @@
*/
package acr.browser.lightning;
import android.app.ActionBar;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
@ -13,6 +11,8 @@ import android.os.Bundle; @@ -13,6 +11,8 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.provider.Browser;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
@ -24,7 +24,7 @@ import android.widget.CompoundButton.OnCheckedChangeListener; @@ -24,7 +24,7 @@ import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.RelativeLayout;
import android.widget.TextView;
public class PrivacySettingsActivity extends Activity {
public class PrivacySettingsActivity extends ActionBarActivity {
// mPreferences variables
private static final int API = android.os.Build.VERSION.SDK_INT;
@ -40,11 +40,11 @@ public class PrivacySettingsActivity extends Activity { @@ -40,11 +40,11 @@ public class PrivacySettingsActivity extends Activity {
super.onCreate(savedInstanceState);
setContentView(R.layout.privacy_settings);
ActionBar actionBar = getActionBar();
if (actionBar != null) {
actionBar.setHomeButtonEnabled(true);
actionBar.setDisplayHomeAsUpEnabled(true);
}
// set up ActionBar
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
mPreferences = getSharedPreferences(PreferenceConstants.PREFERENCES, 0);
if (mPreferences.getBoolean(PreferenceConstants.HIDE_STATUS_BAR, false)) {

17
src/acr/browser/lightning/SettingsActivity.java

@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
package acr.browser.lightning;
import android.annotation.SuppressLint;
import android.app.ActionBar;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
@ -16,6 +15,8 @@ import android.content.pm.ApplicationInfo; @@ -16,6 +15,8 @@ import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
@ -28,7 +29,7 @@ import android.widget.RelativeLayout; @@ -28,7 +29,7 @@ import android.widget.RelativeLayout;
import android.widget.Switch;
import info.guardianproject.onionkit.ui.OrbotHelper;
public class SettingsActivity extends Activity {
public class SettingsActivity extends ActionBarActivity {
private static int API = android.os.Build.VERSION.SDK_INT;
private SharedPreferences.Editor mEditPrefs;
@ -53,13 +54,13 @@ public class SettingsActivity extends Activity { @@ -53,13 +54,13 @@ public class SettingsActivity extends Activity {
@SuppressLint("NewApi")
public void init() {
// mPreferences storage
ActionBar actionBar = getActionBar();
if (actionBar != null) {
actionBar.setHomeButtonEnabled(true);
actionBar.setDisplayHomeAsUpEnabled(true);
}
// set up ActionBar
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
// mPreferences storage
mPreferences = getSharedPreferences(PreferenceConstants.PREFERENCES, 0);
if (mPreferences.getBoolean(PreferenceConstants.HIDE_STATUS_BAR, false)) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,

Loading…
Cancel
Save