diff --git a/libs/ActionBarSherlock/AndroidManifest.xml b/libs/ActionBarSherlock/AndroidManifest.xml
index e4de549..c4a75f3 100644
--- a/libs/ActionBarSherlock/AndroidManifest.xml
+++ b/libs/ActionBarSherlock/AndroidManifest.xml
@@ -1,6 +1,6 @@
-
-
+
+
-
\ No newline at end of file
+
diff --git a/libs/ActionBarSherlock/libs/android-support-v4.jar b/libs/ActionBarSherlock/libs/android-support-v4.jar
index d006198..99e063b 100644
Binary files a/libs/ActionBarSherlock/libs/android-support-v4.jar and b/libs/ActionBarSherlock/libs/android-support-v4.jar differ
diff --git a/libs/ActionBarSherlock/pom.xml b/libs/ActionBarSherlock/pom.xml
index 263542f..5373fb0 100644
--- a/libs/ActionBarSherlock/pom.xml
+++ b/libs/ActionBarSherlock/pom.xml
@@ -11,7 +11,7 @@
com.actionbarsherlock
parent
- 4.0.1
+ 4.1.0
../pom.xml
@@ -148,39 +148,4 @@
-
-
-
- release
-
-
- performRelease
- true
-
-
-
-
-
- com.jayway.maven.plugins.android.generation2
- android-maven-plugin
- ${android-maven.version}
-
-
- true
-
-
-
-
- manifestUpdate
- process-resources
-
- manifest-update
-
-
-
-
-
-
-
-
diff --git a/libs/ActionBarSherlock/res/drawable-mdpi/abs__dialog_full_holo_dark.9.png b/libs/ActionBarSherlock/res/drawable-mdpi/abs__dialog_full_holo_dark.9.png
new file mode 100644
index 0000000..fb3660e
Binary files /dev/null and b/libs/ActionBarSherlock/res/drawable-mdpi/abs__dialog_full_holo_dark.9.png differ
diff --git a/libs/ActionBarSherlock/res/drawable-mdpi/abs__dialog_full_holo_light.9.png b/libs/ActionBarSherlock/res/drawable-mdpi/abs__dialog_full_holo_light.9.png
new file mode 100644
index 0000000..f18050e
Binary files /dev/null and b/libs/ActionBarSherlock/res/drawable-mdpi/abs__dialog_full_holo_light.9.png differ
diff --git a/libs/ActionBarSherlock/res/drawable-xhdpi/abs__dialog_full_holo_dark.9.png b/libs/ActionBarSherlock/res/drawable-xhdpi/abs__dialog_full_holo_dark.9.png
new file mode 100644
index 0000000..f4970ad
Binary files /dev/null and b/libs/ActionBarSherlock/res/drawable-xhdpi/abs__dialog_full_holo_dark.9.png differ
diff --git a/libs/ActionBarSherlock/res/drawable-xhdpi/abs__dialog_full_holo_light.9.png b/libs/ActionBarSherlock/res/drawable-xhdpi/abs__dialog_full_holo_light.9.png
new file mode 100644
index 0000000..172fc3b
Binary files /dev/null and b/libs/ActionBarSherlock/res/drawable-xhdpi/abs__dialog_full_holo_light.9.png differ
diff --git a/libs/ActionBarSherlock/res/drawable-xhdpi/abs__spinner_48_inner_holo.png b/libs/ActionBarSherlock/res/drawable-xhdpi/abs__spinner_48_inner_holo.png
new file mode 100644
index 0000000..19517c4
Binary files /dev/null and b/libs/ActionBarSherlock/res/drawable-xhdpi/abs__spinner_48_inner_holo.png differ
diff --git a/libs/ActionBarSherlock/res/drawable-xhdpi/abs__spinner_48_outer_holo.png b/libs/ActionBarSherlock/res/drawable-xhdpi/abs__spinner_48_outer_holo.png
new file mode 100644
index 0000000..14143c5
Binary files /dev/null and b/libs/ActionBarSherlock/res/drawable-xhdpi/abs__spinner_48_outer_holo.png differ
diff --git a/libs/ActionBarSherlock/res/drawable/abs__activated_background_holo_dark.xml b/libs/ActionBarSherlock/res/drawable/abs__activated_background_holo_dark.xml
index 9510eeb..85c2c02 100644
--- a/libs/ActionBarSherlock/res/drawable/abs__activated_background_holo_dark.xml
+++ b/libs/ActionBarSherlock/res/drawable/abs__activated_background_holo_dark.xml
@@ -14,8 +14,7 @@
limitations under the License.
-->
-
+
diff --git a/libs/ActionBarSherlock/res/drawable/abs__activated_background_holo_light.xml b/libs/ActionBarSherlock/res/drawable/abs__activated_background_holo_light.xml
index 9510eeb..85c2c02 100644
--- a/libs/ActionBarSherlock/res/drawable/abs__activated_background_holo_light.xml
+++ b/libs/ActionBarSherlock/res/drawable/abs__activated_background_holo_light.xml
@@ -14,8 +14,7 @@
limitations under the License.
-->
-
+
diff --git a/libs/ActionBarSherlock/res/drawable/abs__btn_cab_done_holo_dark.xml b/libs/ActionBarSherlock/res/drawable/abs__btn_cab_done_holo_dark.xml
index d470e98..cab8962 100644
--- a/libs/ActionBarSherlock/res/drawable/abs__btn_cab_done_holo_dark.xml
+++ b/libs/ActionBarSherlock/res/drawable/abs__btn_cab_done_holo_dark.xml
@@ -14,8 +14,7 @@
limitations under the License.
-->
-
+
-
-
+
-
-
+
diff --git a/libs/ActionBarSherlock/res/drawable/abs__item_background_holo_light.xml b/libs/ActionBarSherlock/res/drawable/abs__item_background_holo_light.xml
index f989197..da5fb2e 100644
--- a/libs/ActionBarSherlock/res/drawable/abs__item_background_holo_light.xml
+++ b/libs/ActionBarSherlock/res/drawable/abs__item_background_holo_light.xml
@@ -14,8 +14,7 @@
limitations under the License.
-->
-
+
diff --git a/libs/ActionBarSherlock/res/drawable/abs__list_selector_holo_dark.xml b/libs/ActionBarSherlock/res/drawable/abs__list_selector_holo_dark.xml
index ee497a2..08b8b12 100644
--- a/libs/ActionBarSherlock/res/drawable/abs__list_selector_holo_dark.xml
+++ b/libs/ActionBarSherlock/res/drawable/abs__list_selector_holo_dark.xml
@@ -14,8 +14,7 @@
limitations under the License.
-->
-
+
diff --git a/libs/ActionBarSherlock/res/drawable/abs__list_selector_holo_light.xml b/libs/ActionBarSherlock/res/drawable/abs__list_selector_holo_light.xml
index e1522ee..ada490b 100644
--- a/libs/ActionBarSherlock/res/drawable/abs__list_selector_holo_light.xml
+++ b/libs/ActionBarSherlock/res/drawable/abs__list_selector_holo_light.xml
@@ -14,8 +14,7 @@
limitations under the License.
-->
-
+
diff --git a/libs/ActionBarSherlock/res/layout/abs__action_menu_layout.xml b/libs/ActionBarSherlock/res/layout/abs__action_menu_layout.xml
index 7010bcc..a6f8e53 100644
--- a/libs/ActionBarSherlock/res/layout/abs__action_menu_layout.xml
+++ b/libs/ActionBarSherlock/res/layout/abs__action_menu_layout.xml
@@ -4,9 +4,9 @@
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.
@@ -18,6 +18,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:divider="?attr/dividerVertical"
+ android:divider="?attr/actionBarDivider"
android:dividerPadding="12dip"
android:gravity="center_vertical" />
diff --git a/libs/ActionBarSherlock/res/layout/abs__screen_action_bar.xml b/libs/ActionBarSherlock/res/layout/abs__screen_action_bar.xml
index 17fd16c..1fb82fe 100644
--- a/libs/ActionBarSherlock/res/layout/abs__screen_action_bar.xml
+++ b/libs/ActionBarSherlock/res/layout/abs__screen_action_bar.xml
@@ -4,9 +4,9 @@
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.
@@ -19,10 +19,10 @@ This is an optimized layout for a screen with the Action Bar enabled.
-->
+ android:fitsSystemWindows="true">
-
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
-
+
diff --git a/libs/ActionBarSherlock/res/layout/abs__screen_simple_overlay_action_mode.xml b/libs/ActionBarSherlock/res/layout/abs__screen_simple_overlay_action_mode.xml
index 58bafaf..f8b9fb1 100644
--- a/libs/ActionBarSherlock/res/layout/abs__screen_simple_overlay_action_mode.xml
+++ b/libs/ActionBarSherlock/res/layout/abs__screen_simple_overlay_action_mode.xml
@@ -21,6 +21,8 @@ enabled.
-->
?android:attr/actionBarSize
- 48dp
+
+ - @style/Theme.Sherlock
+
+ - ?android:attr/dropDownListViewStyle
-
+
@@ -112,7 +112,7 @@
- ?attr/actionBarItemBackground
- ?attr/actionBarSize
- - 56dip
+ - @dimen/abs__action_button_min_width
- center
- 12dip
- 12dip
diff --git a/libs/ActionBarSherlock/src/android/support/v4/app/_ActionBarSherlockTrojanHorse.java b/libs/ActionBarSherlock/src/android/support/v4/app/_ActionBarSherlockTrojanHorse.java
new file mode 100644
index 0000000..3e3db62
--- /dev/null
+++ b/libs/ActionBarSherlock/src/android/support/v4/app/_ActionBarSherlockTrojanHorse.java
@@ -0,0 +1,144 @@
+package android.support.v4.app;
+
+import android.util.Log;
+import android.view.View;
+import android.view.Window;
+import com.actionbarsherlock.ActionBarSherlock.OnCreatePanelMenuListener;
+import com.actionbarsherlock.ActionBarSherlock.OnMenuItemSelectedListener;
+import com.actionbarsherlock.ActionBarSherlock.OnPreparePanelListener;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuInflater;
+import com.actionbarsherlock.view.MenuItem;
+
+import java.util.ArrayList;
+
+/** I'm in ur package. Stealing ur variables. */
+public abstract class _ActionBarSherlockTrojanHorse extends FragmentActivity implements OnCreatePanelMenuListener, OnPreparePanelListener, OnMenuItemSelectedListener {
+ private static final boolean DEBUG = false;
+ private static final String TAG = "_ActionBarSherlockTrojanHorse";
+
+ /** Fragment interface for menu creation callback. */
+ public interface OnCreateOptionsMenuListener {
+ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater);
+ }
+ /** Fragment interface for menu preparation callback. */
+ public interface OnPrepareOptionsMenuListener {
+ public void onPrepareOptionsMenu(Menu menu);
+ }
+ /** Fragment interface for menu item selection callback. */
+ public interface OnOptionsItemSelectedListener {
+ public boolean onOptionsItemSelected(MenuItem item);
+ }
+
+ private ArrayList mCreatedMenus;
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Sherlock menu handling
+ ///////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public boolean onCreatePanelMenu(int featureId, Menu menu) {
+ if (DEBUG) Log.d(TAG, "[onCreatePanelMenu] featureId: " + featureId + ", menu: " + menu);
+
+ if (featureId == Window.FEATURE_OPTIONS_PANEL) {
+ boolean result = onCreateOptionsMenu(menu);
+ if (DEBUG) Log.d(TAG, "[onCreatePanelMenu] activity create result: " + result);
+
+ MenuInflater inflater = getSupportMenuInflater();
+ boolean show = false;
+ ArrayList newMenus = null;
+ if (mFragments.mActive != null) {
+ for (int i = 0; i < mFragments.mAdded.size(); i++) {
+ Fragment f = mFragments.mAdded.get(i);
+ if (f != null && !f.mHidden && f.mHasMenu && f.mMenuVisible && f instanceof OnCreateOptionsMenuListener) {
+ show = true;
+ ((OnCreateOptionsMenuListener)f).onCreateOptionsMenu(menu, inflater);
+ if (newMenus == null) {
+ newMenus = new ArrayList();
+ }
+ newMenus.add(f);
+ }
+ }
+ }
+
+ if (mCreatedMenus != null) {
+ for (int i = 0; i < mCreatedMenus.size(); i++) {
+ Fragment f = mCreatedMenus.get(i);
+ if (newMenus == null || !newMenus.contains(f)) {
+ f.onDestroyOptionsMenu();
+ }
+ }
+ }
+
+ mCreatedMenus = newMenus;
+
+ if (DEBUG) Log.d(TAG, "[onCreatePanelMenu] fragments create result: " + show);
+ result |= show;
+
+ if (DEBUG) Log.d(TAG, "[onCreatePanelMenu] returning " + result);
+ return result;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean onPreparePanel(int featureId, View view, Menu menu) {
+ if (DEBUG) Log.d(TAG, "[onPreparePanel] featureId: " + featureId + ", view: " + view + " menu: " + menu);
+
+ if (featureId == Window.FEATURE_OPTIONS_PANEL) {
+ boolean result = onPrepareOptionsMenu(menu);
+ if (DEBUG) Log.d(TAG, "[onPreparePanel] activity prepare result: " + result);
+
+ boolean show = false;
+ if (mFragments.mActive != null) {
+ for (int i = 0; i < mFragments.mAdded.size(); i++) {
+ Fragment f = mFragments.mAdded.get(i);
+ if (f != null && !f.mHidden && f.mHasMenu && f.mMenuVisible && f instanceof OnPrepareOptionsMenuListener) {
+ show = true;
+ ((OnPrepareOptionsMenuListener)f).onPrepareOptionsMenu(menu);
+ }
+ }
+ }
+
+ if (DEBUG) Log.d(TAG, "[onPreparePanel] fragments prepare result: " + show);
+ result |= show;
+
+ result &= menu.hasVisibleItems();
+ if (DEBUG) Log.d(TAG, "[onPreparePanel] returning " + result);
+ return result;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean onMenuItemSelected(int featureId, MenuItem item) {
+ if (DEBUG) Log.d(TAG, "[onMenuItemSelected] featureId: " + featureId + ", item: " + item);
+
+ if (featureId == Window.FEATURE_OPTIONS_PANEL) {
+ if (onOptionsItemSelected(item)) {
+ return true;
+ }
+
+ if (mFragments.mActive != null) {
+ for (int i = 0; i < mFragments.mAdded.size(); i++) {
+ Fragment f = mFragments.mAdded.get(i);
+ if (f != null && !f.mHidden && f.mHasMenu && f.mMenuVisible && f instanceof OnOptionsItemSelectedListener) {
+ if (((OnOptionsItemSelectedListener)f).onOptionsItemSelected(item)) {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ public abstract boolean onCreateOptionsMenu(Menu menu);
+
+ public abstract boolean onPrepareOptionsMenu(Menu menu);
+
+ public abstract boolean onOptionsItemSelected(MenuItem item);
+
+ public abstract MenuInflater getSupportMenuInflater();
+}
diff --git a/libs/ActionBarSherlock/src/com/actionbarsherlock/ActionBarSherlock.java b/libs/ActionBarSherlock/src/com/actionbarsherlock/ActionBarSherlock.java
index 3dc3fd3..8340fb5 100644
--- a/libs/ActionBarSherlock/src/com/actionbarsherlock/ActionBarSherlock.java
+++ b/libs/ActionBarSherlock/src/com/actionbarsherlock/ActionBarSherlock.java
@@ -37,7 +37,6 @@ import com.actionbarsherlock.view.MenuItem;
* counterpart and you should refer to its documentation for instruction.
*
* @author Jake Wharton
- * @version 4.0.0
*/
public abstract class ActionBarSherlock {
protected static final String TAG = "ActionBarSherlock";
@@ -524,6 +523,20 @@ public abstract class ActionBarSherlock {
*/
public void dispatchPanelClosed(int featureId, android.view.Menu menu) {}
+ /**
+ * Notify the action bar that the activity has been destroyed. This method
+ * should be called before the superclass implementation.
+ *
+ *
+ * @Override
+ * public void onDestroy() {
+ * mSherlock.dispatchDestroy();
+ * super.onDestroy();
+ * }
+ *
+ */
+ public void dispatchDestroy() {}
+
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
diff --git a/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockActivity.java b/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockActivity.java
index d0a6d81..9cb57e9 100644
--- a/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockActivity.java
+++ b/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockActivity.java
@@ -76,6 +76,12 @@ public abstract class SherlockActivity extends Activity implements OnCreatePanel
super.onStop();
}
+ @Override
+ protected void onDestroy() {
+ getSherlock().dispatchDestroy();
+ super.onDestroy();
+ }
+
@Override
protected void onPostCreate(Bundle savedInstanceState) {
getSherlock().dispatchPostCreate(savedInstanceState);
diff --git a/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockDialogFragment.java b/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockDialogFragment.java
index 0ec5833..a7c856b 100644
--- a/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockDialogFragment.java
+++ b/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockDialogFragment.java
@@ -1,18 +1,18 @@
package com.actionbarsherlock.app;
-import static com.actionbarsherlock.app.SherlockFragmentActivity.DEBUG;
import android.app.Activity;
import android.support.v4.app.DialogFragment;
-import android.util.Log;
-import com.actionbarsherlock.internal.view.menu.MenuItemMule;
-import com.actionbarsherlock.internal.view.menu.MenuMule;
+import com.actionbarsherlock.internal.view.menu.MenuItemWrapper;
+import com.actionbarsherlock.internal.view.menu.MenuWrapper;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
import com.actionbarsherlock.view.MenuItem;
-public class SherlockDialogFragment extends DialogFragment {
- private static final String TAG = "SherlockDialogFragment";
+import static com.actionbarsherlock.app.SherlockFragmentActivity.OnCreateOptionsMenuListener;
+import static com.actionbarsherlock.app.SherlockFragmentActivity.OnOptionsItemSelectedListener;
+import static com.actionbarsherlock.app.SherlockFragmentActivity.OnPrepareOptionsMenuListener;
+public class SherlockDialogFragment extends DialogFragment implements OnCreateOptionsMenuListener, OnPrepareOptionsMenuListener, OnOptionsItemSelectedListener {
private SherlockFragmentActivity mActivity;
public SherlockFragmentActivity getSherlockActivity() {
@@ -22,7 +22,7 @@ public class SherlockDialogFragment extends DialogFragment {
@Override
public void onAttach(Activity activity) {
if (!(activity instanceof SherlockFragmentActivity)) {
- throw new IllegalStateException(TAG + " must be attached to a SherlockFragmentActivity.");
+ throw new IllegalStateException(getClass().getSimpleName() + " must be attached to a SherlockFragmentActivity.");
}
mActivity = (SherlockFragmentActivity)activity;
@@ -30,41 +30,37 @@ public class SherlockDialogFragment extends DialogFragment {
}
@Override
- public final void onCreateOptionsMenu(android.view.Menu menu, android.view.MenuInflater inflater) {
- if (DEBUG) Log.d(TAG, "[onCreateOptionsMenu] menu: " + menu + ", inflater: " + inflater);
-
- if (menu instanceof MenuMule) {
- onCreateOptionsMenu(((MenuMule)menu).unwrap(), mActivity.getSupportMenuInflater());
- }
+ public void onDetach() {
+ mActivity = null;
+ super.onDetach();
}
+ @Override
+ public final void onCreateOptionsMenu(android.view.Menu menu, android.view.MenuInflater inflater) {
+ onCreateOptionsMenu(new MenuWrapper(menu), mActivity.getSupportMenuInflater());
+ }
+
+ @Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
//Nothing to see here.
}
@Override
public final void onPrepareOptionsMenu(android.view.Menu menu) {
- if (DEBUG) Log.d(TAG, "[onPrepareOptionsMenu] menu: " + menu);
-
- if (menu instanceof MenuMule) {
- onPrepareOptionsMenu(((MenuMule)menu).unwrap());
- }
+ onPrepareOptionsMenu(new MenuWrapper(menu));
}
+ @Override
public void onPrepareOptionsMenu(Menu menu) {
//Nothing to see here.
}
@Override
public final boolean onOptionsItemSelected(android.view.MenuItem item) {
- if (DEBUG) Log.d(TAG, "[onOptionsItemSelected] item: " + item);
-
- if (item instanceof MenuItemMule) {
- return onOptionsItemSelected(((MenuItemMule)item).unwrap());
- }
- return false;
+ return onOptionsItemSelected(new MenuItemWrapper(item));
}
+ @Override
public boolean onOptionsItemSelected(MenuItem item) {
//Nothing to see here.
return false;
diff --git a/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockExpandableListActivity.java b/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockExpandableListActivity.java
index 3247c98..078f9b0 100644
--- a/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockExpandableListActivity.java
+++ b/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockExpandableListActivity.java
@@ -76,6 +76,12 @@ public abstract class SherlockExpandableListActivity extends ExpandableListActiv
super.onStop();
}
+ @Override
+ protected void onDestroy() {
+ getSherlock().dispatchDestroy();
+ super.onDestroy();
+ }
+
@Override
protected void onPostCreate(Bundle savedInstanceState) {
getSherlock().dispatchPostCreate(savedInstanceState);
diff --git a/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragment.java b/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragment.java
index f02f5e4..0f24e9c 100644
--- a/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragment.java
+++ b/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragment.java
@@ -1,18 +1,18 @@
package com.actionbarsherlock.app;
-import static com.actionbarsherlock.app.SherlockFragmentActivity.DEBUG;
import android.app.Activity;
import android.support.v4.app.Fragment;
-import android.util.Log;
-import com.actionbarsherlock.internal.view.menu.MenuItemMule;
-import com.actionbarsherlock.internal.view.menu.MenuMule;
+import com.actionbarsherlock.internal.view.menu.MenuItemWrapper;
+import com.actionbarsherlock.internal.view.menu.MenuWrapper;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
import com.actionbarsherlock.view.MenuItem;
-public class SherlockFragment extends Fragment {
- private static final String TAG = "SherlockFragment";
+import static com.actionbarsherlock.app.SherlockFragmentActivity.OnCreateOptionsMenuListener;
+import static com.actionbarsherlock.app.SherlockFragmentActivity.OnOptionsItemSelectedListener;
+import static com.actionbarsherlock.app.SherlockFragmentActivity.OnPrepareOptionsMenuListener;
+public class SherlockFragment extends Fragment implements OnCreateOptionsMenuListener, OnPrepareOptionsMenuListener, OnOptionsItemSelectedListener {
private SherlockFragmentActivity mActivity;
public SherlockFragmentActivity getSherlockActivity() {
@@ -22,7 +22,7 @@ public class SherlockFragment extends Fragment {
@Override
public void onAttach(Activity activity) {
if (!(activity instanceof SherlockFragmentActivity)) {
- throw new IllegalStateException(TAG + " must be attached to a SherlockFragmentActivity.");
+ throw new IllegalStateException(getClass().getSimpleName() + " must be attached to a SherlockFragmentActivity.");
}
mActivity = (SherlockFragmentActivity)activity;
@@ -30,41 +30,37 @@ public class SherlockFragment extends Fragment {
}
@Override
- public final void onCreateOptionsMenu(android.view.Menu menu, android.view.MenuInflater inflater) {
- if (DEBUG) Log.d(TAG, "[onCreateOptionsMenu] menu: " + menu + ", inflater: " + inflater);
-
- if (menu instanceof MenuMule) {
- onCreateOptionsMenu(((MenuMule)menu).unwrap(), mActivity.getSupportMenuInflater());
- }
+ public void onDetach() {
+ mActivity = null;
+ super.onDetach();
}
+ @Override
+ public final void onCreateOptionsMenu(android.view.Menu menu, android.view.MenuInflater inflater) {
+ onCreateOptionsMenu(new MenuWrapper(menu), mActivity.getSupportMenuInflater());
+ }
+
+ @Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
//Nothing to see here.
}
@Override
public final void onPrepareOptionsMenu(android.view.Menu menu) {
- if (DEBUG) Log.d(TAG, "[onPrepareOptionsMenu] menu: " + menu);
-
- if (menu instanceof MenuMule) {
- onPrepareOptionsMenu(((MenuMule)menu).unwrap());
- }
+ onPrepareOptionsMenu(new MenuWrapper(menu));
}
+ @Override
public void onPrepareOptionsMenu(Menu menu) {
//Nothing to see here.
}
@Override
public final boolean onOptionsItemSelected(android.view.MenuItem item) {
- if (DEBUG) Log.d(TAG, "[onOptionsItemSelected] item: " + item);
-
- if (item instanceof MenuItemMule) {
- return onOptionsItemSelected(((MenuItemMule)item).unwrap());
- }
- return false;
+ return onOptionsItemSelected(new MenuItemWrapper(item));
}
+ @Override
public boolean onOptionsItemSelected(MenuItem item) {
//Nothing to see here.
return false;
diff --git a/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragmentActivity.java b/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragmentActivity.java
index 8d0b4c3..5cd13ba 100644
--- a/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragmentActivity.java
+++ b/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragmentActivity.java
@@ -1,36 +1,31 @@
package com.actionbarsherlock.app;
import android.content.res.Configuration;
-import android.os.Build;
import android.os.Bundle;
-import android.support.v4.app.FragmentActivity;
+import android.support.v4.app._ActionBarSherlockTrojanHorse;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.view.Window;
import com.actionbarsherlock.ActionBarSherlock;
-import com.actionbarsherlock.ActionBarSherlock.OnActionModeFinishedListener;
-import com.actionbarsherlock.ActionBarSherlock.OnActionModeStartedListener;
-import com.actionbarsherlock.ActionBarSherlock.OnCreatePanelMenuListener;
-import com.actionbarsherlock.ActionBarSherlock.OnMenuItemSelectedListener;
-import com.actionbarsherlock.ActionBarSherlock.OnPreparePanelListener;
-import com.actionbarsherlock.internal.view.menu.MenuItemMule;
-import com.actionbarsherlock.internal.view.menu.MenuMule;
import com.actionbarsherlock.view.ActionMode;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
import com.actionbarsherlock.view.MenuItem;
-public abstract class SherlockFragmentActivity extends FragmentActivity implements OnCreatePanelMenuListener, OnPreparePanelListener, OnMenuItemSelectedListener, OnActionModeStartedListener, OnActionModeFinishedListener {
- static final boolean DEBUG = false;
+import static com.actionbarsherlock.ActionBarSherlock.OnActionModeFinishedListener;
+import static com.actionbarsherlock.ActionBarSherlock.OnActionModeStartedListener;
+
+/** @see {@link _ActionBarSherlockTrojanHorse} */
+public class SherlockFragmentActivity extends _ActionBarSherlockTrojanHorse implements OnActionModeStartedListener, OnActionModeFinishedListener {
+ private static final boolean DEBUG = false;
private static final String TAG = "SherlockFragmentActivity";
private ActionBarSherlock mSherlock;
private boolean mIgnoreNativeCreate = false;
private boolean mIgnoreNativePrepare = false;
private boolean mIgnoreNativeSelected = false;
- private Boolean mOverrideNativeCreate = null;
protected final ActionBarSherlock getSherlock() {
if (mSherlock == null) {
@@ -87,6 +82,12 @@ public abstract class SherlockFragmentActivity extends FragmentActivity implemen
super.onStop();
}
+ @Override
+ protected void onDestroy() {
+ getSherlock().dispatchDestroy();
+ super.onDestroy();
+ }
+
@Override
protected void onPostCreate(Bundle savedInstanceState) {
getSherlock().dispatchPostCreate(savedInstanceState);
@@ -138,7 +139,7 @@ public abstract class SherlockFragmentActivity extends FragmentActivity implemen
getSherlock().dispatchInvalidateOptionsMenu();
}
- protected void supportInvalidateOptionsMenu() {
+ public void supportInvalidateOptionsMenu() {
if (DEBUG) Log.d(TAG, "[supportInvalidateOptionsMenu]");
invalidateOptionsMenu();
@@ -161,7 +162,7 @@ public abstract class SherlockFragmentActivity extends FragmentActivity implemen
@Override
public final boolean onCreateOptionsMenu(android.view.Menu menu) {
- return (mOverrideNativeCreate != null) ? mOverrideNativeCreate.booleanValue() : true;
+ return true;
}
@Override
@@ -223,70 +224,14 @@ public abstract class SherlockFragmentActivity extends FragmentActivity implemen
// Sherlock menu handling
///////////////////////////////////////////////////////////////////////////
- @Override
- public boolean onCreatePanelMenu(int featureId, Menu menu) {
- if (DEBUG) Log.d(TAG, "[onCreatePanelMenu] featureId: " + featureId + ", menu: " + menu);
-
- if (featureId == Window.FEATURE_OPTIONS_PANEL) {
- boolean result = onCreateOptionsMenu(menu);
-
- //Dispatch to parent panel creation for fragment dispatching
- if (DEBUG) Log.d(TAG, "[onCreatePanelMenu] dispatching to native with mule");
- mOverrideNativeCreate = result;
- boolean fragResult = super.onCreatePanelMenu(featureId, new MenuMule(menu));
- mOverrideNativeCreate = null;
-
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
- result |= menu.hasVisibleItems();
- } else {
- result |= fragResult;
- }
-
- return result;
- }
- return false;
- }
-
public boolean onCreateOptionsMenu(Menu menu) {
return true;
}
- @Override
- public boolean onPreparePanel(int featureId, View view, Menu menu) {
- if (DEBUG) Log.d(TAG, "[onPreparePanel] featureId: " + featureId + ", view: " + view + " menu: " + menu);
-
- if (featureId == Window.FEATURE_OPTIONS_PANEL) {
- boolean result = onPrepareOptionsMenu(menu);
-
- //Dispatch to parent panel preparation for fragment dispatching
- if (DEBUG) Log.d(TAG, "[onPreparePanel] dispatching to native with mule");
- super.onPreparePanel(featureId, view, new MenuMule(menu));
-
- return result;
- }
- return false;
- }
-
public boolean onPrepareOptionsMenu(Menu menu) {
return true;
}
- @Override
- public boolean onMenuItemSelected(int featureId, MenuItem item) {
- if (DEBUG) Log.d(TAG, "[onMenuItemSelected] featureId: " + featureId + ", item: " + item);
-
- if (featureId == Window.FEATURE_OPTIONS_PANEL) {
- if (onOptionsItemSelected(item)) {
- return true;
- }
-
- //Dispatch to parent panel selection for fragment dispatching
- if (DEBUG) Log.d(TAG, "[onMenuItemSelected] dispatching to native with mule");
- return super.onMenuItemSelected(featureId, new MenuItemMule(item));
- }
- return false;
- }
-
public boolean onOptionsItemSelected(MenuItem item) {
return false;
}
diff --git a/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockListActivity.java b/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockListActivity.java
index 83114c3..00c00fe 100644
--- a/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockListActivity.java
+++ b/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockListActivity.java
@@ -76,6 +76,12 @@ public abstract class SherlockListActivity extends ListActivity implements OnCre
super.onStop();
}
+ @Override
+ protected void onDestroy() {
+ getSherlock().dispatchDestroy();
+ super.onDestroy();
+ }
+
@Override
protected void onPostCreate(Bundle savedInstanceState) {
getSherlock().dispatchPostCreate(savedInstanceState);
diff --git a/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockListFragment.java b/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockListFragment.java
index 4f6891e..13ca3c4 100644
--- a/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockListFragment.java
+++ b/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockListFragment.java
@@ -1,18 +1,18 @@
package com.actionbarsherlock.app;
-import static com.actionbarsherlock.app.SherlockFragmentActivity.DEBUG;
import android.app.Activity;
import android.support.v4.app.ListFragment;
-import android.util.Log;
-import com.actionbarsherlock.internal.view.menu.MenuItemMule;
-import com.actionbarsherlock.internal.view.menu.MenuMule;
+import com.actionbarsherlock.internal.view.menu.MenuItemWrapper;
+import com.actionbarsherlock.internal.view.menu.MenuWrapper;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
import com.actionbarsherlock.view.MenuItem;
-public class SherlockListFragment extends ListFragment {
- private static final String TAG = "SherlockListFragment";
+import static com.actionbarsherlock.app.SherlockFragmentActivity.OnCreateOptionsMenuListener;
+import static com.actionbarsherlock.app.SherlockFragmentActivity.OnOptionsItemSelectedListener;
+import static com.actionbarsherlock.app.SherlockFragmentActivity.OnPrepareOptionsMenuListener;
+public class SherlockListFragment extends ListFragment implements OnCreateOptionsMenuListener, OnPrepareOptionsMenuListener, OnOptionsItemSelectedListener {
private SherlockFragmentActivity mActivity;
public SherlockFragmentActivity getSherlockActivity() {
@@ -22,7 +22,7 @@ public class SherlockListFragment extends ListFragment {
@Override
public void onAttach(Activity activity) {
if (!(activity instanceof SherlockFragmentActivity)) {
- throw new IllegalStateException(TAG + " must be attached to a SherlockFragmentActivity.");
+ throw new IllegalStateException(getClass().getSimpleName() + " must be attached to a SherlockFragmentActivity.");
}
mActivity = (SherlockFragmentActivity)activity;
@@ -30,41 +30,37 @@ public class SherlockListFragment extends ListFragment {
}
@Override
- public final void onCreateOptionsMenu(android.view.Menu menu, android.view.MenuInflater inflater) {
- if (DEBUG) Log.d(TAG, "[onCreateOptionsMenu] menu: " + menu + ", inflater: " + inflater);
-
- if (menu instanceof MenuMule) {
- onCreateOptionsMenu(((MenuMule)menu).unwrap(), mActivity.getSupportMenuInflater());
- }
+ public void onDetach() {
+ mActivity = null;
+ super.onDetach();
}
+ @Override
+ public final void onCreateOptionsMenu(android.view.Menu menu, android.view.MenuInflater inflater) {
+ onCreateOptionsMenu(new MenuWrapper(menu), mActivity.getSupportMenuInflater());
+ }
+
+ @Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
//Nothing to see here.
}
@Override
public final void onPrepareOptionsMenu(android.view.Menu menu) {
- if (DEBUG) Log.d(TAG, "[onPrepareOptionsMenu] menu: " + menu);
-
- if (menu instanceof MenuMule) {
- onPrepareOptionsMenu(((MenuMule)menu).unwrap());
- }
+ onPrepareOptionsMenu(new MenuWrapper(menu));
}
+ @Override
public void onPrepareOptionsMenu(Menu menu) {
//Nothing to see here.
}
@Override
public final boolean onOptionsItemSelected(android.view.MenuItem item) {
- if (DEBUG) Log.d(TAG, "[onOptionsItemSelected] item: " + item);
-
- if (item instanceof MenuItemMule) {
- return onOptionsItemSelected(((MenuItemMule)item).unwrap());
- }
- return false;
+ return onOptionsItemSelected(new MenuItemWrapper(item));
}
+ @Override
public boolean onOptionsItemSelected(MenuItem item) {
//Nothing to see here.
return false;
diff --git a/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockPreferenceActivity.java b/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockPreferenceActivity.java
index 71e4030..4f80be5 100644
--- a/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockPreferenceActivity.java
+++ b/libs/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockPreferenceActivity.java
@@ -76,6 +76,12 @@ public abstract class SherlockPreferenceActivity extends PreferenceActivity impl
super.onStop();
}
+ @Override
+ protected void onDestroy() {
+ getSherlock().dispatchDestroy();
+ super.onDestroy();
+ }
+
@Override
protected void onPostCreate(Bundle savedInstanceState) {
getSherlock().dispatchPostCreate(savedInstanceState);
diff --git a/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/ActionBarSherlockCompat.java b/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/ActionBarSherlockCompat.java
index 26f0515..05353d2 100644
--- a/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/ActionBarSherlockCompat.java
+++ b/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/ActionBarSherlockCompat.java
@@ -71,6 +71,8 @@ public class ActionBarSherlockCompat extends ActionBarSherlock implements MenuBu
private MenuBuilder mMenu;
/** Map between native options items and sherlock items. */
protected HashMap mNativeItemMap;
+ /** Indication of a long-press on the hardware menu key. */
+ private boolean mMenuKeyIsLongPress = false;
/** Parent view of the window decoration (action bar, mode, etc.). */
private ViewGroup mDecor;
@@ -79,6 +81,8 @@ public class ActionBarSherlockCompat extends ActionBarSherlock implements MenuBu
/** Whether or not the title is stable and can be displayed. */
private boolean mIsTitleReady = false;
+ /** Whether or not the parent activity has been destroyed. */
+ private boolean mIsDestroyed = false;
/* Emulate PanelFeatureState */
private boolean mClosingActionMenu;
@@ -411,7 +415,7 @@ public class ActionBarSherlockCompat extends ActionBarSherlock implements MenuBu
}
// Next collapse any expanded action views.
- if (aActionBar != null && wActionBar.hasExpandedActionView()) {
+ if (wActionBar != null && wActionBar.hasExpandedActionView()) {
if (action == KeyEvent.ACTION_UP) {
wActionBar.collapseActionView();
}
@@ -420,20 +424,32 @@ public class ActionBarSherlockCompat extends ActionBarSherlock implements MenuBu
}
}
- if (keyCode == KeyEvent.KEYCODE_MENU && event.getAction() == KeyEvent.ACTION_UP && isReservingOverflow()) {
- if (mActionMode == null) {
- if (wActionBar.isOverflowMenuShowing()) {
- wActionBar.hideOverflowMenu();
- } else {
- wActionBar.showOverflowMenu();
+ boolean result = false;
+ if (keyCode == KeyEvent.KEYCODE_MENU && isReservingOverflow()) {
+ if (event.getAction() == KeyEvent.ACTION_DOWN && event.isLongPress()) {
+ mMenuKeyIsLongPress = true;
+ } else if (event.getAction() == KeyEvent.ACTION_UP) {
+ if (!mMenuKeyIsLongPress) {
+ if (mActionMode == null && wActionBar != null) {
+ if (wActionBar.isOverflowMenuShowing()) {
+ wActionBar.hideOverflowMenu();
+ } else {
+ wActionBar.showOverflowMenu();
+ }
+ }
+ result = true;
}
+ mMenuKeyIsLongPress = false;
}
- if (DEBUG) Log.d(TAG, "[dispatchKeyEvent] returning true");
- return true;
}
- if (DEBUG) Log.d(TAG, "[dispatchKeyEvent] returning false");
- return false;
+ if (DEBUG) Log.d(TAG, "[dispatchKeyEvent] returning " + result);
+ return result;
+ }
+
+ @Override
+ public void dispatchDestroy() {
+ mIsDestroyed = true;
}
@@ -968,7 +984,7 @@ public class ActionBarSherlockCompat extends ActionBarSherlock implements MenuBu
@Override
public void run() {
//Invalidate if the panel menu hasn't been created before this.
- if (mMenu == null) {
+ if (!mIsDestroyed && !mActivity.isFinishing() && mMenu == null) {
dispatchInvalidateOptionsMenu();
}
}
diff --git a/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/ActionBarSherlockNative.java b/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/ActionBarSherlockNative.java
index 74831a7..9afca18 100644
--- a/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/ActionBarSherlockNative.java
+++ b/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/ActionBarSherlockNative.java
@@ -314,5 +314,15 @@ public class ActionBarSherlockNative extends ActionBarSherlock {
public MenuInflater getMenuInflater() {
return ActionBarSherlockNative.this.getMenuInflater();
}
+
+ @Override
+ public void setTag(Object tag) {
+ mActionMode.setTag(tag);
+ }
+
+ @Override
+ public Object getTag() {
+ return mActionMode.getTag();
+ }
}
}
diff --git a/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/app/ActionBarWrapper.java b/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/app/ActionBarWrapper.java
index 1bd0eac..e390ea4 100644
--- a/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/app/ActionBarWrapper.java
+++ b/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/app/ActionBarWrapper.java
@@ -217,7 +217,6 @@ public class ActionBarWrapper extends ActionBar implements android.app.ActionBar
public TabWrapper(android.app.ActionBar.Tab nativeTab) {
mNativeTab = nativeTab;
mNativeTab.setTag(this);
- mNativeTab.setTabListener(this);
}
@Override
@@ -289,6 +288,7 @@ public class ActionBarWrapper extends ActionBar implements android.app.ActionBar
@Override
public Tab setTabListener(TabListener listener) {
+ mNativeTab.setTabListener(listener != null ? this : null);
mListener = listener;
return this;
}
diff --git a/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/AnimatorProxy.java b/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/AnimatorProxy.java
index e284604..067d049 100644
--- a/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/AnimatorProxy.java
+++ b/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/view/animation/AnimatorProxy.java
@@ -140,6 +140,8 @@ public final class AnimatorProxy extends Animation {
return;
}
+ view.setAnimation(this);
+
final RectF after = mAfter;
computeRect(after, view);
after.union(mBefore);
@@ -202,4 +204,9 @@ public final class AnimatorProxy extends Animation {
transformMatrix(t.getMatrix(), view);
}
}
+
+ @Override
+ public void reset() {
+ /* Do nothing. */
+ }
}
diff --git a/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenuPresenter.java b/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenuPresenter.java
index 5f1cd59..6f568c6 100644
--- a/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenuPresenter.java
+++ b/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/view/menu/ActionMenuPresenter.java
@@ -305,7 +305,7 @@ public class ActionMenuPresenter extends BaseMenuPresenter
*/
public boolean showOverflowMenu() {
if (mReserveOverflow && !isOverflowMenuShowing() && mMenu != null && mMenuView != null &&
- mPostedOpenRunnable == null) {
+ mPostedOpenRunnable == null && !mMenu.getNonActionItems().isEmpty()) {
OverflowPopup popup = new OverflowPopup(mContext, mMenu, mOverflowButton, true);
mPostedOpenRunnable = new OpenOverflowRunnable(popup);
// Post this for later; we might still need a layout for the anchor to be right.
diff --git a/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/widget/ActionBarView.java b/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/widget/ActionBarView.java
index fbb0ea0..4636de1 100644
--- a/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/widget/ActionBarView.java
+++ b/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/widget/ActionBarView.java
@@ -132,7 +132,7 @@ public class ActionBarView extends AbsActionBarView {
private SpinnerAdapter mSpinnerAdapter;
private OnNavigationListener mCallback;
- private Runnable mTabSelector;
+ //UNUSED private Runnable mTabSelector;
private ExpandedActionViewMenuPresenter mExpandedMenuPresenter;
View mExpandedActionView;
@@ -383,7 +383,7 @@ public class ActionBarView extends AbsActionBarView {
@Override
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
- removeCallbacks(mTabSelector);
+ //UNUSED removeCallbacks(mTabSelector);
if (mActionMenuPresenter != null) {
mActionMenuPresenter.hideOverflowMenu();
mActionMenuPresenter.hideSubMenus();
diff --git a/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/widget/IcsLinearLayout.java b/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/widget/IcsLinearLayout.java
index 59d836a..1b4463a 100644
--- a/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/widget/IcsLinearLayout.java
+++ b/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/widget/IcsLinearLayout.java
@@ -106,6 +106,30 @@ public class IcsLinearLayout extends NineLinearLayout {
requestLayout();
}
+ /**
+ * Set padding displayed on both ends of dividers.
+ *
+ * @param padding Padding value in pixels that will be applied to each end
+ *
+ * @see #setShowDividers(int)
+ * @see #setDividerDrawable(Drawable)
+ * @see #getDividerPadding()
+ */
+ public void setDividerPadding(int padding) {
+ mDividerPadding = padding;
+ }
+
+ /**
+ * Get the padding size used to inset dividers in pixels
+ *
+ * @see #setShowDividers(int)
+ * @see #setDividerDrawable(Drawable)
+ * @see #setDividerPadding(int)
+ */
+ public int getDividerPadding() {
+ return mDividerPadding;
+ }
+
/**
* Get the width of the current divider drawable.
*
diff --git a/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/widget/IcsSpinner.java b/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/widget/IcsSpinner.java
index 319c9ab..038d1e0 100644
--- a/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/widget/IcsSpinner.java
+++ b/libs/ActionBarSherlock/src/com/actionbarsherlock/internal/widget/IcsSpinner.java
@@ -78,6 +78,10 @@ public class IcsSpinner extends IcsAbsSpinner implements OnClickListener {
private Rect mTempRect = new Rect();
+ public IcsSpinner(Context context, AttributeSet attrs) {
+ this(context, attrs, R.attr.actionDropDownStyle);
+ }
+
/**
* Construct a new spinner with the given context's theme, the supplied attribute set,
* and default style.