minor updates for ActionBarSherlock support
This commit is contained in:
parent
15ce48cf10
commit
46bf5dd6be
|
@ -22,31 +22,42 @@
|
||||||
<item android:id="@+id/menu_start"
|
<item android:id="@+id/menu_start"
|
||||||
android:title="@string/menu_start"
|
android:title="@string/menu_start"
|
||||||
android:icon="@drawable/ic_action_start"
|
android:icon="@drawable/ic_action_start"
|
||||||
|
android:showAsAction="ifRoom"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<item android:id="@+id/menu_settings"
|
<item android:id="@+id/menu_settings"
|
||||||
android:title="@string/menu_settings"
|
android:title="@string/menu_settings"
|
||||||
android:icon="@drawable/ic_action_settings"
|
android:icon="@drawable/ic_action_settings"
|
||||||
|
android:showAsAction="always"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<item android:id="@+id/menu_verify"
|
<item android:id="@+id/menu_verify"
|
||||||
android:title="@string/menu_verify"
|
android:title="@string/menu_verify"
|
||||||
android:icon="@drawable/ic_action_browse"
|
android:icon="@drawable/ic_action_browse"
|
||||||
|
android:showAsAction="always"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<item android:id="@+id/menu_about"
|
<item android:id="@+id/menu_about"
|
||||||
android:title="@string/menu_about"
|
android:title="@string/menu_about"
|
||||||
android:icon="@drawable/ic_menu_about"
|
android:icon="@drawable/ic_menu_about"
|
||||||
|
android:showAsAction="ifRoom"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<item android:id="@+id/menu_wizard"
|
<item android:id="@+id/menu_wizard"
|
||||||
android:title="@string/menu_wizard"
|
android:title="@string/menu_wizard"
|
||||||
android:icon="@drawable/ic_menu_goto"
|
android:icon="@drawable/ic_menu_goto"
|
||||||
|
android:showAsAction="ifRoom"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<item android:id="@+id/menu_exit"
|
<item android:id="@+id/menu_exit"
|
||||||
android:title="@string/menu_exit"
|
android:title="@string/menu_exit"
|
||||||
android:icon="@drawable/ic_menu_exit"
|
android:icon="@drawable/ic_menu_exit"
|
||||||
|
android:showAsAction="ifRoom"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</menu>
|
</menu>
|
||||||
|
|
|
@ -12,7 +12,6 @@ import org.torproject.android.settings.ProcessSettingsAsyncTask;
|
||||||
import org.torproject.android.settings.SettingsPreferences;
|
import org.torproject.android.settings.SettingsPreferences;
|
||||||
import org.torproject.android.wizard.ChooseLocaleWizardActivity;
|
import org.torproject.android.wizard.ChooseLocaleWizardActivity;
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.NotificationManager;
|
import android.app.NotificationManager;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
|
@ -36,9 +35,6 @@ import android.text.Layout;
|
||||||
import android.text.method.ScrollingMovementMethod;
|
import android.text.method.ScrollingMovementMethod;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
|
||||||
import android.view.MenuInflater;
|
|
||||||
import android.view.MenuItem;
|
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnLongClickListener;
|
import android.view.View.OnLongClickListener;
|
||||||
|
@ -49,7 +45,13 @@ import android.widget.SlidingDrawer;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
public class Orbot extends Activity implements TorConstants, OnLongClickListener
|
import com.actionbarsherlock.app.SherlockActivity;
|
||||||
|
import com.actionbarsherlock.view.Menu;
|
||||||
|
import com.actionbarsherlock.view.MenuInflater;
|
||||||
|
import com.actionbarsherlock.view.MenuItem;
|
||||||
|
|
||||||
|
|
||||||
|
public class Orbot extends SherlockActivity implements TorConstants, OnLongClickListener
|
||||||
{
|
{
|
||||||
/* Useful UI bits */
|
/* Useful UI bits */
|
||||||
private TextView lblStatus = null; //the main text display widget
|
private TextView lblStatus = null; //the main text display widget
|
||||||
|
@ -161,9 +163,10 @@ public class Orbot extends Activity implements TorConstants, OnLongClickListener
|
||||||
* Create the UI Options Menu (non-Javadoc)
|
* Create the UI Options Menu (non-Javadoc)
|
||||||
* @see android.app.Activity#onCreateOptionsMenu(android.view.Menu)
|
* @see android.app.Activity#onCreateOptionsMenu(android.view.Menu)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
super.onCreateOptionsMenu(menu);
|
super.onCreateOptionsMenu(menu);
|
||||||
MenuInflater inflater = getMenuInflater();
|
MenuInflater inflater = getSupportMenuInflater();
|
||||||
inflater.inflate(R.menu.main, menu);
|
inflater.inflate(R.menu.main, menu);
|
||||||
|
|
||||||
mItemOnOff = menu.getItem(0);
|
mItemOnOff = menu.getItem(0);
|
||||||
|
|
|
@ -11,6 +11,8 @@ import org.torproject.android.TorConstants;
|
||||||
import org.torproject.android.service.TorServiceUtils;
|
import org.torproject.android.service.TorServiceUtils;
|
||||||
import org.torproject.android.service.TorTransProxy;
|
import org.torproject.android.service.TorTransProxy;
|
||||||
|
|
||||||
|
import com.actionbarsherlock.app.SherlockPreferenceActivity;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.SharedPreferences.Editor;
|
import android.content.SharedPreferences.Editor;
|
||||||
|
@ -27,7 +29,7 @@ import android.widget.Toast;
|
||||||
|
|
||||||
|
|
||||||
public class SettingsPreferences
|
public class SettingsPreferences
|
||||||
extends PreferenceActivity implements OnPreferenceClickListener {
|
extends SherlockPreferenceActivity implements OnPreferenceClickListener {
|
||||||
|
|
||||||
private CheckBoxPreference prefCBTransProxy = null;
|
private CheckBoxPreference prefCBTransProxy = null;
|
||||||
private CheckBoxPreference prefcBTransProxyAll = null;
|
private CheckBoxPreference prefcBTransProxyAll = null;
|
||||||
|
|
Loading…
Reference in New Issue