Switch from ActionBarSherlock to ActionBarCompat

This commit is contained in:
Dominik Schürmann 2014-02-02 14:13:09 +01:00
parent f916c8f5af
commit 6eaf45940e
481 changed files with 155 additions and 38230 deletions

View File

@ -2,7 +2,7 @@ apply plugin: 'android'
dependencies { dependencies {
compile 'com.android.support:support-v4:19.0.1' compile 'com.android.support:support-v4:19.0.1'
compile project(':libraries:ActionBarSherlock') compile 'com.android.support:appcompat-v7:19.0.1'
compile project(':libraries:HtmlTextView') compile project(':libraries:HtmlTextView')
compile project(':libraries:StickyListHeaders:library') compile project(':libraries:StickyListHeaders:library')
compile project(':libraries:AndroidBootstrap') compile project(':libraries:AndroidBootstrap')

View File

@ -3,7 +3,7 @@
package="org.sufficientlysecure.keychain" package="org.sufficientlysecure.keychain"
android:installLocation="auto" android:installLocation="auto"
android:versionCode="22000" android:versionCode="22000"
android:versionName="2.2" > android:versionName="2.2">
<!-- <!--
General remarks General remarks
@ -56,13 +56,13 @@
android:allowBackup="false" android:allowBackup="false"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:icon="@drawable/icon" android:icon="@drawable/icon"
android:label="@string/app_name" android:theme="@style/Theme.AppCompat.Light"
android:theme="@style/Theme.Sherlock.Light" > android:label="@string/app_name">
<activity <activity
android:name=".ui.KeyListPublicActivity" android:name=".ui.KeyListPublicActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard" android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/app_name" android:label="@string/app_name"
android:launchMode="singleTop" > android:launchMode="singleTop">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@ -82,7 +82,7 @@
android:name=".ui.KeyListSecretActivity" android:name=".ui.KeyListSecretActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard" android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/title_manage_secret_keys" android:label="@string/title_manage_secret_keys"
android:launchMode="singleTop" > android:launchMode="singleTop">
<!-- <intent-filter> --> <!-- <intent-filter> -->
<!-- <action android:name="android.intent.action.SEARCH" /> --> <!-- <action android:name="android.intent.action.SEARCH" /> -->
@ -102,7 +102,7 @@
android:name=".ui.ViewKeyActivity" android:name=".ui.ViewKeyActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard" android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/title_key_details" android:label="@string/title_key_details"
android:parentActivityName=".ui.KeyListPublicActivity" > android:parentActivityName=".ui.KeyListPublicActivity">
<meta-data <meta-data
android:name="android.support.PARENT_ACTIVITY" android:name="android.support.PARENT_ACTIVITY"
android:value=".ui.KeyListPublicActivity" /> android:value=".ui.KeyListPublicActivity" />
@ -111,7 +111,7 @@
android:name=".ui.ViewKeyActivityJB" android:name=".ui.ViewKeyActivityJB"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard" android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/title_key_details" android:label="@string/title_key_details"
android:parentActivityName=".ui.KeyListPublicActivity" > android:parentActivityName=".ui.KeyListPublicActivity">
<meta-data <meta-data
android:name="android.support.PARENT_ACTIVITY" android:name="android.support.PARENT_ACTIVITY"
android:value=".ui.KeyListPublicActivity" /> android:value=".ui.KeyListPublicActivity" />
@ -121,7 +121,7 @@
android:configChanges="orientation|screenSize|keyboardHidden|keyboard" android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/title_select_recipients" android:label="@string/title_select_recipients"
android:launchMode="singleTop" android:launchMode="singleTop"
android:uiOptions="splitActionBarWhenNarrow" > android:uiOptions="splitActionBarWhenNarrow">
<!-- <intent-filter> --> <!-- <intent-filter> -->
<!-- <action android:name="android.intent.action.SEARCH" /> --> <!-- <action android:name="android.intent.action.SEARCH" /> -->
@ -136,7 +136,7 @@
android:name=".ui.SelectSecretKeyActivity" android:name=".ui.SelectSecretKeyActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard" android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/title_select_secret_key" android:label="@string/title_select_secret_key"
android:launchMode="singleTop" > android:launchMode="singleTop">
<!-- <intent-filter> --> <!-- <intent-filter> -->
<!-- <action android:name="android.intent.action.SEARCH" /> --> <!-- <action android:name="android.intent.action.SEARCH" /> -->
@ -152,7 +152,7 @@
android:configChanges="orientation|screenSize|keyboardHidden|keyboard" android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/title_encrypt" android:label="@string/title_encrypt"
android:uiOptions="splitActionBarWhenNarrow" android:uiOptions="splitActionBarWhenNarrow"
android:windowSoftInputMode="stateHidden" > android:windowSoftInputMode="stateHidden">
<!-- Keychain's own Actions --> <!-- Keychain's own Actions -->
<intent-filter> <intent-filter>
@ -163,7 +163,7 @@
<data android:mimeType="*/*" /> <data android:mimeType="*/*" />
</intent-filter> </intent-filter>
<!-- Android's Send Action --> <!-- Android's Send Action -->
<intent-filter android:label="@string/intent_send_encrypt" > <intent-filter android:label="@string/intent_send_encrypt">
<action android:name="android.intent.action.SEND" /> <action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
@ -176,7 +176,7 @@
android:configChanges="orientation|screenSize|keyboardHidden|keyboard" android:configChanges="orientation|screenSize|keyboardHidden|keyboard"
android:label="@string/title_decrypt" android:label="@string/title_decrypt"
android:uiOptions="splitActionBarWhenNarrow" android:uiOptions="splitActionBarWhenNarrow"
android:windowSoftInputMode="stateHidden" > android:windowSoftInputMode="stateHidden">
<!-- Keychain's own Actions --> <!-- Keychain's own Actions -->
<intent-filter> <intent-filter>
@ -187,7 +187,7 @@
<data android:mimeType="*/*" /> <data android:mimeType="*/*" />
</intent-filter> </intent-filter>
<!-- Android's Send Action --> <!-- Android's Send Action -->
<intent-filter android:label="@string/intent_send_decrypt" > <intent-filter android:label="@string/intent_send_decrypt">
<action android:name="android.intent.action.SEND" /> <action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
@ -195,7 +195,7 @@
<data android:mimeType="*/*" /> <data android:mimeType="*/*" />
</intent-filter> </intent-filter>
<!-- Linking "Decrypt" to file types --> <!-- Linking "Decrypt" to file types -->
<intent-filter android:label="@string/intent_decrypt_file" > <intent-filter android:label="@string/intent_decrypt_file">
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
@ -216,7 +216,7 @@
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.gpg" /> <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.gpg" />
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.gpg" /> <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.gpg" />
</intent-filter> </intent-filter>
<intent-filter android:label="@string/intent_decrypt_file" > <intent-filter android:label="@string/intent_decrypt_file">
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
@ -260,7 +260,7 @@
android:name=".ui.ImportKeysActivity" android:name=".ui.ImportKeysActivity"
android:label="@string/title_import_keys" android:label="@string/title_import_keys"
android:launchMode="singleTop" android:launchMode="singleTop"
android:windowSoftInputMode="stateHidden" > android:windowSoftInputMode="stateHidden">
<!-- Handle URIs with fingerprints when scanning directly from Barcode Scanner --> <!-- Handle URIs with fingerprints when scanning directly from Barcode Scanner -->
<intent-filter> <intent-filter>
@ -285,7 +285,7 @@
<data android:mimeType="application/pgp-keys" /> <data android:mimeType="application/pgp-keys" />
</intent-filter> </intent-filter>
<!-- Keychain's own Actions --> <!-- Keychain's own Actions -->
<intent-filter android:label="@string/intent_import_key" > <intent-filter android:label="@string/intent_import_key">
<action android:name="org.sufficientlysecure.keychain.action.IMPORT_KEY" /> <action android:name="org.sufficientlysecure.keychain.action.IMPORT_KEY" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
@ -293,14 +293,14 @@
<data android:mimeType="*/*" /> <data android:mimeType="*/*" />
</intent-filter> </intent-filter>
<!-- IMPORT again without mimeType to also allow data only without filename --> <!-- IMPORT again without mimeType to also allow data only without filename -->
<intent-filter android:label="@string/intent_import_key" > <intent-filter android:label="@string/intent_import_key">
<action android:name="org.sufficientlysecure.keychain.action.IMPORT_KEY" /> <action android:name="org.sufficientlysecure.keychain.action.IMPORT_KEY" />
<action android:name="org.sufficientlysecure.keychain.action.IMPORT_KEY_FROM_QR_CODE" /> <action android:name="org.sufficientlysecure.keychain.action.IMPORT_KEY_FROM_QR_CODE" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
</intent-filter> </intent-filter>
<!-- Linking "Import key" to file types --> <!-- Linking "Import key" to file types -->
<intent-filter android:label="@string/intent_import_key" > <intent-filter android:label="@string/intent_import_key">
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
@ -320,7 +320,7 @@
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.gpg" /> <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.gpg" />
<data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.gpg" /> <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.gpg" />
</intent-filter> </intent-filter>
<intent-filter android:label="@string/intent_import_key" > <intent-filter android:label="@string/intent_import_key">
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
@ -383,7 +383,7 @@
android:name="org.sufficientlysecure.keychain.service.remote.OpenPgpService" android:name="org.sufficientlysecure.keychain.service.remote.OpenPgpService"
android:enabled="true" android:enabled="true"
android:exported="true" android:exported="true"
android:process=":remote_api" > android:process=":remote_api">
<intent-filter> <intent-filter>
<action android:name="org.openintents.openpgp.IOpenPgpService" /> <action android:name="org.openintents.openpgp.IOpenPgpService" />
</intent-filter> </intent-filter>
@ -398,7 +398,7 @@
android:name="org.sufficientlysecure.keychain.service.remote.ExtendedApiService" android:name="org.sufficientlysecure.keychain.service.remote.ExtendedApiService"
android:enabled="true" android:enabled="true"
android:exported="true" android:exported="true"
android:process=":remote_api" > android:process=":remote_api">
<intent-filter> <intent-filter>
<action android:name="org.sufficientlysecure.keychain.service.remote.IExtendedApiService" /> <action android:name="org.sufficientlysecure.keychain.service.remote.IExtendedApiService" />
</intent-filter> </intent-filter>

View File

@ -17,19 +17,18 @@
package org.sufficientlysecure.keychain.compatibility; package org.sufficientlysecure.keychain.compatibility;
import android.support.v4.app.ListFragment;
import android.view.View; import android.view.View;
import android.widget.ListView; import android.widget.ListView;
import com.actionbarsherlock.app.SherlockListFragment;
/** /**
* Bug on Android >= 4.1 * Bug on Android >= 4.1
* * <p/>
* http://code.google.com/p/android/issues/detail?id=35885 * http://code.google.com/p/android/issues/detail?id=35885
* * <p/>
* Items are not checked in layout * Items are not checked in layout
*/ */
public class ListFragmentWorkaround extends SherlockListFragment { public class ListFragmentWorkaround extends ListFragment {
@Override @Override
public void onListItemClick(ListView l, View v, int position, long id) { public void onListItemClick(ListView l, View v, int position, long id) {

View File

@ -22,15 +22,14 @@ import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.util.Log; import org.sufficientlysecure.keychain.util.Log;
import android.app.Activity; import android.app.Activity;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.widget.TextView; import android.widget.TextView;
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockFragmentActivity;
public class ActionBarHelper { public class ActionBarHelper {
/** /**
@ -38,7 +37,7 @@ public class ActionBarHelper {
* *
* @param activity * @param activity
*/ */
public static void setBackButton(SherlockFragmentActivity activity) { public static void setBackButton(ActionBarActivity activity) {
// set actionbar without home button if called from another app // set actionbar without home button if called from another app
final ActionBar actionBar = activity.getSupportActionBar(); final ActionBar actionBar = activity.getSupportActionBar();
Log.d(Constants.TAG, "calling package (only set when using startActivityForResult)=" Log.d(Constants.TAG, "calling package (only set when using startActivityForResult)="

View File

@ -34,17 +34,16 @@ import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Message; import android.os.Message;
import android.os.Messenger; import android.os.Messenger;
import android.support.v7.app.ActionBarActivity;
import android.widget.Toast; import android.widget.Toast;
import com.actionbarsherlock.app.SherlockFragmentActivity;
public class ExportHelper { public class ExportHelper {
protected FileDialogFragment mFileDialog; protected FileDialogFragment mFileDialog;
protected String mExportFilename; protected String mExportFilename;
SherlockFragmentActivity activity; ActionBarActivity activity;
public ExportHelper(SherlockFragmentActivity activity) { public ExportHelper(ActionBarActivity activity) {
super(); super();
this.activity = activity; this.activity = activity;
} }
@ -63,9 +62,6 @@ public class ExportHelper {
/** /**
* Show dialog where to export keys * Show dialog where to export keys
*
* @param keyRingMasterKeyId
* if -1 export all keys
*/ */
public void showExportKeysDialog(final Uri dataUri, final int keyType, public void showExportKeysDialog(final Uri dataUri, final int keyType,
final String exportFilename) { final String exportFilename) {
@ -115,9 +111,6 @@ public class ExportHelper {
/** /**
* Export keys * Export keys
*
* @param keyRingMasterKeyId
* if -1 export all keys
*/ */
public void exportKeys(Uri dataUri, int keyType) { public void exportKeys(Uri dataUri, int keyType) {
Log.d(Constants.TAG, "exportKeys started"); Log.d(Constants.TAG, "exportKeys started");

View File

@ -26,13 +26,12 @@ import org.sufficientlysecure.keychain.util.Log;
import android.content.Intent; import android.content.Intent;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View; import android.view.View;
import com.actionbarsherlock.app.SherlockFragmentActivity; public class AppSettingsActivity extends ActionBarActivity {
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
public class AppSettingsActivity extends SherlockFragmentActivity {
private Uri mAppUri; private Uri mAppUri;
private AppSettingsFragment mSettingsFragment; private AppSettingsFragment mSettingsFragment;
@ -71,7 +70,7 @@ public class AppSettingsActivity extends SherlockFragmentActivity {
@Override @Override
public boolean onCreateOptionsMenu(Menu menu) { public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu); super.onCreateOptionsMenu(menu);
getSupportMenuInflater().inflate(R.menu.api_app_settings, menu); getMenuInflater().inflate(R.menu.api_app_settings, menu);
return true; return true;
} }

View File

@ -26,6 +26,7 @@ import android.content.Intent;
import android.database.Cursor; import android.database.Cursor;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.support.v4.app.LoaderManager; import android.support.v4.app.LoaderManager;
import android.support.v4.content.CursorLoader; import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader; import android.support.v4.content.Loader;
@ -33,9 +34,7 @@ import android.view.View;
import android.widget.AdapterView; import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener; import android.widget.AdapterView.OnItemClickListener;
import com.actionbarsherlock.app.SherlockListFragment; public class RegisteredAppsListFragment extends ListFragment implements
public class RegisteredAppsListFragment extends SherlockListFragment implements
LoaderManager.LoaderCallbacks<Cursor> { LoaderManager.LoaderCallbacks<Cursor> {
// This is the Adapter being used to display the list's data. // This is the Adapter being used to display the list's data.

View File

@ -36,12 +36,11 @@ import android.os.Handler;
import android.os.Message; import android.os.Message;
import android.os.Messenger; import android.os.Messenger;
import android.os.RemoteException; import android.os.RemoteException;
import android.support.v7.app.ActionBarActivity;
import android.view.View; import android.view.View;
import android.widget.Toast; import android.widget.Toast;
import com.actionbarsherlock.app.SherlockFragmentActivity; public class RemoteServiceActivity extends ActionBarActivity {
public class RemoteServiceActivity extends SherlockFragmentActivity {
public static final String ACTION_REGISTER = Constants.INTENT_PREFIX + "API_ACTIVITY_REGISTER"; public static final String ACTION_REGISTER = Constants.INTENT_PREFIX + "API_ACTIVITY_REGISTER";
public static final String ACTION_CACHE_PASSPHRASE = Constants.INTENT_PREFIX public static final String ACTION_CACHE_PASSPHRASE = Constants.INTENT_PREFIX
@ -165,7 +164,8 @@ public class RemoteServiceActivity extends SherlockFragmentActivity {
finishHandled = true; finishHandled = true;
finish(); finish();
} }
}); }
);
setContentView(R.layout.api_app_register_activity); setContentView(R.layout.api_app_register_activity);
@ -248,7 +248,8 @@ public class RemoteServiceActivity extends SherlockFragmentActivity {
finishHandled = true; finishHandled = true;
finish(); finish();
} }
}); }
);
setContentView(R.layout.api_app_select_pub_keys_activity); setContentView(R.layout.api_app_select_pub_keys_activity);

View File

@ -55,6 +55,8 @@ import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Message; import android.os.Message;
import android.os.Messenger; import android.os.Messenger;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.view.animation.AnimationUtils; import android.view.animation.AnimationUtils;
@ -66,8 +68,6 @@ import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import android.widget.ViewFlipper; import android.widget.ViewFlipper;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
import com.beardedhen.androidbootstrap.BootstrapButton; import com.beardedhen.androidbootstrap.BootstrapButton;
@SuppressLint("NewApi") @SuppressLint("NewApi")
@ -126,7 +126,6 @@ public class DecryptActivity extends DrawerActivity {
@Override @Override
public boolean onCreateOptionsMenu(Menu menu) { public boolean onCreateOptionsMenu(Menu menu) {
if (mDecryptEnabled) { if (mDecryptEnabled) {
menu.add(1, Id.menu.option.decrypt, 0, mDecryptString).setShowAsAction( menu.add(1, Id.menu.option.decrypt, 0, mDecryptString).setShowAsAction(
MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT); MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT);

View File

@ -24,15 +24,14 @@ import android.app.Activity;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.graphics.drawable.Drawable;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.ActionBarDrawerToggle; import android.support.v4.app.ActionBarDrawerToggle;
import android.support.v4.view.GravityCompat; import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout; import android.support.v4.widget.DrawerLayout;
import android.view.ActionProvider; import android.support.v7.app.ActionBarActivity;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.SubMenu; import android.view.Menu;
import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.AdapterView; import android.widget.AdapterView;
@ -40,17 +39,9 @@ import android.widget.ArrayAdapter;
import android.widget.ListView; import android.widget.ListView;
import android.widget.TextView; import android.widget.TextView;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
import com.beardedhen.androidbootstrap.FontAwesomeText; import com.beardedhen.androidbootstrap.FontAwesomeText;
/** public class DrawerActivity extends ActionBarActivity {
* some fundamental ideas from https://github.com/tobykurien/SherlockNavigationDrawer
*
*
*/
public class DrawerActivity extends SherlockFragmentActivity {
private DrawerLayout mDrawerLayout; private DrawerLayout mDrawerLayout;
private ListView mDrawerList; private ListView mDrawerList;
private ActionBarDrawerToggle mDrawerToggle; private ActionBarDrawerToggle mDrawerToggle;
@ -138,10 +129,10 @@ public class DrawerActivity extends SherlockFragmentActivity {
} }
@Override @Override
public boolean onOptionsItemSelected(final MenuItem item) { public boolean onOptionsItemSelected(MenuItem item) {
// The action bar home/up action should open or close the drawer. // The action bar home/up action should open or close the drawer.
// ActionBarDrawerToggle will take care of this. // ActionBarDrawerToggle will take care of this.
if (mDrawerToggle.onOptionsItemSelected(getMenuItem(item))) { if (mDrawerToggle.onOptionsItemSelected(item)) {
return true; return true;
} }
@ -178,214 +169,6 @@ public class DrawerActivity extends SherlockFragmentActivity {
// } // }
} }
private android.view.MenuItem getMenuItem(final MenuItem item) {
return new android.view.MenuItem() {
@Override
public int getItemId() {
return item.getItemId();
}
public boolean isEnabled() {
return true;
}
@Override
public boolean collapseActionView() {
return false;
}
@Override
public boolean expandActionView() {
return false;
}
@Override
public ActionProvider getActionProvider() {
return null;
}
@Override
public View getActionView() {
return null;
}
@Override
public char getAlphabeticShortcut() {
return 0;
}
@Override
public int getGroupId() {
return 0;
}
@Override
public Drawable getIcon() {
return null;
}
@Override
public Intent getIntent() {
return null;
}
@Override
public ContextMenuInfo getMenuInfo() {
return null;
}
@Override
public char getNumericShortcut() {
return 0;
}
@Override
public int getOrder() {
return 0;
}
@Override
public SubMenu getSubMenu() {
return null;
}
@Override
public CharSequence getTitle() {
return null;
}
@Override
public CharSequence getTitleCondensed() {
return null;
}
@Override
public boolean hasSubMenu() {
return false;
}
@Override
public boolean isActionViewExpanded() {
return false;
}
@Override
public boolean isCheckable() {
return false;
}
@Override
public boolean isChecked() {
return false;
}
@Override
public boolean isVisible() {
return false;
}
@Override
public android.view.MenuItem setActionProvider(ActionProvider actionProvider) {
return null;
}
@Override
public android.view.MenuItem setActionView(View view) {
return null;
}
@Override
public android.view.MenuItem setActionView(int resId) {
return null;
}
@Override
public android.view.MenuItem setAlphabeticShortcut(char alphaChar) {
return null;
}
@Override
public android.view.MenuItem setCheckable(boolean checkable) {
return null;
}
@Override
public android.view.MenuItem setChecked(boolean checked) {
return null;
}
@Override
public android.view.MenuItem setEnabled(boolean enabled) {
return null;
}
@Override
public android.view.MenuItem setIcon(Drawable icon) {
return null;
}
@Override
public android.view.MenuItem setIcon(int iconRes) {
return null;
}
@Override
public android.view.MenuItem setIntent(Intent intent) {
return null;
}
@Override
public android.view.MenuItem setNumericShortcut(char numericChar) {
return null;
}
@Override
public android.view.MenuItem setOnActionExpandListener(OnActionExpandListener listener) {
return null;
}
@Override
public android.view.MenuItem setOnMenuItemClickListener(
OnMenuItemClickListener menuItemClickListener) {
return null;
}
@Override
public android.view.MenuItem setShortcut(char numericChar, char alphaChar) {
return null;
}
@Override
public void setShowAsAction(int actionEnum) {
}
@Override
public android.view.MenuItem setShowAsActionFlags(int actionEnum) {
return null;
}
@Override
public android.view.MenuItem setTitle(CharSequence title) {
return null;
}
@Override
public android.view.MenuItem setTitle(int title) {
return null;
}
@Override
public android.view.MenuItem setTitleCondensed(CharSequence title) {
return null;
}
@Override
public android.view.MenuItem setVisible(boolean visible) {
return null;
}
};
}
/* The click listener for ListView in the navigation drawer */ /* The click listener for ListView in the navigation drawer */
private class DrawerItemClickListener implements ListView.OnItemClickListener { private class DrawerItemClickListener implements ListView.OnItemClickListener {
@Override @Override

View File

@ -18,9 +18,7 @@
package org.sufficientlysecure.keychain.ui; package org.sufficientlysecure.keychain.ui;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import java.util.Iterator;
import java.util.Vector; import java.util.Vector;
import org.spongycastle.openpgp.PGPSecretKey; import org.spongycastle.openpgp.PGPSecretKey;
@ -54,7 +52,10 @@ import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Message; import android.os.Message;
import android.os.Messenger; import android.os.Messenger;
import android.support.v7.app.ActionBarActivity;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -64,12 +65,9 @@ import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.Toast; import android.widget.Toast;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
import com.beardedhen.androidbootstrap.BootstrapButton; import com.beardedhen.androidbootstrap.BootstrapButton;
public class EditKeyActivity extends SherlockFragmentActivity { public class EditKeyActivity extends ActionBarActivity {
// Actions for internal use only: // Actions for internal use only:
public static final String ACTION_CREATE_KEY = Constants.INTENT_PREFIX + "CREATE_KEY"; public static final String ACTION_CREATE_KEY = Constants.INTENT_PREFIX + "CREATE_KEY";
@ -315,7 +313,7 @@ public class EditKeyActivity extends SherlockFragmentActivity {
@Override @Override
public boolean onCreateOptionsMenu(Menu menu) { public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu); super.onCreateOptionsMenu(menu);
getSupportMenuInflater().inflate(R.menu.key_edit, menu); getMenuInflater().inflate(R.menu.key_edit, menu);
return true; return true;
} }

View File

@ -51,6 +51,8 @@ import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Message; import android.os.Message;
import android.os.Messenger; import android.os.Messenger;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.view.animation.AnimationUtils; import android.view.animation.AnimationUtils;
@ -63,8 +65,6 @@ import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import android.widget.ViewFlipper; import android.widget.ViewFlipper;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
import com.beardedhen.androidbootstrap.BootstrapButton; import com.beardedhen.androidbootstrap.BootstrapButton;
public class EncryptActivity extends DrawerActivity { public class EncryptActivity extends DrawerActivity {

View File

@ -28,13 +28,11 @@ import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.FragmentTransaction; import android.support.v4.app.FragmentTransaction;
import android.support.v4.view.ViewPager; import android.support.v4.view.ViewPager;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.widget.TextView; import android.widget.TextView;
import com.actionbarsherlock.app.ActionBar; public class HelpActivity extends ActionBarActivity {
import com.actionbarsherlock.app.ActionBar.Tab;
import com.actionbarsherlock.app.SherlockFragmentActivity;
public class HelpActivity extends SherlockFragmentActivity {
public static final String EXTRA_SELECTED_TAB = "selectedTab"; public static final String EXTRA_SELECTED_TAB = "selectedTab";
ViewPager mViewPager; ViewPager mViewPager;
@ -100,7 +98,7 @@ public class HelpActivity extends SherlockFragmentActivity {
} }
} }
public TabsAdapter(SherlockFragmentActivity activity, ViewPager pager) { public TabsAdapter(ActionBarActivity activity, ViewPager pager) {
super(activity.getSupportFragmentManager()); super(activity.getSupportFragmentManager());
mContext = activity; mContext = activity;
mActionBar = activity.getSupportActionBar(); mActionBar = activity.getSupportActionBar();
@ -139,7 +137,7 @@ public class HelpActivity extends SherlockFragmentActivity {
public void onPageScrollStateChanged(int state) { public void onPageScrollStateChanged(int state) {
} }
public void onTabSelected(Tab tab, FragmentTransaction ft) { public void onTabSelected(ActionBar.Tab tab, FragmentTransaction ft) {
Object tag = tab.getTag(); Object tag = tab.getTag();
for (int i = 0; i < mTabs.size(); i++) { for (int i = 0; i < mTabs.size(); i++) {
if (mTabs.get(i) == tag) { if (mTabs.get(i) == tag) {
@ -148,10 +146,10 @@ public class HelpActivity extends SherlockFragmentActivity {
} }
} }
public void onTabUnselected(Tab tab, FragmentTransaction ft) { public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction ft) {
} }
public void onTabReselected(Tab tab, FragmentTransaction ft) { public void onTabReselected(ActionBar.Tab tab, FragmentTransaction ft) {
} }
} }
} }

View File

@ -26,14 +26,14 @@ import android.content.pm.PackageInfo;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException; import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.TextView; import android.widget.TextView;
import com.actionbarsherlock.app.SherlockFragment;
public class HelpFragmentAbout extends SherlockFragment { public class HelpFragmentAbout extends Fragment {
/** /**
* Workaround for Android Bug. See * Workaround for Android Bug. See

View File

@ -21,15 +21,14 @@ import org.sufficientlysecure.htmltextview.HtmlTextView;
import android.app.Activity; import android.app.Activity;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.TypedValue; import android.util.TypedValue;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ScrollView; import android.widget.ScrollView;
import com.actionbarsherlock.app.SherlockFragment; public class HelpFragmentHtml extends Fragment {
public class HelpFragmentHtml extends SherlockFragment {
private Activity mActivity; private Activity mActivity;
private int htmlFile; private int htmlFile;

View File

@ -44,16 +44,15 @@ import android.os.Messenger;
import android.os.Parcelable; import android.os.Parcelable;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction; import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.ActionBar;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.Toast; import android.widget.Toast;
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.ActionBar.OnNavigationListener;
import com.beardedhen.androidbootstrap.BootstrapButton; import com.beardedhen.androidbootstrap.BootstrapButton;
public class ImportKeysActivity extends DrawerActivity implements OnNavigationListener { public class ImportKeysActivity extends DrawerActivity implements ActionBar.OnNavigationListener {
public static final String ACTION_IMPORT_KEY = Constants.INTENT_PREFIX + "IMPORT_KEY"; public static final String ACTION_IMPORT_KEY = Constants.INTENT_PREFIX + "IMPORT_KEY";
public static final String ACTION_IMPORT_KEY_FROM_QR_CODE = Constants.INTENT_PREFIX public static final String ACTION_IMPORT_KEY_FROM_QR_CODE = Constants.INTENT_PREFIX
+ "IMPORT_KEY_FROM_QR_CODE"; + "IMPORT_KEY_FROM_QR_CODE";
@ -102,11 +101,11 @@ public class ImportKeysActivity extends DrawerActivity implements OnNavigationLi
// set drop down navigation // set drop down navigation
mNavigationStrings = getResources().getStringArray(R.array.import_action_list); mNavigationStrings = getResources().getStringArray(R.array.import_action_list);
Context context = getSupportActionBar().getThemedContext(); Context context = getSupportActionBar().getThemedContext();
ArrayAdapter<CharSequence> list = ArrayAdapter.createFromResource(context, ArrayAdapter<CharSequence> navigationAdapter = ArrayAdapter.createFromResource(context,
R.array.import_action_list, R.layout.sherlock_spinner_item); R.array.import_action_list, android.R.layout.simple_spinner_dropdown_item);
list.setDropDownViewResource(R.layout.sherlock_spinner_dropdown_item); // list.setDropDownViewResource(R.layout.sherlock_spinner_dropdown_item);
getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST); getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
getSupportActionBar().setListNavigationCallbacks(list, this); getSupportActionBar().setListNavigationCallbacks(navigationAdapter, this);
handleActions(savedInstanceState, getIntent()); handleActions(savedInstanceState, getIntent());
} }

View File

@ -37,15 +37,14 @@ import org.sufficientlysecure.keychain.util.Log;
import android.app.Activity; import android.app.Activity;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.support.v4.app.LoaderManager; import android.support.v4.app.LoaderManager;
import android.support.v4.content.Loader; import android.support.v4.content.Loader;
import android.view.View; import android.view.View;
import android.widget.ListView; import android.widget.ListView;
import android.widget.Toast; import android.widget.Toast;
import com.actionbarsherlock.app.SherlockListFragment; public class ImportKeysListFragment extends ListFragment implements
public class ImportKeysListFragment extends SherlockListFragment implements
LoaderManager.LoaderCallbacks<List<ImportKeysListEntry>> { LoaderManager.LoaderCallbacks<List<ImportKeysListEntry>> {
private static final String ARG_DATA_URI = "uri"; private static final String ARG_DATA_URI = "uri";
private static final String ARG_BYTES = "bytes"; private static final String ARG_BYTES = "bytes";

View File

@ -24,9 +24,8 @@ import org.sufficientlysecure.keychain.helper.ExportHelper;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.view.Menu;
import com.actionbarsherlock.view.Menu; import android.view.MenuItem;
import com.actionbarsherlock.view.MenuItem;
public class KeyListPublicActivity extends DrawerActivity { public class KeyListPublicActivity extends DrawerActivity {
@ -47,7 +46,7 @@ public class KeyListPublicActivity extends DrawerActivity {
@Override @Override
public boolean onCreateOptionsMenu(Menu menu) { public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu); super.onCreateOptionsMenu(menu);
getSupportMenuInflater().inflate(R.menu.key_list_public, menu); getMenuInflater().inflate(R.menu.key_list_public, menu);
return true; return true;
} }

View File

@ -24,9 +24,8 @@ import org.sufficientlysecure.keychain.helper.ExportHelper;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.view.Menu;
import com.actionbarsherlock.view.Menu; import android.view.MenuItem;
import com.actionbarsherlock.view.MenuItem;
public class KeyListSecretActivity extends DrawerActivity { public class KeyListSecretActivity extends DrawerActivity {
@ -47,7 +46,7 @@ public class KeyListSecretActivity extends DrawerActivity {
@Override @Override
public boolean onCreateOptionsMenu(Menu menu) { public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu); super.onCreateOptionsMenu(menu);
getSupportMenuInflater().inflate(R.menu.key_list_secret, menu); getMenuInflater().inflate(R.menu.key_list_secret, menu);
return true; return true;
} }

View File

@ -33,6 +33,7 @@ import android.database.Cursor;
import android.net.Uri; import android.net.Uri;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.support.v4.app.LoaderManager; import android.support.v4.app.LoaderManager;
import android.support.v4.content.CursorLoader; import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader; import android.support.v4.content.Loader;
@ -45,9 +46,7 @@ import android.widget.ListView;
import android.widget.AbsListView.MultiChoiceModeListener; import android.widget.AbsListView.MultiChoiceModeListener;
import android.widget.AdapterView.OnItemClickListener; import android.widget.AdapterView.OnItemClickListener;
import com.actionbarsherlock.app.SherlockListFragment; public class KeyListSecretFragment extends ListFragment implements
public class KeyListSecretFragment extends SherlockListFragment implements
LoaderManager.LoaderCallbacks<Cursor>, OnItemClickListener { LoaderManager.LoaderCallbacks<Cursor>, OnItemClickListener {
private KeyListSecretActivity mKeyListSecretActivity; private KeyListSecretActivity mKeyListSecretActivity;

View File

@ -28,12 +28,11 @@ import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.preference.CheckBoxPreference; import android.preference.CheckBoxPreference;
import android.preference.Preference; import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceScreen; import android.preference.PreferenceScreen;
import android.support.v7.app.ActionBarActivity;
import com.actionbarsherlock.app.ActionBar; public class PreferencesActivity extends PreferenceActivity {
import com.actionbarsherlock.app.SherlockPreferenceActivity;
public class PreferencesActivity extends SherlockPreferenceActivity {
private IntegerListPreference mPassPhraseCacheTtl = null; private IntegerListPreference mPassPhraseCacheTtl = null;
private IntegerListPreference mEncryptionAlgorithm = null; private IntegerListPreference mEncryptionAlgorithm = null;
private IntegerListPreference mHashAlgorithm = null; private IntegerListPreference mHashAlgorithm = null;
@ -49,10 +48,10 @@ public class PreferencesActivity extends SherlockPreferenceActivity {
mPreferences = Preferences.getPreferences(this); mPreferences = Preferences.getPreferences(this);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
final ActionBar actionBar = getSupportActionBar(); // final ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayShowTitleEnabled(true); // actionBar.setDisplayShowTitleEnabled(true);
actionBar.setDisplayHomeAsUpEnabled(false); // actionBar.setDisplayHomeAsUpEnabled(false);
actionBar.setHomeButtonEnabled(false); // actionBar.setHomeButtonEnabled(false);
addPreferencesFromResource(R.xml.preferences); addPreferencesFromResource(R.xml.preferences);

View File

@ -27,15 +27,14 @@ import org.sufficientlysecure.keychain.ui.widget.KeyServerEditor;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.TextView; import android.widget.TextView;
import com.actionbarsherlock.app.SherlockActivity; public class PreferencesKeyServerActivity extends ActionBarActivity implements OnClickListener,
public class PreferencesKeyServerActivity extends SherlockActivity implements OnClickListener,
EditorListener { EditorListener {
public static final String EXTRA_KEY_SERVERS = "key_servers"; public static final String EXTRA_KEY_SERVERS = "key_servers";

View File

@ -23,11 +23,10 @@ import org.sufficientlysecure.keychain.helper.ActionBarHelper;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View; import android.view.View;
import com.actionbarsherlock.app.SherlockFragmentActivity; public class SelectPublicKeyActivity extends ActionBarActivity {
public class SelectPublicKeyActivity extends SherlockFragmentActivity {
// Actions for internal use only: // Actions for internal use only:
public static final String ACTION_SELECT_PUBLIC_KEYS = Constants.INTENT_PREFIX public static final String ACTION_SELECT_PUBLIC_KEYS = Constants.INTENT_PREFIX

View File

@ -78,7 +78,7 @@ public class SelectPublicKeyFragment extends ListFragmentWorkaround implements
public void onActivityCreated(Bundle savedInstanceState) { public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState); super.onActivityCreated(savedInstanceState);
mActivity = getSherlockActivity(); mActivity = getActivity();
mListView = getListView(); mListView = getListView();
mListView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); mListView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);

View File

@ -22,12 +22,11 @@ import org.sufficientlysecure.keychain.R;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import com.actionbarsherlock.app.ActionBar; public class SelectSecretKeyActivity extends ActionBarActivity {
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.actionbarsherlock.view.Menu;
public class SelectSecretKeyActivity extends SherlockFragmentActivity {
// Actions for internal use only: // Actions for internal use only:
public static final String ACTION_SELECT_SECRET_KEY = Constants.INTENT_PREFIX public static final String ACTION_SELECT_SECRET_KEY = Constants.INTENT_PREFIX

View File

@ -31,6 +31,7 @@ import org.sufficientlysecure.keychain.ui.adapter.SelectKeyCursorAdapter;
import android.database.Cursor; import android.database.Cursor;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.support.v4.app.LoaderManager; import android.support.v4.app.LoaderManager;
import android.support.v4.content.CursorLoader; import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader; import android.support.v4.content.Loader;
@ -39,9 +40,7 @@ import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener; import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView; import android.widget.ListView;
import com.actionbarsherlock.app.SherlockListFragment; public class SelectSecretKeyFragment extends ListFragment implements
public class SelectSecretKeyFragment extends SherlockListFragment implements
LoaderManager.LoaderCallbacks<Cursor> { LoaderManager.LoaderCallbacks<Cursor> {
private SelectSecretKeyActivity mActivity; private SelectSecretKeyActivity mActivity;
@ -80,7 +79,7 @@ public class SelectSecretKeyFragment extends SherlockListFragment implements
public void onActivityCreated(Bundle savedInstanceState) { public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState); super.onActivityCreated(savedInstanceState);
mActivity = (SelectSecretKeyActivity) getSherlockActivity(); mActivity = (SelectSecretKeyActivity) getActivity();
mListView = getListView(); mListView = getListView();
mListView.setOnItemClickListener(new OnItemClickListener() { mListView.setOnItemClickListener(new OnItemClickListener() {
@ -116,9 +115,9 @@ public class SelectSecretKeyFragment extends SherlockListFragment implements
// sample only has one Loader, so we don't care about the ID. // sample only has one Loader, so we don't care about the ID.
Uri baseUri = KeyRings.buildSecretKeyRingsUri(); Uri baseUri = KeyRings.buildSecretKeyRingsUri();
String CapFilter = null; String capFilter = null;
if (mFilterCertify) { if (mFilterCertify) {
CapFilter = "(cert > 0)"; capFilter = "(cert > 0)";
} }
// These are the rows that we will retrieve. // These are the rows that we will retrieve.
@ -145,23 +144,11 @@ public class SelectSecretKeyFragment extends SherlockListFragment implements
+ "(valid_keys." + Keys.EXPIRY + " IS NULL OR valid_keys." + Keys.EXPIRY + "(valid_keys." + Keys.EXPIRY + " IS NULL OR valid_keys." + Keys.EXPIRY
+ " >= '" + now + "')) AS " + SelectKeyCursorAdapter.PROJECTION_ROW_VALID, }; + " >= '" + now + "')) AS " + SelectKeyCursorAdapter.PROJECTION_ROW_VALID, };
// if (searchString != null && searchString.trim().length() > 0) {
// String[] chunks = searchString.trim().split(" +");
// qb.appendWhere("EXISTS (SELECT tmp." + UserIds._ID + " FROM " + UserIds.TABLE_NAME
// + " AS tmp WHERE " + "tmp." + UserIds.KEY_ID + " = " + Keys.TABLE_NAME + "."
// + Keys._ID);
// for (int i = 0; i < chunks.length; ++i) {
// qb.appendWhere(" AND tmp." + UserIds.USER_ID + " LIKE ");
// qb.appendWhereEscapeString("%" + chunks[i] + "%");
// }
// qb.appendWhere(")");
// }
String orderBy = UserIds.USER_ID + " ASC"; String orderBy = UserIds.USER_ID + " ASC";
// Now create and return a CursorLoader that will take care of // Now create and return a CursorLoader that will take care of
// creating a Cursor for the data being displayed. // creating a Cursor for the data being displayed.
return new CursorLoader(getActivity(), baseUri, projection, CapFilter, null, orderBy); return new CursorLoader(getActivity(), baseUri, projection, capFilter, null, orderBy);
} }
@Override @Override

View File

@ -40,6 +40,8 @@ import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Message; import android.os.Message;
import android.os.Messenger; import android.os.Messenger;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
@ -49,14 +51,12 @@ import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.Spinner; import android.widget.Spinner;
import android.widget.Toast; import android.widget.Toast;
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.beardedhen.androidbootstrap.BootstrapButton; import com.beardedhen.androidbootstrap.BootstrapButton;
/** /**
* Signs the specified public key with the specified secret master key * Signs the specified public key with the specified secret master key
*/ */
public class SignKeyActivity extends SherlockFragmentActivity implements public class SignKeyActivity extends ActionBarActivity implements
SelectSecretKeyLayoutFragment.SelectSecretKeyCallback { SelectSecretKeyLayoutFragment.SelectSecretKeyCallback {
private BootstrapButton mSignButton; private BootstrapButton mSignButton;
private CheckBox mUploadKeyCheckbox; private CheckBox mUploadKeyCheckbox;

View File

@ -30,19 +30,19 @@ import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.os.Message; import android.os.Message;
import android.os.Messenger; import android.os.Messenger;
import android.support.v7.app.ActionBarActivity;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.Spinner; import android.widget.Spinner;
import android.widget.Toast; import android.widget.Toast;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.beardedhen.androidbootstrap.BootstrapButton; import com.beardedhen.androidbootstrap.BootstrapButton;
/** /**
* Sends the selected public key to a key server * Sends the selected public key to a key server
*/ */
public class UploadKeyActivity extends SherlockFragmentActivity { public class UploadKeyActivity extends ActionBarActivity {
private BootstrapButton mUploadButton; private BootstrapButton mUploadButton;
private Spinner mKeyServerSpinner; private Spinner mKeyServerSpinner;

View File

@ -47,19 +47,19 @@ import android.os.Message;
import android.support.v4.app.LoaderManager; import android.support.v4.app.LoaderManager;
import android.support.v4.content.CursorLoader; import android.support.v4.content.CursorLoader;
import android.support.v4.content.Loader; import android.support.v4.content.Loader;
import android.support.v7.app.ActionBarActivity;
import android.text.format.DateFormat; import android.text.format.DateFormat;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.widget.ListView; import android.widget.ListView;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
import com.beardedhen.androidbootstrap.BootstrapButton; import com.beardedhen.androidbootstrap.BootstrapButton;
public class ViewKeyActivity extends SherlockFragmentActivity implements public class ViewKeyActivity extends ActionBarActivity implements
LoaderManager.LoaderCallbacks<Cursor> { LoaderManager.LoaderCallbacks<Cursor> {
ExportHelper mExportHelper; ExportHelper mExportHelper;
@ -115,7 +115,7 @@ public class ViewKeyActivity extends SherlockFragmentActivity implements
@Override @Override
public boolean onCreateOptionsMenu(Menu menu) { public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu); super.onCreateOptionsMenu(menu);
getSupportMenuInflater().inflate(R.menu.key_view, menu); getMenuInflater().inflate(R.menu.key_view, menu);
return true; return true;
} }

View File

@ -29,12 +29,11 @@ import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.os.Message; import android.os.Message;
import android.os.Messenger; import android.os.Messenger;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentActivity;
import android.widget.Toast; import android.widget.Toast;
import com.actionbarsherlock.app.SherlockDialogFragment; public class DeleteFileDialogFragment extends DialogFragment {
public class DeleteFileDialogFragment extends SherlockDialogFragment {
private static final String ARG_DELETE_FILE = "delete_file"; private static final String ARG_DELETE_FILE = "delete_file";
/** /**

View File

@ -33,11 +33,10 @@ import android.os.Bundle;
import android.os.Message; import android.os.Message;
import android.os.Messenger; import android.os.Messenger;
import android.os.RemoteException; import android.os.RemoteException;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentActivity;
import com.actionbarsherlock.app.SherlockDialogFragment; public class DeleteKeyDialogFragment extends DialogFragment {
public class DeleteKeyDialogFragment extends SherlockDialogFragment {
private static final String ARG_MESSENGER = "messenger"; private static final String ARG_MESSENGER = "messenger";
private static final String ARG_DELETE_KEY_RING_ROW_IDS = "delete_file"; private static final String ARG_DELETE_KEY_RING_ROW_IDS = "delete_file";
private static final String ARG_KEY_TYPE = "key_type"; private static final String ARG_KEY_TYPE = "key_type";

View File

@ -32,15 +32,15 @@ import android.os.Bundle;
import android.os.Message; import android.os.Message;
import android.os.Messenger; import android.os.Messenger;
import android.os.RemoteException; import android.os.RemoteException;
import android.support.v4.app.DialogFragment;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.widget.CheckBox; import android.widget.CheckBox;
import android.widget.EditText; import android.widget.EditText;
import com.actionbarsherlock.app.SherlockDialogFragment;
import com.beardedhen.androidbootstrap.BootstrapButton; import com.beardedhen.androidbootstrap.BootstrapButton;
public class FileDialogFragment extends SherlockDialogFragment { public class FileDialogFragment extends DialogFragment {
private static final String ARG_MESSENGER = "messenger"; private static final String ARG_MESSENGER = "messenger";
private static final String ARG_TITLE = "title"; private static final String ARG_TITLE = "title";
private static final String ARG_MESSAGE = "message"; private static final String ARG_MESSAGE = "message";
@ -160,10 +160,6 @@ public class FileDialogFragment extends SherlockDialogFragment {
/** /**
* Updates filename in dialog, normally called in onActivityResult in activity using the * Updates filename in dialog, normally called in onActivityResult in activity using the
* FileDialog * FileDialog
*
* @param messageId
* @param progress
* @param max
*/ */
private void setFilename(String filename) { private void setFilename(String filename) {
AlertDialog dialog = (AlertDialog) getDialog(); AlertDialog dialog = (AlertDialog) getDialog();

View File

@ -34,11 +34,9 @@ import android.os.Bundle;
import android.os.Message; import android.os.Message;
import android.os.Messenger; import android.os.Messenger;
import android.os.RemoteException; import android.os.RemoteException;
import android.support.v4.app.DialogFragment;
import com.actionbarsherlock.app.SherlockDialogFragment; public class LookupUnknownKeyDialogFragment extends DialogFragment {
public class LookupUnknownKeyDialogFragment extends SherlockDialogFragment {
private static final String ARG_MESSENGER = "messenger"; private static final String ARG_MESSENGER = "messenger";
private static final String ARG_UNKNOWN_KEY_ID = "unknown_key_id"; private static final String ARG_UNKNOWN_KEY_ID = "unknown_key_id";

View File

@ -41,6 +41,7 @@ import android.os.Bundle;
import android.os.Message; import android.os.Message;
import android.os.Messenger; import android.os.Messenger;
import android.os.RemoteException; import android.os.RemoteException;
import android.support.v4.app.DialogFragment;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
@ -52,9 +53,7 @@ import android.widget.TextView;
import android.widget.TextView.OnEditorActionListener; import android.widget.TextView.OnEditorActionListener;
import android.widget.Toast; import android.widget.Toast;
import com.actionbarsherlock.app.SherlockDialogFragment; public class PassphraseDialogFragment extends DialogFragment implements OnEditorActionListener {
public class PassphraseDialogFragment extends SherlockDialogFragment implements OnEditorActionListener {
private static final String ARG_MESSENGER = "messenger"; private static final String ARG_MESSENGER = "messenger";
private static final String ARG_SECRET_KEY_ID = "secret_key_id"; private static final String ARG_SECRET_KEY_ID = "secret_key_id";

View File

@ -23,17 +23,16 @@ import android.app.ProgressDialog;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.DialogInterface.OnKeyListener; import android.content.DialogInterface.OnKeyListener;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.view.KeyEvent; import android.view.KeyEvent;
import com.actionbarsherlock.app.SherlockDialogFragment; public class ProgressDialogFragment extends DialogFragment {
public class ProgressDialogFragment extends SherlockDialogFragment {
private static final String ARG_MESSAGE_ID = "message_id"; private static final String ARG_MESSAGE_ID = "message_id";
private static final String ARG_STYLE = "style"; private static final String ARG_STYLE = "style";
/** /**
* Creates new instance of this fragment * Creates new instance of this fragment
* *
* @param id * @param id
* @return * @return
*/ */
@ -49,7 +48,7 @@ public class ProgressDialogFragment extends SherlockDialogFragment {
/** /**
* Updates progress of dialog * Updates progress of dialog
* *
* @param messageId * @param messageId
* @param progress * @param progress
* @param max * @param max
@ -60,7 +59,7 @@ public class ProgressDialogFragment extends SherlockDialogFragment {
/** /**
* Updates progress of dialog * Updates progress of dialog
* *
* @param messageId * @param messageId
* @param progress * @param progress
* @param max * @param max
@ -74,7 +73,7 @@ public class ProgressDialogFragment extends SherlockDialogFragment {
/** /**
* Updates progress of dialog * Updates progress of dialog
* *
* @param messageId * @param messageId
* @param progress * @param progress
* @param max * @param max

View File

@ -29,6 +29,7 @@ import android.os.Bundle;
import android.os.Message; import android.os.Message;
import android.os.Messenger; import android.os.Messenger;
import android.os.RemoteException; import android.os.RemoteException;
import android.support.v4.app.DialogFragment;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
@ -40,9 +41,7 @@ import android.widget.TextView;
import android.widget.TextView.OnEditorActionListener; import android.widget.TextView.OnEditorActionListener;
import android.widget.Toast; import android.widget.Toast;
import com.actionbarsherlock.app.SherlockDialogFragment; public class SetPassphraseDialogFragment extends DialogFragment implements OnEditorActionListener {
public class SetPassphraseDialogFragment extends SherlockDialogFragment implements OnEditorActionListener {
private static final String ARG_MESSENGER = "messenger"; private static final String ARG_MESSENGER = "messenger";
private static final String ARG_TITLE = "title"; private static final String ARG_TITLE = "title";

View File

@ -29,12 +29,11 @@ import android.nfc.NfcAdapter;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.provider.Settings; import android.provider.Settings;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentActivity;
import com.actionbarsherlock.app.SherlockDialogFragment;
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public class ShareNfcDialogFragment extends SherlockDialogFragment { public class ShareNfcDialogFragment extends DialogFragment {
/** /**
* Creates new instance of this fragment * Creates new instance of this fragment

View File

@ -31,15 +31,14 @@ import android.app.AlertDialog;
import android.app.Dialog; import android.app.Dialog;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import com.actionbarsherlock.app.SherlockDialogFragment; public class ShareQrCodeDialogFragment extends DialogFragment {
public class ShareQrCodeDialogFragment extends SherlockDialogFragment {
private static final String ARG_KEY_URI = "uri"; private static final String ARG_KEY_URI = "uri";
private static final String ARG_FINGERPRINT_ONLY = "fingerprint_only"; private static final String ARG_FINGERPRINT_ONLY = "fingerprint_only";

View File

@ -16,11 +16,9 @@
package org.sufficientlysecure.keychain.ui.widget; package org.sufficientlysecure.keychain.ui.widget;
import java.util.Iterator;
import java.util.Vector; import java.util.Vector;
import org.spongycastle.openpgp.PGPSecretKey; import org.spongycastle.openpgp.PGPSecretKey;
import org.spongycastle.openpgp.PGPSecretKeyRing;
import org.sufficientlysecure.keychain.Id; import org.sufficientlysecure.keychain.Id;
import org.sufficientlysecure.keychain.R; import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.pgp.PgpConversionHelper; import org.sufficientlysecure.keychain.pgp.PgpConversionHelper;
@ -39,6 +37,7 @@ import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.os.Message; import android.os.Message;
import android.os.Messenger; import android.os.Messenger;
import android.support.v7.app.ActionBarActivity;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
@ -49,7 +48,6 @@ import android.widget.LinearLayout;
import android.widget.Spinner; import android.widget.Spinner;
import android.widget.TextView; import android.widget.TextView;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.beardedhen.androidbootstrap.BootstrapButton; import com.beardedhen.androidbootstrap.BootstrapButton;
public class SectionView extends LinearLayout implements OnClickListener, EditorListener { public class SectionView extends LinearLayout implements OnClickListener, EditorListener {
@ -63,18 +61,18 @@ public class SectionView extends LinearLayout implements OnClickListener, Editor
private int mNewKeySize; private int mNewKeySize;
private boolean canEdit = true; private boolean canEdit = true;
private SherlockFragmentActivity mActivity; private ActionBarActivity mActivity;
private ProgressDialogFragment mGeneratingDialog; private ProgressDialogFragment mGeneratingDialog;
public SectionView(Context context) { public SectionView(Context context) {
super(context); super(context);
mActivity = (SherlockFragmentActivity) context; mActivity = (ActionBarActivity) context;
} }
public SectionView(Context context, AttributeSet attrs) { public SectionView(Context context, AttributeSet attrs) {
super(context, attrs); super(context, attrs);
mActivity = (SherlockFragmentActivity) context; mActivity = (ActionBarActivity) context;
} }
public ViewGroup getEditors() { public ViewGroup getEditors() {

View File

@ -17,9 +17,9 @@
<LinearLayout 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_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:divider="@drawable/abs__list_divider_holo_light"
android:dividerPadding="12dp" android:dividerPadding="12dp"
android:orientation="horizontal" android:orientation="horizontal"
android:divider="@drawable/abc_list_divider_holo_light"
android:showDividers="end" > android:showDividers="end" >
<include layout="@layout/actionbar_include_done_button" /> <include layout="@layout/actionbar_include_done_button" />

View File

@ -17,10 +17,10 @@
<LinearLayout 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_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:divider="@drawable/abs__list_divider_holo_light"
android:dividerPadding="12dp" android:dividerPadding="12dp"
android:divider="@drawable/abc_list_divider_holo_light"
android:orientation="horizontal" android:orientation="horizontal"
android:showDividers="middle" > android:showDividers="middle">
<include layout="@layout/actionbar_include_cancel_button" /> <include layout="@layout/actionbar_include_cancel_button" />

View File

@ -16,14 +16,13 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/actionbar_cancel" android:id="@+id/actionbar_cancel"
style="@style/Widget.Sherlock.ActionButton" style="@style/Widget.AppCompat.ActionButton"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" > android:layout_weight="1">
<TextView <TextView
android:id="@+id/actionbar_cancel_text" android:id="@+id/actionbar_cancel_text"
style="@style/Widget.Sherlock.ActionBar.TabText"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
@ -31,6 +30,7 @@
android:drawablePadding="8dp" android:drawablePadding="8dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:paddingRight="20dp" android:paddingRight="20dp"
style="@style/Widget.AppCompat.Light.ActionBar.TabText"
android:text="Cancel (set in-code!)" /> android:text="Cancel (set in-code!)" />
</FrameLayout> </FrameLayout>

View File

@ -16,14 +16,13 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/actionbar_done" android:id="@+id/actionbar_done"
style="@style/Widget.Sherlock.ActionButton" style="@style/Widget.AppCompat.ActionButton"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" > android:layout_weight="1">
<TextView <TextView
android:id="@+id/actionbar_done_text" android:id="@+id/actionbar_done_text"
style="@style/Widget.Sherlock.ActionBar.TabText"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
@ -31,6 +30,7 @@
android:drawablePadding="8dp" android:drawablePadding="8dp"
android:gravity="center_vertical" android:gravity="center_vertical"
android:paddingRight="20dp" android:paddingRight="20dp"
style="@style/Widget.AppCompat.Light.ActionBar.TabText"
android:text="Done (set in-code!)" /> android:text="Done (set in-code!)" />
</FrameLayout> </FrameLayout>

View File

@ -1,30 +0,0 @@
#Android specific
bin
gen
obj
libs/armeabi
lint.xml
local.properties
release.properties
ant.properties
*.class
*.apk
#Gradle
.gradle
build
gradle.properties
#Maven
target
pom.xml.*
#Eclipse
.project
.classpath
.settings
.metadata
#IntelliJ IDEA
.idea
*.iml

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="440" android:versionName="4.4.0" package="com.actionbarsherlock">
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="17"/>
<application/>
</manifest>

View File

@ -1,15 +0,0 @@
ActionBarSherlock Library
=========================
This folder contains the main library which should be linked against as an
Android library project in your application.
For more information see the "Including In Your Project" section of the
[usage page][1].
[1]: http://actionbarsherlock.com/usage.html

View File

@ -1,23 +0,0 @@
apply plugin: 'android-library'
dependencies {
compile 'com.android.support:support-v4:19.0.1'
}
android {
compileSdkVersion 14
buildToolsVersion '19.0.1'
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
// Do not abort build if lint finds errors
lintOptions {
abortOnError false
}
}

View File

@ -1,92 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="ActionBarSherlock" default="help">
<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into
Version Control Systems. -->
<property file="local.properties" />
<!-- The ant.properties file can be created by you. It is only edited by the
'android' tool to add properties to it.
This is the place to change some Ant specific build properties.
Here are some properties you may want to change/update:
source.dir
The name of the source directory. Default is 'src'.
out.dir
The name of the output directory. Default is 'bin'.
For other overridable properties, look at the beginning of the rules
files in the SDK, at tools/ant/build.xml
Properties related to the SDK location or the project target should
be updated using the 'android' tool with the 'update' action.
This file is an integral part of the build system for your
application and should be checked into Version Control Systems.
-->
<property file="ant.properties" />
<!-- if sdk.dir was not set from one of the property file, then
get it from the ANDROID_HOME env var.
This must be done before we load project.properties since
the proguard config can use sdk.dir -->
<property environment="env" />
<condition property="sdk.dir" value="${env.ANDROID_HOME}">
<isset property="env.ANDROID_HOME" />
</condition>
<!-- The project.properties file is created and updated by the 'android'
tool, as well as ADT.
This contains project specific properties such as project target, and library
dependencies. Lower level build properties are stored in ant.properties
(or in .classpath for Eclipse projects).
This file is an integral part of the build system for your
application and should be checked into Version Control Systems. -->
<loadproperties srcFile="project.properties" />
<!-- quick check on sdk.dir -->
<fail
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable."
unless="sdk.dir"
/>
<!--
Import per project custom build rules if present at the root of the project.
This is the place to put custom intermediary targets such as:
-pre-build
-pre-compile
-post-compile (This is typically used for code obfuscation.
Compiled code location: ${out.classes.absolute.dir}
If this is not done in place, override ${out.dex.input.absolute.dir})
-post-package
-post-build
-pre-clean
-->
<import file="custom_rules.xml" optional="true" />
<!-- Import the actual build file.
To customize existing targets, there are two options:
- Customize only one target:
- copy/paste the target into this file, *before* the
<import> task.
- customize it to your needs.
- Customize the whole content of build.xml
- copy/paste the content of the rules files (minus the top node)
into this file, replacing the <import> task.
- customize to your needs.
***********************
****** IMPORTANT ******
***********************
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
in order to avoid having your file be overridden by tools such as "android update project"
-->
<!-- version-tag: 1 -->
<import file="${sdk.dir}/tools/ant/build.xml" />
</project>

View File

@ -1,141 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.actionbarsherlock</groupId>
<artifactId>parent</artifactId>
<version>4.4.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>actionbarsherlock</artifactId>
<name>ActionBarSherlock</name>
<packaging>apklib</packaging>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>support-v4</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.robolectric</groupId>
<artifactId>robolectric</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>test</testSourceDirectory>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>maven-replacer-plugin</artifactId>
<executions>
<execution>
<phase>process-sources</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<ignoreMissingFile>false</ignoreMissingFile>
<file>target/generated-sources/r/com/actionbarsherlock/R.java</file>
<outputFile>target/generated-sources/r/com/actionbarsherlock/R.java</outputFile>
<regex>false</regex>
<token>static final int</token>
<value>static int</value>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<type>jar</type>
<file>${project.build.directory}/${project.build.finalName}.jar</file>
</artifact>
<artifact>
<type>aar</type>
<file>${project.basedir}/build/libs/${project.artifactId}-${gradle.version}.aar</file>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>maven-replacer-plugin</artifactId>
<versionRange>[1.4.0,)</versionRange>
<goals>
<goal>replace</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

View File

@ -1,20 +0,0 @@
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

View File

@ -1,12 +0,0 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "ant.properties", and override values to adapt the script to your
# project structure.
android.library=true
# Project target.
target=android-14

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="@color/abs__bright_foreground_disabled_holo_dark"/>
<item android:color="@color/abs__bright_foreground_holo_dark"/> <!-- not selected -->
</selector>

View File

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="@color/abs__bright_foreground_disabled_holo_light"/>
<item android:color="@color/abs__bright_foreground_holo_light"/> <!-- not selected -->
</selector>

View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="@color/abs__bright_foreground_disabled_holo_dark"/>
<item android:state_window_focused="false" android:color="@color/abs__bright_foreground_holo_dark"/>
<item android:state_pressed="true" android:color="@color/abs__bright_foreground_holo_dark"/>
<item android:state_selected="true" android:color="@color/abs__bright_foreground_holo_dark"/>
<item android:state_activated="true" android:color="@color/abs__bright_foreground_holo_dark"/>
<item android:color="@color/abs__bright_foreground_holo_dark"/> <!-- not selected -->
</selector>

View File

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="@color/abs__bright_foreground_disabled_holo_light"/>
<item android:state_window_focused="false" android:color="@color/abs__bright_foreground_holo_light"/>
<item android:state_pressed="true" android:color="@color/abs__bright_foreground_holo_light"/>
<item android:state_selected="true" android:color="@color/abs__bright_foreground_holo_light"/>
<item android:state_activated="true" android:color="@color/abs__bright_foreground_holo_light"/>
<item android:color="@color/abs__bright_foreground_holo_light"/> <!-- not selected -->
</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 713 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 597 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 616 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Some files were not shown because too many files have changed in this diff Show More