Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/org/adblockplus/android/Preferences.java

Issue 9316018: ABP/Android Holo theme (Closed)
Patch Set: Created Feb. 1, 2013, 7:55 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/org/adblockplus/android/Preferences.java
===================================================================
--- a/src/org/adblockplus/android/Preferences.java
+++ b/src/org/adblockplus/android/Preferences.java
@@ -46,13 +46,14 @@
import android.preference.PreferenceManager;
import android.text.format.DateFormat;
import android.util.Log;
-import android.view.Menu;
-import android.view.MenuInflater;
-import android.view.MenuItem;
import android.view.View;
-import android.view.Window;
import android.widget.TextView;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuInflater;
+import com.actionbarsherlock.view.MenuItem;
+import com.actionbarsherlock.view.Window;
+
/**
* Main settings UI.
*/
@@ -73,8 +74,6 @@
@Override
public void onCreate(Bundle savedInstanceState)
{
- requestWindowFeature(Window.FEATURE_NO_TITLE);
-
super.onCreate(savedInstanceState);
PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
@@ -242,7 +241,7 @@
@Override
public boolean onCreateOptionsMenu(Menu menu)
{
- MenuInflater inflater = getMenuInflater();
+ MenuInflater inflater = getSupportMenuInflater();
inflater.inflate(R.menu.menu_preferences, menu);
return true;
}
@@ -252,6 +251,14 @@
{
switch (item.getItemId())
{
+ case R.id.menu_help:
+ Uri uri = Uri.parse(getString(R.string.configuring_url));
+ Intent intent = new Intent(Intent.ACTION_VIEW, uri);
+ startActivity(intent);
+ return true;
+ case R.id.menu_about:
+ showDialog(ABOUT_DIALOG);
+ return true;
case R.id.menu_advanced:
startActivity(new Intent(this, AdvancedPreferences.class));
return true;
@@ -324,24 +331,6 @@
}
}
- /**
- * Redirects user to configuration URL.
- */
- public void onHelp(View view)
- {
- Uri uri = Uri.parse(getString(R.string.configuring_url));
- Intent intent = new Intent(Intent.ACTION_VIEW, uri);
- startActivity(intent);
- }
-
- /**
- * Shows about dialog.
- */
- public void onAbout(View view)
- {
- showDialog(ABOUT_DIALOG);
- }
-
@Override
protected Dialog onCreateDialog(int id)
{

Powered by Google App Engine
This is Rietveld