Remove third party cruft

pull/14/head
Alex Baker 11 years ago
parent 77679b0136
commit 4ab8d98bf1

@ -1,8 +0,0 @@
ActionBarSherlock Plugins
=========================
Modules provided in this folder are plugins which add functionality to the
ActionBarSherlock library.
The requirements for implementing each pluging are detailed in the `README.md`
file in each plugin folder.

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.actionbarsherlock.plugin.maps"
android:versionCode="50"
android:versionName="3.5.0">
<uses-sdk
android:minSdkVersion="4"
android:targetSdkVersion="13" />
</manifest>

@ -1,18 +0,0 @@
ActionBarSherlock Plugin: Maps
==============================
This plugin provides support for the Google API `MapView` widget through an
additional base activity, `FragmentMapActivity`. Your application must adhere
to all of the regular requirements of implementing the [Google Map View][1].
By using `FragmentMapActivity` you are afforded the use of fragments, loaders,
and the action bar--including support for using a `MapView` within a fragment.
You can find examples of these implementations in the 'demos' sample.
[1]: http://developer.android.com/resources/tutorials/views/hello-mapview.html

@ -1,115 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<!--module name="NewlineAtEndOfFile"/-->
<module name="FileLength"/>
<module name="FileTabCharacter"/>
<!-- Trailing spaces -->
<module name="RegexpSingleline">
<property name="format" value="\s+$"/>
<property name="message" value="Line has trailing spaces."/>
</module>
<module name="TreeWalker">
<property name="cacheFile" value="${checkstyle.cache.file}"/>
<!-- Checks for Javadoc comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
<!--module name="JavadocMethod"/-->
<!--module name="JavadocType"/-->
<!--module name="JavadocVariable"/-->
<!--module name="JavadocStyle"/-->
<!-- Checks for Naming Conventions. -->
<!-- See http://checkstyle.sf.net/config_naming.html -->
<!--module name="ConstantName"/-->
<!--module name="LocalFinalVariableName"/-->
<!--module name="LocalVariableName"/-->
<!--module name="MemberName"/-->
<!--module name="MethodName"/-->
<!--module name="PackageName"/-->
<!--module name="ParameterName"/-->
<!--module name="StaticVariableName"/-->
<!--module name="TypeName"/-->
<!-- Checks for imports -->
<!-- See http://checkstyle.sf.net/config_import.html -->
<module name="AvoidStarImport"/>
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<!--module name="LineLength"/-->
<!--module name="MethodLength"/-->
<!--module name="ParameterNumber"/-->
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<!--module name="EmptyForIteratorPad"/-->
<!--module name="MethodParamPad"/-->
<!--module name="NoWhitespaceAfter"/-->
<!--module name="NoWhitespaceBefore"/-->
<!--module name="OperatorWrap"/-->
<!--module name="ParenPad"/-->
<!--module name="TypecastParenPad"/-->
<!--module name="WhitespaceAfter"/-->
<!--module name="WhitespaceAround"/-->
<!-- Modifier Checks -->
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
<!--module name="ModifierOrder"/-->
<!--module name="RedundantModifier"/-->
<!-- Checks for blocks. You know, those {}'s -->
<!-- See http://checkstyle.sf.net/config_blocks.html -->
<!--module name="AvoidNestedBlocks"/-->
<!--module name="EmptyBlock"/-->
<!--module name="LeftCurly"/-->
<!--module name="NeedBraces"/-->
<!--module name="RightCurly"/-->
<!-- Checks for common coding problems -->
<!-- See http://checkstyle.sf.net/config_coding.html -->
<!--module name="AvoidInlineConditionals"/-->
<!--module name="DoubleCheckedLocking"/--> <!-- MY FAVOURITE -->
<!--module name="EmptyStatement"/-->
<!--module name="EqualsHashCode"/-->
<!--module name="HiddenField"/-->
<!--module name="IllegalInstantiation"/-->
<!--module name="InnerAssignment"/-->
<!--module name="MagicNumber"/-->
<!--module name="MissingSwitchDefault"/-->
<!--module name="RedundantThrows"/-->
<!--module name="SimplifyBooleanExpression"/-->
<!--module name="SimplifyBooleanReturn"/-->
<!-- Checks for class design -->
<!-- See http://checkstyle.sf.net/config_design.html -->
<!--module name="DesignForExtension"/-->
<!--module name="FinalClass"/-->
<!--module name="HideUtilityClassConstructor"/-->
<!--module name="InterfaceIsType"/-->
<!--module name="VisibilityModifier"/-->
<!-- Miscellaneous other checks. -->
<!-- See http://checkstyle.sf.net/config_misc.html -->
<!--module name="ArrayTypeStyle"/-->
<!--module name="FinalParameters"/-->
<!--module name="TodoComment"/-->
<!--module name="UpperEll"/-->
</module>
</module>

@ -1,75 +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>
<groupId>com.actionbarsherlock</groupId>
<artifactId>plugin-maps</artifactId>
<name>Plugin: Maps</name>
<packaging>jar</packaging>
<parent>
<groupId>com.actionbarsherlock</groupId>
<artifactId>parent-plugins</artifactId>
<version>3.5.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>android</groupId>
<artifactId>android</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.android.maps</groupId>
<artifactId>maps</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.actionbarsherlock</groupId>
<artifactId>library</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>${apk.prefix}-${project.artifactId}-${project.version}</finalName>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>maven-android-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>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>${project.basedir}/checkstyle.xml</configLocation>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>checkstyle</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

@ -1,13 +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=Google Inc.:Google APIs:13
android.library.reference.1=../../library

@ -1,47 +0,0 @@
#!/usr/bin/env python
import os
import re
dir_maps_base = os.path.dirname(os.path.realpath(__file__))
dir_repo_base = os.path.dirname(os.path.dirname(dir_maps_base))
dir_lib_base = os.path.join(dir_repo_base, 'library')
path_to_source_activity = 'src/android/support/v4/app/FragmentActivity.java'.split('/')
path_to_dest_activity = 'src/android/support/v4/app/FragmentMapActivity.java'.split('/')
file_source = os.path.join(dir_lib_base , *path_to_source_activity)
file_dest = os.path.join(dir_maps_base, *path_to_dest_activity)
# Read in entire source file
code = None
with open(file_source) as f:
code = f.read()
code = code.split('\n')
# Add MapActivity import
code.insert(31, 'import com.google.android.maps.MapActivity;')
code = '\n'.join(code)
# Class declaration
code = code.replace('class FragmentActivity extends Activity', 'abstract class FragmentMapActivity extends MapActivity')
# TAG variable content
code = code.replace('"FragmentActivity"', '"FragmentMapActivity"')
# Update inner class references
code = code.replace('FragmentActivity.this', 'FragmentMapActivity.this')
# Class constructor
code = code.replace('FragmentActivity()', 'FragmentMapActivity()')
# Javadoc
code = code.replace('Fragment, and Loader APIs.', 'Fragment, Loader, and Google Map APIs.')
# Exit stage left
with open(file_dest, 'w') as f:
f.write(code)

@ -1,22 +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>
<groupId>com.actionbarsherlock</groupId>
<artifactId>parent-plugins</artifactId>
<name>Plugins (Parent)</name>
<packaging>pom</packaging>
<parent>
<groupId>com.actionbarsherlock</groupId>
<artifactId>parent</artifactId>
<version>3.5.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modules>
<module>maps</module>
<module>preference</module>
</modules>
</project>

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.actionbarsherlock.plugin.maps"
android:versionCode="50"
android:versionName="3.5.0">
<uses-sdk
android:minSdkVersion="4"
android:targetSdkVersion="13" />
</manifest>

@ -1,5 +0,0 @@
ActionBarSherlock Plugin: Preference
====================================
This plugin provides support for an action bar enhanced preference screen
through an additional base activity, `SherlockPreferenceActivity`.

@ -1,115 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<!--module name="NewlineAtEndOfFile"/-->
<module name="FileLength"/>
<module name="FileTabCharacter"/>
<!-- Trailing spaces -->
<module name="RegexpSingleline">
<property name="format" value="\s+$"/>
<property name="message" value="Line has trailing spaces."/>
</module>
<module name="TreeWalker">
<property name="cacheFile" value="${checkstyle.cache.file}"/>
<!-- Checks for Javadoc comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
<!--module name="JavadocMethod"/-->
<!--module name="JavadocType"/-->
<!--module name="JavadocVariable"/-->
<!--module name="JavadocStyle"/-->
<!-- Checks for Naming Conventions. -->
<!-- See http://checkstyle.sf.net/config_naming.html -->
<!--module name="ConstantName"/-->
<!--module name="LocalFinalVariableName"/-->
<!--module name="LocalVariableName"/-->
<!--module name="MemberName"/-->
<!--module name="MethodName"/-->
<!--module name="PackageName"/-->
<!--module name="ParameterName"/-->
<!--module name="StaticVariableName"/-->
<!--module name="TypeName"/-->
<!-- Checks for imports -->
<!-- See http://checkstyle.sf.net/config_import.html -->
<module name="AvoidStarImport"/>
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<!--module name="LineLength"/-->
<!--module name="MethodLength"/-->
<!--module name="ParameterNumber"/-->
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<!--module name="EmptyForIteratorPad"/-->
<!--module name="MethodParamPad"/-->
<!--module name="NoWhitespaceAfter"/-->
<!--module name="NoWhitespaceBefore"/-->
<!--module name="OperatorWrap"/-->
<!--module name="ParenPad"/-->
<!--module name="TypecastParenPad"/-->
<!--module name="WhitespaceAfter"/-->
<!--module name="WhitespaceAround"/-->
<!-- Modifier Checks -->
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
<!--module name="ModifierOrder"/-->
<!--module name="RedundantModifier"/-->
<!-- Checks for blocks. You know, those {}'s -->
<!-- See http://checkstyle.sf.net/config_blocks.html -->
<!--module name="AvoidNestedBlocks"/-->
<!--module name="EmptyBlock"/-->
<!--module name="LeftCurly"/-->
<!--module name="NeedBraces"/-->
<!--module name="RightCurly"/-->
<!-- Checks for common coding problems -->
<!-- See http://checkstyle.sf.net/config_coding.html -->
<!--module name="AvoidInlineConditionals"/-->
<!--module name="DoubleCheckedLocking"/--> <!-- MY FAVOURITE -->
<!--module name="EmptyStatement"/-->
<!--module name="EqualsHashCode"/-->
<!--module name="HiddenField"/-->
<!--module name="IllegalInstantiation"/-->
<!--module name="InnerAssignment"/-->
<!--module name="MagicNumber"/-->
<!--module name="MissingSwitchDefault"/-->
<!--module name="RedundantThrows"/-->
<!--module name="SimplifyBooleanExpression"/-->
<!--module name="SimplifyBooleanReturn"/-->
<!-- Checks for class design -->
<!-- See http://checkstyle.sf.net/config_design.html -->
<!--module name="DesignForExtension"/-->
<!--module name="FinalClass"/-->
<!--module name="HideUtilityClassConstructor"/-->
<!--module name="InterfaceIsType"/-->
<!--module name="VisibilityModifier"/-->
<!-- Miscellaneous other checks. -->
<!-- See http://checkstyle.sf.net/config_misc.html -->
<!--module name="ArrayTypeStyle"/-->
<!--module name="FinalParameters"/-->
<!--module name="TodoComment"/-->
<!--module name="UpperEll"/-->
</module>
</module>

@ -1,69 +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>
<groupId>com.actionbarsherlock</groupId>
<artifactId>plugin-preference</artifactId>
<name>Plugin: Preference</name>
<packaging>jar</packaging>
<parent>
<groupId>com.actionbarsherlock</groupId>
<artifactId>parent-plugins</artifactId>
<version>3.5.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>android</groupId>
<artifactId>android</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.actionbarsherlock</groupId>
<artifactId>library</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>${apk.prefix}-${project.artifactId}-${project.version}</finalName>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>maven-android-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>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>${project.basedir}/checkstyle.xml</configLocation>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>checkstyle</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

@ -1,13 +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-13
android.library.reference.1=../../library

@ -1,13 +0,0 @@
ActionBarSherlock Samples
=========================
See [actionbarsherlock.com/samples.html][1] for information on the samples
contained in this folder as well as a list of open source implementations.
[1]: http://actionbarsherlock.com/samples.html

@ -1,181 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="100" android:versionName="4.2.0" package="com.actionbarsherlock.sample.demos">
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16"/>
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
<application android:icon="@drawable/icon" android:label="@string/application_name">
<activity android:label="@string/activity_name" android:name=".SampleList" android:theme="@style/Theme.Sherlock">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:label="@string/action_items" android:name=".ActionItems">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/action_modes" android:name=".ActionModes">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/action_modes_no_action_bar" android:name=".ActionModesNoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/action_providers" android:name=".ActionProviders">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/collapsible" android:name=".CollapsibleActionItem">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/context_menus" android:name=".ContextMenus">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/custom_navigation" android:name=".CustomNavigation">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/feature_toggles" android:name=".FeatureToggles">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/iprogress" android:name=".IndeterminateProgress">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/list_navigation" android:name=".ListNavigation">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/overlay" android:name=".Overlay">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/preference" android:name=".Preference">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/progress" android:name=".Progress">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/search_views" android:name=".SearchViews">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/simple" android:name=".Simple">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/split" android:name=".SplitActionItems" android:uiOptions="splitActionBarWhenNarrow">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/share_action_providers" android:name=".ShareActionProviders">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/split_action_modes" android:name=".SplitActionModes" android:uiOptions="splitActionBarWhenNarrow">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/static_attach" android:name=".StaticAttachment">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/styled" android:name=".Styled" android:theme="@style/Theme.Styled" android:uiOptions="splitActionBarWhenNarrow">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/submenus" android:name=".SubMenus">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/tab_navigation" android:name=".TabNavigation">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/tab_navigation_collapsed" android:name=".TabNavigationCollapsed">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.demos.EXAMPLE"/>
</intent-filter>
</activity>
</application>
</manifest>

@ -1,13 +0,0 @@
ActionBarSherlock Sample: Demos
===============================
See [actionbarsherlock.com/samples.html][1] for information on the sample
contained in this folder.
[1]: http://actionbarsherlock.com/samples.html

@ -1,67 +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>
<artifactId>sample-demos</artifactId>
<name>Sample: Demos</name>
<packaging>apk</packaging>
<parent>
<groupId>com.actionbarsherlock</groupId>
<artifactId>parent-sample</artifactId>
<version>4.2.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.actionbarsherlock</groupId>
<artifactId>actionbarsherlock</artifactId>
<version>${project.version}</version>
<type>apklib</type>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<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>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>../../checkstyle.xml</configLocation>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>checkstyle</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

@ -1,17 +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.
# Project target.
target=android-14
android.library.reference.1=../../library

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 647 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 797 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 578 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 659 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 616 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/bg_striped_img"
android:tileMode="repeat"
android:dither="true" />

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/bg_striped_split_img"
android:tileMode="repeat"
android:dither="true" />

@ -1,393 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/feature_toggles_content"
android:padding="15dp"
android:layout_marginBottom="20dp" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:padding="15dip">
<!-- ACTION BAR DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="ActionBar Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_actionbar_show"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Show" />
<Button
android:id="@+id/display_actionbar_hide"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Hide" />
</LinearLayout>
<!-- NAVIGATION MODE -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Navigation Mode" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/navigation_standard"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Standard" />
<Button
android:id="@+id/navigation_list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="List" />
<Button
android:id="@+id/navigation_tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Tabs" />
</LinearLayout>
<!-- TAB DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Tab Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_tab_add"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Add" />
<Button
android:id="@+id/display_tab_select"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Select Random" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_tab_remove"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Remove" />
<Button
android:id="@+id/display_tab_remove_all"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Remove All" />
</LinearLayout>
<!-- TITLE DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Title Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_title_show"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Show" />
<Button
android:id="@+id/display_title_hide"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Hide" />
</LinearLayout>
<!-- SUBTITLE DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Subtitle Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_subtitle_show"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Show" />
<Button
android:id="@+id/display_subtitle_hide"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Hide" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:padding="15dip">
<!-- ACTION ITEMS DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Action Items Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_items_add"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Add" />
<Button
android:id="@+id/display_items_clear"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Remove All" />
</LinearLayout>
<!-- CUSTOM VIEW DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Custom View Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_custom_show"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Show" />
<Button
android:id="@+id/display_custom_hide"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Hide" />
</LinearLayout>
<!-- HOME DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Home Action Item Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_home_show"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Show" />
<Button
android:id="@+id/display_home_hide"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Hide" />
</LinearLayout>
<!-- LOGO DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Logo Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_logo_show"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Use" />
<Button
android:id="@+id/display_logo_hide"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Do Not Use" />
</LinearLayout>
<!-- HOME AS UP DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Home As Up Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_home_as_up_show"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Show" />
<Button
android:id="@+id/display_home_as_up_hide"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Hide" />
</LinearLayout>
<!-- PROGESS DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Progress Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_progress_show"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Show" />
<Button
android:id="@+id/display_progress_hide"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Hide" />
</LinearLayout>
<!-- INDETERMINATE PROGESS DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Indeterminate Progress Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_iprogress_show"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Show" />
<Button
android:id="@+id/display_iprogress_hide"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Hide" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="20dip">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal">
<Button
android:id="@+id/start"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:text="Start" />
<Button
android:id="@+id/cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Cancel" />
</LinearLayout>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="@string/action_modes_content"/>
</LinearLayout>

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<EditText xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="Search"/>

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="20dip">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal">
<Button
android:id="@+id/show_context_menu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:text="Long-Press Me" />
</LinearLayout>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="@string/context_menus_content"/>
</LinearLayout>

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:gravity="left|center_vertical"
android:orientation="horizontal"
>
<RadioGroup
android:id="@+id/radio_nav"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<RadioButton
android:text="Custom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<RadioButton
android:text="View!"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</RadioGroup>
</LinearLayout>

@ -1,373 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="15dip">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/feature_toggles_content"
android:layout_marginBottom="20dp" />
<!-- ACTION BAR DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="ActionBar Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_actionbar_show"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Show" />
<Button
android:id="@+id/display_actionbar_hide"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Hide" />
</LinearLayout>
<!-- NAVIGATION MODE -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Navigation Mode" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/navigation_standard"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Standard" />
<Button
android:id="@+id/navigation_list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="List" />
<Button
android:id="@+id/navigation_tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Tabs" />
</LinearLayout>
<!-- TAB DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Tab Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_tab_add"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Add" />
<Button
android:id="@+id/display_tab_select"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Select Random" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_tab_remove"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Remove" />
<Button
android:id="@+id/display_tab_remove_all"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Remove All" />
</LinearLayout>
<!-- ACTION ITEMS DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Action Items Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_items_add"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Add" />
<Button
android:id="@+id/display_items_clear"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Remove All" />
</LinearLayout>
<!-- TITLE DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Title Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_title_show"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Show" />
<Button
android:id="@+id/display_title_hide"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Hide" />
</LinearLayout>
<!-- SUBTITLE DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Subtitle Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_subtitle_show"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Show" />
<Button
android:id="@+id/display_subtitle_hide"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Hide" />
</LinearLayout>
<!-- CUSTOM VIEW DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Custom View Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_custom_show"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Show" />
<Button
android:id="@+id/display_custom_hide"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Hide" />
</LinearLayout>
<!-- HOME DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Home Action Item Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_home_show"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Show" />
<Button
android:id="@+id/display_home_hide"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Hide" />
</LinearLayout>
<!-- LOGO DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Logo Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_logo_show"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Use" />
<Button
android:id="@+id/display_logo_hide"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Do Not Use" />
</LinearLayout>
<!-- HOME AS UP DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Home As Up Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_home_as_up_show"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Show" />
<Button
android:id="@+id/display_home_as_up_hide"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Hide" />
</LinearLayout>
<!-- PROGESS DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Progress Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_progress_show"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Show" />
<Button
android:id="@+id/display_progress_hide"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Hide" />
</LinearLayout>
<!-- INDETERMINATE PROGESS DISPLAY -->
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="2dip"
android:text="Indeterminate Progress Display" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="10dip">
<Button
android:id="@+id/display_iprogress_show"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Show" />
<Button
android:id="@+id/display_iprogress_hide"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Hide" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="20dip">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal">
<Button
android:id="@+id/enable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:text="Enable" />
<Button
android:id="@+id/disable"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Disable" />
</LinearLayout>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="@string/iprogress_content" />
</LinearLayout>

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="20dip">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:text="@string/list_navigation_content" />
<TextView
android:id="@+id/text"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="?actionBarSize"
android:orientation="vertical">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="30dp"
android:text="@string/overlay_content" />
<TextView
android:id="@+id/bunch_of_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</ScrollView>
</FrameLayout>

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ListView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawSelectorOnTop="false"
android:scrollbarAlwaysDrawVerticalTrack="true"
/>

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:gravity="center_horizontal"
android:padding="20dip">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:text="@string/progress_content" />
<Button
android:id="@+id/go"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="40dp"
android:paddingRight="40dp"
android:text="Go" />
</LinearLayout>

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center"
android:focusable="true"
android:addStatesFromChildren="true"
android:background="?attr/actionBarItemBackground"
style="?attr/actionButtonStyle">
<ImageButton android:id="@+id/button"
android:background="@drawable/ic_launcher_settings"
android:layout_width="32dip"
android:layout_height="32dip"
android:layout_gravity="center"
android:scaleType="fitCenter"
android:adjustViewBounds="true" />
</LinearLayout>

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true"/>
</LinearLayout>

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="20dip">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:text="@string/tab_navigation_content" />
<TextView
android:id="@+id/text"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="20dip">
<TextView
android:id="@+id/text"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 Google Inc.
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.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/menu_item_action_provider_action_bar"
android:showAsAction="ifRoom"
android:title="Settings"
android:actionProviderClass="com.actionbarsherlock.sample.demos.ActionProviders$SettingsActionProvider"/>
<item android:id="@+id/menu_item_action_provider_overflow"
android:showAsAction="never"
android:title="Settings"
android:actionProviderClass="com.actionbarsherlock.sample.demos.ActionProviders$SettingsActionProvider"/>
</menu>

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 Google Inc.
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.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/menu_item_share_action_provider_action_bar"
android:showAsAction="always"
android:title="@string/action_bar_share_with"
android:actionProviderClass="com.actionbarsherlock.widget.ShareActionProvider" />
<!-- XXX: For now, ShareActionProviders must be displayed on the action bar -->
<!--item android:id="@+id/menu_item_share_action_provider_overflow"
android:showAsAction="never"
android:title="@string/action_bar_share_with"
android:actionProviderClass="com.actionbarsherlock.widget.ShareActionProvider" /-->
</menu>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="entries_list_preference">
<item>Alpha Option 01</item>
<item>Beta Option 02</item>
<item>Charlie Option 03</item>
</string-array>
<string-array name="entryvalues_list_preference">
<item>alpha</item>
<item>beta</item>
<item>charlie</item>
</string-array>
<string-array name="locations">
<item>Home</item>
<item>Email</item>
<item>Calendar</item>
<item>Browser</item>
<item>Clock</item>
</string-array>
</resources>

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<drawable name="ab_bg_black">#aa000000</drawable>
</resources>

@ -1,121 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="application_name">ActionBarSherlock Demos</string>
<string name="activity_name">ABS: Demos</string>
<string name="action_items">Action Items</string>
<string name="action_items_content">The action bar creates a unified and persistant navigation experience for your application and action items are a great way to provide a clear indication of what the user can do.</string>
<string name="action_modes">Action Modes</string>
<string name="action_modes_content">Action modes are used to display contextual information based on some interaction made by the user (long press, checkbox selection, etc). Like the normal action bar they also support splitting the action items to the bottom of the screen on small devices.</string>
<string name="action_modes_no_action_bar">Action Modes (No Action Bar)</string>
<string name="share_action_providers">Share Action Providers</string>
<string name="share_action_providers_content">This activity demonstrates how to use an ActionProvider for adding functionality to the Action Bar. In particular this demo is adding a menu item with ShareActionProvider as its action provider. The ShareActionProvider is responsible for managing the UI for sharing actions.\n\nFor now, ShareActionProviders must be displayed on the action bar</string>
<string name="action_providers">Action Providers</string>
<string name="action_providers_content">This activity demonstrates how to implement an ActionProvider for adding functionality to the Action Bar. In particular this demo creates an ActionProvider for launching the system settings and adds a menu item with that provider.</string>
<string name="collapsible">Collapsible Action Items</string>
<string name="collapsible_content">This activity is a demonstration of how collapsible action items work. When you are concerned about the available room for items on small screens you should use this feature.\n\nIf you are looking for a proper SearchView implementation, see this "Search Views" example.</string>
<string name="context_menus">Context Menus</string>
<string name="context_menus_content">Since both ActionBarSherlock and Android use \'Menu\' and \'MenuItem\' class names you must take extra care when using context menus. It is still very much possible to use both in a single activity.</string>
<string name="custom_navigation">Custom Navigation</string>
<string name="custom_navigation_content">If you find that list and tab navigation are not suitable for your application you may replace it with a custom layout.</string>
<string name="dialog">Dialog</string>
<string name="dialog_content">This is a demonstration of how you can give an activity the look of a dialog.\n\nWhile there is a light version of this theme, it cannot be set programmatically without disabling the fancy transparent outer background. In order for this effect the theme must be set in the manifest.</string>
<string name="feature_toggles">Feature Toggles</string>
<string name="feature_toggles_content">Use these buttons to create various configurations with the action bar to see how it behaves.</string>
<string name="iprogress">Indeterminate Progress</string>
<string name="iprogress_content">The action bar includes a standard indeterminate progress bar. The methods for accessing it are prefixed with `support`. See the source for this demo for more information.</string>
<string name="list_navigation">List Navigation</string>
<string name="list_navigation_content">List navigation requires the use of a special layout for the spinner item. Failure to use it will result in your spinner text being the same color as the action bar background on pre-3.0. See the source code of this demo for more information.</string>
<string name="overlay">Overlay</string>
<string name="overlay_content">Overlay can be useful if you have a lot of scrolling content, especially if that content is images. Remember to lead your content with a margin so that it starts below the action bar when scrolled to the top.</string>
<string name="preference">Preference</string>
<string name="preference_content">You can use the `SherlockPreferenceActivity` base class to place the action bar on top of a normal `PreferenceActivity`.\n\nThis does not yet support the use of `PreferenceFragments`, however.</string>
<string name="progress">Progress</string>
<string name="progress_content">The action bar includes a standard progress bar. The methods for accessing it are prefixed with `support`. See the source for this demo for more information.</string>
<string name="search_views">Search Views</string>
<string name="search_views_content">SearchView allows you provide a unified mechanism of searching with optional featurs such as auto-completion and an always-expanded mode.</string>
<string name="simple">Simple</string>
<string name="simple_content">This is a simple showcase of how easy it is to add the action bar to your activities. Take a look at the source code, it\'s surprisingly simple!</string>
<string name="split">Split Action Items</string>
<string name="split_content">This activity is a demonstration of how split action items work. When you are concerned about the available room for items on small screens you should use this feature.</string>
<string name="split_action_modes">Split Action Modes</string>
<string name="static_attach">Static Attachment</string>
<string name="static_attach_content">This is a simple showcase of how easy it is to add the action bar to your activities without having to extend from a custom activity. Take a look at the source code, it\'s surprisingly simple!</string>
<string name="styled">Styled</string>
<string name="styled_content">This is a simple showcase of how to style the action bar to your liking. Be sure to remember that you need to consider both the custom and native action bar when styling. Looking at this activity\'s style is a good way to start.</string>
<string name="submenus">Sub-menus</string>
<string name="submenus_content">This activity is a demonstration of how sub-menus work when they are either an action item or an item in the overflow menu.</string>
<string name="tab_navigation">Tab Navigation</string>
<string name="tab_navigation_content">Tabs can be useful for switching between a limited number of items. You can also collapse the main body of the action bar on small devices so that only the tab bar is displayed. See the source for more information.</string>
<string name="tab_navigation_collapsed">Tab Navigation (Collapsed)</string>
<string name="action_bar_share_with">Share with…</string>
<string name="inline_preferences">In-line preferences</string>
<string name="dialog_based_preferences">Dialog-based preferences</string>
<string name="launch_preferences">Launch preferences</string>
<string name="preference_attributes">Preference attributes</string>
<string name="title_checkbox_preference">Checkbox preference</string>
<string name="summary_checkbox_preference">This is a checkbox</string>
<string name="title_edittext_preference">Edit text preference</string>
<string name="summary_edittext_preference">An example that uses an edit text dialog</string>
<string name="dialog_title_edittext_preference">Enter your favorite animal</string>
<string name="title_list_preference">List preference</string>
<string name="summary_list_preference">An example that uses a list dialog</string>
<string name="dialog_title_list_preference">Choose one</string>
<string name="title_intent_preference">Intent preference</string>
<string name="summary_intent_preference">Launches an Activity from an Intent</string>
<string name="title_my_preference">My preference</string>
<string name="summary_my_preference">This is a custom counter preference</string>
<string name="title_advanced_toggle_preference">Haunted preference</string>
<string name="summary_on_advanced_toggle_preference">I\'m on! :)</string>
<string name="summary_off_advanced_toggle_preference">I\'m off! :(</string>
<string name="title_parent_preference">Parent checkbox preference</string>
<string name="summary_parent_preference">This is visually a parent</string>
<string name="title_child_preference">Child checkbox preference</string>
<string name="summary_child_preference">This is visually a child</string>
<string name="example_preference_dependency">Example preference dependency</string>
<string name="title_wifi">WiFi</string>
<string name="title_wifi_settings">WiFi settings</string>
<string name="default_value_list_preference">beta</string>
<string name="default_value_edittext_preference">Default value</string>
</resources>

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Styled" parent="Theme.Sherlock.Light.DarkActionBar">
<item name="actionBarStyle">@style/Widget.Styled.ActionBar</item>
<item name="android:actionBarStyle">@style/Widget.Styled.ActionBar</item>
</style>
<style name="Widget.Styled.ActionBar" parent="Widget.Sherlock.Light.ActionBar.Solid.Inverse">
<item name="background">@drawable/bg_striped</item>
<item name="android:background">@drawable/bg_striped</item>
<item name="backgroundSplit">@drawable/bg_striped_split</item>
<item name="android:backgroundSplit">@drawable/bg_striped_split</item>
</style>
</resources>

@ -1,82 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 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.
-->
<!-- This is a primitive example showing the different types of preferences available. -->
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="@string/inline_preferences">
<CheckBoxPreference
android:key="checkbox_preference"
android:title="@string/title_checkbox_preference"
android:summary="@string/summary_checkbox_preference" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/dialog_based_preferences">
<EditTextPreference
android:key="edittext_preference"
android:title="@string/title_edittext_preference"
android:summary="@string/summary_edittext_preference"
android:dialogTitle="@string/dialog_title_edittext_preference" />
<ListPreference
android:key="list_preference"
android:title="@string/title_list_preference"
android:summary="@string/summary_list_preference"
android:entries="@array/entries_list_preference"
android:entryValues="@array/entryvalues_list_preference"
android:dialogTitle="@string/dialog_title_list_preference" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/launch_preferences">
<PreferenceScreen
android:title="@string/title_intent_preference"
android:summary="@string/summary_intent_preference">
<intent android:action="android.intent.action.VIEW"
android:data="http://www.android.com" />
</PreferenceScreen>
</PreferenceCategory>
<PreferenceCategory
android:title="@string/preference_attributes">
<CheckBoxPreference
android:key="parent_checkbox_preference"
android:title="@string/title_parent_preference"
android:summary="@string/summary_parent_preference" />
<!-- The visual style of a child is defined by this styled theme attribute. -->
<CheckBoxPreference
android:key="child_checkbox_preference"
android:dependency="parent_checkbox_preference"
android:layout="?android:attr/preferenceLayoutChild"
android:title="@string/title_child_preference"
android:summary="@string/summary_child_preference" />
</PreferenceCategory>
</PreferenceScreen>

@ -1,56 +0,0 @@
/*
* Copyright (C) 2011 Jake Wharton
*
* 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.
*/
package com.actionbarsherlock.sample.demos;
import android.os.Bundle;
import android.widget.TextView;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
public class ActionItems extends SherlockActivity {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
//Used to put dark icons on light action bar
boolean isLight = SampleList.THEME == R.style.Theme_Sherlock_Light;
menu.add("Save")
.setIcon(isLight ? R.drawable.ic_compose_inverse : R.drawable.ic_compose)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
menu.add("Search")
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
menu.add("Refresh")
.setIcon(isLight ? R.drawable.ic_refresh_inverse : R.drawable.ic_refresh)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
return true;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(SampleList.THEME); //Used for theme switching in samples
super.onCreate(savedInstanceState);
setContentView(R.layout.text);
setContent((TextView)findViewById(R.id.text));
}
protected void setContent(TextView view) {
view.setText(R.string.action_items_content);
}
}

@ -1,102 +0,0 @@
/*
* Copyright (C) 2011 Jake Wharton
*
* 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.
*/
package com.actionbarsherlock.sample.demos;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.ActionMode;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
public class ActionModes extends SherlockActivity {
ActionMode mMode;
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(SampleList.THEME); //Used for theme switching in samples
super.onCreate(savedInstanceState);
setContentView(R.layout.action_modes);
((Button)findViewById(R.id.start)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mMode = startActionMode(new AnActionModeOfEpicProportions());
}
});
((Button)findViewById(R.id.cancel)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (mMode != null) {
mMode.finish();
}
}
});
}
private final class AnActionModeOfEpicProportions implements ActionMode.Callback {
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
//Used to put dark icons on light action bar
boolean isLight = SampleList.THEME == R.style.Theme_Sherlock_Light;
menu.add("Save")
.setIcon(isLight ? R.drawable.ic_compose_inverse : R.drawable.ic_compose)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
menu.add("Search")
.setIcon(isLight ? R.drawable.ic_search_inverse : R.drawable.ic_search)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
menu.add("Refresh")
.setIcon(isLight ? R.drawable.ic_refresh_inverse : R.drawable.ic_refresh)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
menu.add("Save")
.setIcon(isLight ? R.drawable.ic_compose_inverse : R.drawable.ic_compose)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
menu.add("Search")
.setIcon(isLight ? R.drawable.ic_search_inverse : R.drawable.ic_search)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
menu.add("Refresh")
.setIcon(isLight ? R.drawable.ic_refresh_inverse : R.drawable.ic_refresh)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
return true;
}
@Override
public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
return false;
}
@Override
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
Toast.makeText(ActionModes.this, "Got click: " + item, Toast.LENGTH_SHORT).show();
mode.finish();
return true;
}
@Override
public void onDestroyActionMode(ActionMode mode) {
}
}
}

@ -1,107 +0,0 @@
/*
* Copyright (C) 2011 Jake Wharton
*
* 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.
*/
package com.actionbarsherlock.sample.demos;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.ActionMode;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
import com.actionbarsherlock.view.Window;
public class ActionModesNoActionBar extends SherlockActivity {
ActionMode mMode;
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(SampleList.THEME); //Used for theme switching in samples
//You could also use Theme.Sherlock.NoActionBar or Theme.Sherlock.Light.NoActionBar
requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
setContentView(R.layout.action_modes);
((Button)findViewById(R.id.start)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mMode = startActionMode(new AnActionModeOfEpicProportions());
}
});
((Button)findViewById(R.id.cancel)).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (mMode != null) {
mMode.finish();
}
}
});
}
private final class AnActionModeOfEpicProportions implements ActionMode.Callback {
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
//Used to put dark icons on light action bar
boolean isLight = SampleList.THEME == R.style.Theme_Sherlock_Light;
menu.add("Save")
.setIcon(isLight ? R.drawable.ic_compose_inverse : R.drawable.ic_compose)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
menu.add("Search")
.setIcon(isLight ? R.drawable.ic_search_inverse : R.drawable.ic_search)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
menu.add("Refresh")
.setIcon(isLight ? R.drawable.ic_refresh_inverse : R.drawable.ic_refresh)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
menu.add("Save")
.setIcon(isLight ? R.drawable.ic_compose_inverse : R.drawable.ic_compose)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
menu.add("Search")
.setIcon(isLight ? R.drawable.ic_search_inverse : R.drawable.ic_search)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
menu.add("Refresh")
.setIcon(isLight ? R.drawable.ic_refresh_inverse : R.drawable.ic_refresh)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
return true;
}
@Override
public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
return false;
}
@Override
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
Toast.makeText(ActionModesNoActionBar.this, "Got click: " + item, Toast.LENGTH_SHORT).show();
mode.finish();
return true;
}
@Override
public void onDestroyActionMode(ActionMode mode) {
}
}
}

@ -1,121 +0,0 @@
/*
* Copyright (C) 2011 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.
*/
package com.actionbarsherlock.sample.demos;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.provider.Settings;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageButton;
import android.widget.TextView;
import android.widget.Toast;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.ActionProvider;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
/**
* This activity demonstrates how to implement an {@link android.view.ActionProvider}
* for adding functionality to the Action Bar. In particular this demo creates an
* ActionProvider for launching the system settings and adds a menu item with that
* provider.
*/
public class ActionProviders extends SherlockActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
setTheme(SampleList.THEME); //Used for theme switching in samples
super.onCreate(savedInstanceState);
setContentView(R.layout.text);
((TextView)findViewById(R.id.text)).setText(R.string.action_providers_content);
}
/**
* {@inheritDoc}
*/
@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
getSupportMenuInflater().inflate(R.menu.settings_action_provider, menu);
return true;
}
/**
* {@inheritDoc}
*/
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// If this callback does not handle the item click, onPerformDefaultAction
// of the ActionProvider is invoked. Hence, the provider encapsulates the
// complete functionality of the menu item.
Toast.makeText(this, "Handling in onOptionsItemSelected avoided",
Toast.LENGTH_SHORT).show();
return false;
}
public static class SettingsActionProvider extends ActionProvider {
/** An intent for launching the system settings. */
private static final Intent sSettingsIntent = new Intent(Settings.ACTION_SETTINGS);
/** Context for accessing resources. */
private final Context mContext;
/**
* Creates a new instance.
*
* @param context Context for accessing resources.
*/
public SettingsActionProvider(Context context) {
super(context);
mContext = context;
}
/**
* {@inheritDoc}
*/
@Override
public View onCreateActionView() {
// Inflate the action view to be shown on the action bar.
LayoutInflater layoutInflater = LayoutInflater.from(mContext);
View view = layoutInflater.inflate(R.layout.settings_action_provider, null);
ImageButton button = (ImageButton) view.findViewById(R.id.button);
// Attach a click listener for launching the system settings.
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mContext.startActivity(sSettingsIntent);
}
});
return view;
}
/**
* {@inheritDoc}
*/
@Override
public boolean onPerformDefaultAction() {
// This is called if the host menu item placed in the overflow menu of the
// action bar is clicked and the host activity did not handle the click.
mContext.startActivity(sSettingsIntent);
return true;
}
}
}

@ -1,46 +0,0 @@
/*
* Copyright (C) 2012 Scott Kennedy
*
* 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.
*/
package com.actionbarsherlock.sample.demos;
import android.os.Bundle;
import android.widget.TextView;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
public class CollapsibleActionItem extends SherlockActivity {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
//Used to put dark icons on light action bar
boolean isLight = SampleList.THEME == R.style.Theme_Sherlock_Light;
menu.add("Search")
.setIcon(isLight ? R.drawable.ic_search_inverse : R.drawable.ic_search)
.setActionView(R.layout.collapsible_edittext)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW);
return true;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(SampleList.THEME); //Used for theme switching in samples
super.onCreate(savedInstanceState);
setContentView(R.layout.text);
((TextView)findViewById(R.id.text)).setText(R.string.collapsible_content);
}
}

@ -1,75 +0,0 @@
/*
* Copyright (C) 2011 Jake Wharton
*
* 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.
*/
package com.actionbarsherlock.sample.demos;
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.View;
import android.widget.Toast;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
public class ContextMenus extends SherlockActivity {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
//Used to put dark icons on light action bar
boolean isLight = SampleList.THEME == R.style.Theme_Sherlock_Light;
menu.add("Save")
.setIcon(isLight ? R.drawable.ic_compose_inverse : R.drawable.ic_compose)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
menu.add("Search")
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
menu.add("Refresh")
.setIcon(isLight ? R.drawable.ic_refresh_inverse : R.drawable.ic_refresh)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
//This uses the imported MenuItem from ActionBarSherlock
Toast.makeText(this, "Got click: " + item.toString(), Toast.LENGTH_SHORT).show();
return true;
}
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
menu.add("One");
menu.add("Two");
menu.add("Three");
menu.add("Four");
}
@Override
public boolean onContextItemSelected(android.view.MenuItem item) {
//Note how this callback is using the fully-qualified class name
Toast.makeText(this, "Got click: " + item.toString(), Toast.LENGTH_SHORT).show();
return true;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(SampleList.THEME); //Used for theme switching in samples
super.onCreate(savedInstanceState);
setContentView(R.layout.context_menus);
registerForContextMenu(findViewById(R.id.show_context_menu));
}
}

@ -1,51 +0,0 @@
/*
* Copyright (C) 2011 Jake Wharton
*
* 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.
*/
package com.actionbarsherlock.sample.demos;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.RadioGroup;
import android.widget.Toast;
import android.widget.RadioGroup.OnCheckedChangeListener;
import android.widget.TextView;
import com.actionbarsherlock.app.SherlockActivity;
public class CustomNavigation extends SherlockActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(SampleList.THEME); //Used for theme switching in samples
super.onCreate(savedInstanceState);
setContentView(R.layout.text);
((TextView)findViewById(R.id.text)).setText(R.string.custom_navigation_content);
//Inflate the custom view
View customNav = LayoutInflater.from(this).inflate(R.layout.custom_view, null);
//Bind to its state change
((RadioGroup)customNav.findViewById(R.id.radio_nav)).setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
Toast.makeText(CustomNavigation.this, "Navigation selection changed.", Toast.LENGTH_SHORT).show();
}
});
//Attach to the action bar
getSupportActionBar().setCustomView(customNav);
getSupportActionBar().setDisplayShowCustomEnabled(true);
}
}

@ -1,271 +0,0 @@
package com.actionbarsherlock.sample.demos;
import java.util.Random;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.ActionBar.Tab;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
import com.actionbarsherlock.view.Window;
public class FeatureToggles extends SherlockActivity implements ActionBar.TabListener {
private static final Random RANDOM = new Random();
private int items = 0;
@Override
public boolean onCreateOptionsMenu(Menu menu) {
for (int i = 0; i < items; i++) {
menu.add("Text")
.setIcon(R.drawable.ic_title_share_default)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
}
return super.onCreateOptionsMenu(menu);
}
@Override
public void onCreate(Bundle savedInstanceState) {
setTheme(SampleList.THEME); //Used for theme switching in samples
requestWindowFeature(Window.FEATURE_PROGRESS);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
super.onCreate(savedInstanceState);
setContentView(R.layout.feature_toggles);
setSupportProgressBarIndeterminateVisibility(false);
setSupportProgressBarVisibility(false);
getSupportActionBar().setCustomView(R.layout.custom_view);
getSupportActionBar().setDisplayShowCustomEnabled(false);
Context context = getSupportActionBar().getThemedContext();
ArrayAdapter<CharSequence> listAdapter = ArrayAdapter.createFromResource(context, R.array.locations, R.layout.sherlock_spinner_item);
listAdapter.setDropDownViewResource(R.layout.sherlock_spinner_dropdown_item);
getSupportActionBar().setListNavigationCallbacks(listAdapter, null);
findViewById(R.id.display_progress_show).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
setSupportProgressBarVisibility(true);
setSupportProgressBarIndeterminateVisibility(false);
setSupportProgress(RANDOM.nextInt(8000) + 10);
}
});
findViewById(R.id.display_progress_hide).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
setSupportProgressBarVisibility(false);
}
});
findViewById(R.id.display_iprogress_show).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//Hack to hide the regular progress bar
setSupportProgress(Window.PROGRESS_END);
setSupportProgressBarIndeterminateVisibility(true);
}
});
findViewById(R.id.display_iprogress_hide).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
setSupportProgressBarIndeterminateVisibility(false);
}
});
findViewById(R.id.display_items_clear).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
items = 0;
invalidateOptionsMenu();
}
});
findViewById(R.id.display_items_add).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
items += 1;
invalidateOptionsMenu();
}
});
findViewById(R.id.display_subtitle_show).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getSupportActionBar().setSubtitle("The quick brown fox jumps over the lazy dog.");
}
});
findViewById(R.id.display_subtitle_hide).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getSupportActionBar().setSubtitle(null);
}
});
findViewById(R.id.display_title_show).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getSupportActionBar().setDisplayShowTitleEnabled(true);
}
});
findViewById(R.id.display_title_hide).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getSupportActionBar().setDisplayShowTitleEnabled(false);
}
});
findViewById(R.id.display_custom_show).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getSupportActionBar().setDisplayShowCustomEnabled(true);
}
});
findViewById(R.id.display_custom_hide).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getSupportActionBar().setDisplayShowCustomEnabled(false);
}
});
findViewById(R.id.navigation_standard).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
}
});
findViewById(R.id.navigation_list).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
}
});
findViewById(R.id.navigation_tabs).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
}
});
findViewById(R.id.display_home_as_up_show).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
});
findViewById(R.id.display_home_as_up_hide).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
}
});
findViewById(R.id.display_logo_show).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getSupportActionBar().setDisplayUseLogoEnabled(true);
}
});
findViewById(R.id.display_logo_hide).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getSupportActionBar().setDisplayUseLogoEnabled(false);
}
});
findViewById(R.id.display_home_show).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getSupportActionBar().setDisplayShowHomeEnabled(true);
}
});
findViewById(R.id.display_home_hide).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getSupportActionBar().setDisplayShowHomeEnabled(false);
}
});
findViewById(R.id.display_actionbar_show).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getSupportActionBar().show();
}
});
findViewById(R.id.display_actionbar_hide).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getSupportActionBar().hide();
}
});
Button tabAdd = (Button)findViewById(R.id.display_tab_add);
tabAdd.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
ActionBar.Tab newTab = getSupportActionBar().newTab();
if (RANDOM.nextBoolean()) {
newTab.setCustomView(R.layout.tab_custom_view);
} else {
boolean icon = RANDOM.nextBoolean();
if (icon) {
newTab.setIcon(R.drawable.ic_title_share_default);
}
if (!icon || RANDOM.nextBoolean()) {
newTab.setText("Text!");
}
}
newTab.setTabListener(FeatureToggles.this);
getSupportActionBar().addTab(newTab);
}
});
//Add some tabs
tabAdd.performClick();
tabAdd.performClick();
tabAdd.performClick();
findViewById(R.id.display_tab_select).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (getSupportActionBar().getTabCount() > 0) {
getSupportActionBar().selectTab(
getSupportActionBar().getTabAt(
RANDOM.nextInt(getSupportActionBar().getTabCount())
)
);
}
}
});
findViewById(R.id.display_tab_remove).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (getSupportActionBar().getTabCount() > 0) {
getSupportActionBar().removeTabAt(getSupportActionBar().getTabCount() - 1);
}
}
});
findViewById(R.id.display_tab_remove_all).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
getSupportActionBar().removeAllTabs();
}
});
}
@Override
public void onTabSelected(Tab tab, FragmentTransaction transaction) {}
@Override
public void onTabUnselected(Tab tab, FragmentTransaction transaction) {}
@Override
public void onTabReselected(Tab tab, FragmentTransaction transaction) {}
}

@ -1,49 +0,0 @@
/*
* Copyright (C) 2011 Jake Wharton
*
* 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.
*/
package com.actionbarsherlock.sample.demos;
import android.os.Bundle;
import android.view.View;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.Window;
public class IndeterminateProgress extends SherlockActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(SampleList.THEME); //Used for theme switching in samples
super.onCreate(savedInstanceState);
//This has to be called before setContentView and you must use the
//class in com.actionbarsherlock.view and NOT android.view
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.iprogress);
findViewById(R.id.enable).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
setSupportProgressBarIndeterminateVisibility(true);
}
});
findViewById(R.id.disable).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
setSupportProgressBarIndeterminateVisibility(false);
}
});
}
}

@ -1,37 +0,0 @@
package com.actionbarsherlock.sample.demos;
import android.content.Context;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockActivity;
public class ListNavigation extends SherlockActivity implements ActionBar.OnNavigationListener {
private TextView mSelected;
private String[] mLocations;
@Override
public void onCreate(Bundle savedInstanceState) {
setTheme(SampleList.THEME); //Used for theme switching in samples
super.onCreate(savedInstanceState);
setContentView(R.layout.list_navigation);
mSelected = (TextView)findViewById(R.id.text);
mLocations = getResources().getStringArray(R.array.locations);
Context context = getSupportActionBar().getThemedContext();
ArrayAdapter<CharSequence> list = ArrayAdapter.createFromResource(context, R.array.locations, R.layout.sherlock_spinner_item);
list.setDropDownViewResource(R.layout.sherlock_spinner_dropdown_item);
getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
getSupportActionBar().setListNavigationCallbacks(list, this);
}
@Override
public boolean onNavigationItemSelected(int itemPosition, long itemId) {
mSelected.setText("Selected: " + mLocations[itemPosition]);
return true;
}
}

@ -1,245 +0,0 @@
/*
* Copyright (C) 2011 Jake Wharton
*
* 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.
*/
package com.actionbarsherlock.sample.demos;
import android.os.Bundle;
import android.widget.TextView;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.Window;
public class Overlay extends SherlockActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(SampleList.THEME); //Used for theme switching in samples
requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
super.onCreate(savedInstanceState);
setContentView(R.layout.overlay);
//Load partially transparent black background
getSupportActionBar().setBackgroundDrawable(getResources().getDrawable(R.drawable.ab_bg_black));
StringBuilder builder = new StringBuilder();
for (int i = 0; i < 3; i++) {
for (String dialog : DIALOGUE) {
builder.append(dialog).append("\n\n");
}
}
TextView bunchOfText = (TextView)findViewById(R.id.bunch_of_text);
bunchOfText.setText(builder.toString());
}
public static final String[] DIALOGUE = new String[] {
"So shaken as we are, so wan with care," +
"Find we a time for frighted peace to pant," +
"And breathe short-winded accents of new broils" +
"To be commenced in strands afar remote." +
"No more the thirsty entrance of this soil" +
"Shall daub her lips with her own children's blood;" +
"Nor more shall trenching war channel her fields," +
"Nor bruise her flowerets with the armed hoofs" +
"Of hostile paces: those opposed eyes," +
"Which, like the meteors of a troubled heaven," +
"All of one nature, of one substance bred," +
"Did lately meet in the intestine shock" +
"And furious close of civil butchery" +
"Shall now, in mutual well-beseeming ranks," +
"March all one way and be no more opposed" +
"Against acquaintance, kindred and allies:" +
"The edge of war, like an ill-sheathed knife," +
"No more shall cut his master. Therefore, friends," +
"As far as to the sepulchre of Christ," +
"Whose soldier now, under whose blessed cross" +
"We are impressed and engaged to fight," +
"Forthwith a power of English shall we levy;" +
"Whose arms were moulded in their mothers' womb" +
"To chase these pagans in those holy fields" +
"Over whose acres walk'd those blessed feet" +
"Which fourteen hundred years ago were nail'd" +
"For our advantage on the bitter cross." +
"But this our purpose now is twelve month old," +
"And bootless 'tis to tell you we will go:" +
"Therefore we meet not now. Then let me hear" +
"Of you, my gentle cousin Westmoreland," +
"What yesternight our council did decree" +
"In forwarding this dear expedience.",
"Hear him but reason in divinity," +
"And all-admiring with an inward wish" +
"You would desire the king were made a prelate:" +
"Hear him debate of commonwealth affairs," +
"You would say it hath been all in all his study:" +
"List his discourse of war, and you shall hear" +
"A fearful battle render'd you in music:" +
"Turn him to any cause of policy," +
"The Gordian knot of it he will unloose," +
"Familiar as his garter: that, when he speaks," +
"The air, a charter'd libertine, is still," +
"And the mute wonder lurketh in men's ears," +
"To steal his sweet and honey'd sentences;" +
"So that the art and practic part of life" +
"Must be the mistress to this theoric:" +
"Which is a wonder how his grace should glean it," +
"Since his addiction was to courses vain," +
"His companies unletter'd, rude and shallow," +
"His hours fill'd up with riots, banquets, sports," +
"And never noted in him any study," +
"Any retirement, any sequestration" +
"From open haunts and popularity.",
"I come no more to make you laugh: things now," +
"That bear a weighty and a serious brow," +
"Sad, high, and working, full of state and woe," +
"Such noble scenes as draw the eye to flow," +
"We now present. Those that can pity, here" +
"May, if they think it well, let fall a tear;" +
"The subject will deserve it. Such as give" +
"Their money out of hope they may believe," +
"May here find truth too. Those that come to see" +
"Only a show or two, and so agree" +
"The play may pass, if they be still and willing," +
"I'll undertake may see away their shilling" +
"Richly in two short hours. Only they" +
"That come to hear a merry bawdy play," +
"A noise of targets, or to see a fellow" +
"In a long motley coat guarded with yellow," +
"Will be deceived; for, gentle hearers, know," +
"To rank our chosen truth with such a show" +
"As fool and fight is, beside forfeiting" +
"Our own brains, and the opinion that we bring," +
"To make that only true we now intend," +
"Will leave us never an understanding friend." +
"Therefore, for goodness' sake, and as you are known" +
"The first and happiest hearers of the town," +
"Be sad, as we would make ye: think ye see" +
"The very persons of our noble story" +
"As they were living; think you see them great," +
"And follow'd with the general throng and sweat" +
"Of thousand friends; then in a moment, see" +
"How soon this mightiness meets misery:" +
"And, if you can be merry then, I'll say" +
"A man may weep upon his wedding-day.",
"First, heaven be the record to my speech!" +
"In the devotion of a subject's love," +
"Tendering the precious safety of my prince," +
"And free from other misbegotten hate," +
"Come I appellant to this princely presence." +
"Now, Thomas Mowbray, do I turn to thee," +
"And mark my greeting well; for what I speak" +
"My body shall make good upon this earth," +
"Or my divine soul answer it in heaven." +
"Thou art a traitor and a miscreant," +
"Too good to be so and too bad to live," +
"Since the more fair and crystal is the sky," +
"The uglier seem the clouds that in it fly." +
"Once more, the more to aggravate the note," +
"With a foul traitor's name stuff I thy throat;" +
"And wish, so please my sovereign, ere I move," +
"What my tongue speaks my right drawn sword may prove.",
"Now is the winter of our discontent" +
"Made glorious summer by this sun of York;" +
"And all the clouds that lour'd upon our house" +
"In the deep bosom of the ocean buried." +
"Now are our brows bound with victorious wreaths;" +
"Our bruised arms hung up for monuments;" +
"Our stern alarums changed to merry meetings," +
"Our dreadful marches to delightful measures." +
"Grim-visaged war hath smooth'd his wrinkled front;" +
"And now, instead of mounting barded steeds" +
"To fright the souls of fearful adversaries," +
"He capers nimbly in a lady's chamber" +
"To the lascivious pleasing of a lute." +
"But I, that am not shaped for sportive tricks," +
"Nor made to court an amorous looking-glass;" +
"I, that am rudely stamp'd, and want love's majesty" +
"To strut before a wanton ambling nymph;" +
"I, that am curtail'd of this fair proportion," +
"Cheated of feature by dissembling nature," +
"Deformed, unfinish'd, sent before my time" +
"Into this breathing world, scarce half made up," +
"And that so lamely and unfashionable" +
"That dogs bark at me as I halt by them;" +
"Why, I, in this weak piping time of peace," +
"Have no delight to pass away the time," +
"Unless to spy my shadow in the sun" +
"And descant on mine own deformity:" +
"And therefore, since I cannot prove a lover," +
"To entertain these fair well-spoken days," +
"I am determined to prove a villain" +
"And hate the idle pleasures of these days." +
"Plots have I laid, inductions dangerous," +
"By drunken prophecies, libels and dreams," +
"To set my brother Clarence and the king" +
"In deadly hate the one against the other:" +
"And if King Edward be as true and just" +
"As I am subtle, false and treacherous," +
"This day should Clarence closely be mew'd up," +
"About a prophecy, which says that 'G'" +
"Of Edward's heirs the murderer shall be." +
"Dive, thoughts, down to my soul: here" +
"Clarence comes.",
"To bait fish withal: if it will feed nothing else," +
"it will feed my revenge. He hath disgraced me, and" +
"hindered me half a million; laughed at my losses," +
"mocked at my gains, scorned my nation, thwarted my" +
"bargains, cooled my friends, heated mine" +
"enemies; and what's his reason? I am a Jew. Hath" +
"not a Jew eyes? hath not a Jew hands, organs," +
"dimensions, senses, affections, passions? fed with" +
"the same food, hurt with the same weapons, subject" +
"to the same diseases, healed by the same means," +
"warmed and cooled by the same winter and summer, as" +
"a Christian is? If you prick us, do we not bleed?" +
"if you tickle us, do we not laugh? if you poison" +
"us, do we not die? and if you wrong us, shall we not" +
"revenge? If we are like you in the rest, we will" +
"resemble you in that. If a Jew wrong a Christian," +
"what is his humility? Revenge. If a Christian" +
"wrong a Jew, what should his sufferance be by" +
"Christian example? Why, revenge. The villany you" +
"teach me, I will execute, and it shall go hard but I" +
"will better the instruction.",
"Virtue! a fig! 'tis in ourselves that we are thus" +
"or thus. Our bodies are our gardens, to the which" +
"our wills are gardeners: so that if we will plant" +
"nettles, or sow lettuce, set hyssop and weed up" +
"thyme, supply it with one gender of herbs, or" +
"distract it with many, either to have it sterile" +
"with idleness, or manured with industry, why, the" +
"power and corrigible authority of this lies in our" +
"wills. If the balance of our lives had not one" +
"scale of reason to poise another of sensuality, the" +
"blood and baseness of our natures would conduct us" +
"to most preposterous conclusions: but we have" +
"reason to cool our raging motions, our carnal" +
"stings, our unbitted lusts, whereof I take this that" +
"you call love to be a sect or scion.",
"Blow, winds, and crack your cheeks! rage! blow!" +
"You cataracts and hurricanoes, spout" +
"Till you have drench'd our steeples, drown'd the cocks!" +
"You sulphurous and thought-executing fires," +
"Vaunt-couriers to oak-cleaving thunderbolts," +
"Singe my white head! And thou, all-shaking thunder," +
"Smite flat the thick rotundity o' the world!" +
"Crack nature's moulds, an germens spill at once," +
"That make ingrateful man!"
};
}

@ -1,51 +0,0 @@
/*
* Copyright (C) 2011 Jake Wharton
*
* 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.
*/
package com.actionbarsherlock.sample.demos;
import android.os.Bundle;
import com.actionbarsherlock.app.SherlockPreferenceActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
public class Preference extends SherlockPreferenceActivity {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
//Used to put dark icons on light action bar
boolean isLight = SampleList.THEME == R.style.Theme_Sherlock_Light;
menu.add("Save")
.setIcon(isLight ? R.drawable.ic_compose_inverse : R.drawable.ic_compose)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
menu.add("Search")
.setIcon(isLight ? R.drawable.ic_search_inverse : R.drawable.ic_search)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
menu.add("Refresh")
.setIcon(isLight ? R.drawable.ic_refresh_inverse : R.drawable.ic_refresh)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
return super.onCreateOptionsMenu(menu);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(SampleList.THEME); //Used for theme switching in samples
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.preferences);
}
}

@ -1,65 +0,0 @@
/*
* Copyright (C) 2011 Jake Wharton
*
* 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.
*/
package com.actionbarsherlock.sample.demos;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.Window;
public class Progress extends SherlockActivity {
Handler mHandler = new Handler();
Runnable mProgressRunner = new Runnable() {
@Override
public void run() {
mProgress += 2;
//Normalize our progress along the progress bar's scale
int progress = (Window.PROGRESS_END - Window.PROGRESS_START) / 100 * mProgress;
setSupportProgress(progress);
if (mProgress < 100) {
mHandler.postDelayed(mProgressRunner, 50);
}
}
};
private int mProgress = 100;
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(SampleList.THEME); //Used for theme switching in samples
super.onCreate(savedInstanceState);
//This has to be called before setContentView and you must use the
//class in com.actionbarsherlock.view and NOT android.view
requestWindowFeature(Window.FEATURE_PROGRESS);
setContentView(R.layout.progress);
findViewById(R.id.go).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
if (mProgress == 100) {
mProgress = 0;
mProgressRunner.run();
}
}
});
}
}

@ -1,175 +0,0 @@
/*
* Copyright (C) 2011 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.
*/
package com.actionbarsherlock.sample.demos;
import java.text.Collator;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.view.View;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.Toast;
import com.actionbarsherlock.app.SherlockListActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
import com.actionbarsherlock.view.SubMenu;
public class SampleList extends SherlockListActivity {
public static int THEME = R.style.Theme_Sherlock;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = getIntent();
String path = intent.getStringExtra("com.example.android.apis.Path");
if (path == null) {
path = "";
}
setListAdapter(new SimpleAdapter(this, getData(path),
android.R.layout.simple_list_item_1, new String[] { "title" },
new int[] { android.R.id.text1 }));
getListView().setTextFilterEnabled(true);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
SubMenu sub = menu.addSubMenu("Theme");
sub.add(0, R.style.Theme_Sherlock, 0, "Default");
sub.add(0, R.style.Theme_Sherlock_Light, 0, "Light");
sub.add(0, R.style.Theme_Sherlock_Light_DarkActionBar, 0, "Light (Dark Action Bar)");
sub.getItem().setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home || item.getItemId() == 0) {
return false;
}
THEME = item.getItemId();
Toast.makeText(this, "Theme changed to \"" + item.getTitle() + "\"", Toast.LENGTH_SHORT).show();
return true;
}
protected List<Map<String, Object>> getData(String prefix) {
List<Map<String, Object>> myData = new ArrayList<Map<String, Object>>();
Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
mainIntent.addCategory("com.actionbarsherlock.sample.demos.EXAMPLE");
PackageManager pm = getPackageManager();
List<ResolveInfo> list = pm.queryIntentActivities(mainIntent, 0);
if (null == list)
return myData;
String[] prefixPath;
String prefixWithSlash = prefix;
if (prefix.equals("")) {
prefixPath = null;
} else {
prefixPath = prefix.split("/");
prefixWithSlash = prefix + "/";
}
int len = list.size();
Map<String, Boolean> entries = new HashMap<String, Boolean>();
for (int i = 0; i < len; i++) {
ResolveInfo info = list.get(i);
CharSequence labelSeq = info.loadLabel(pm);
String label = labelSeq != null
? labelSeq.toString()
: info.activityInfo.name;
if (prefixWithSlash.length() == 0 || label.startsWith(prefixWithSlash)) {
String[] labelPath = label.split("/");
String nextLabel = prefixPath == null ? labelPath[0] : labelPath[prefixPath.length];
if ((prefixPath != null ? prefixPath.length : 0) == labelPath.length - 1) {
addItem(myData, nextLabel, activityIntent(
info.activityInfo.applicationInfo.packageName,
info.activityInfo.name));
} else {
if (entries.get(nextLabel) == null) {
addItem(myData, nextLabel, browseIntent(prefix.equals("") ? nextLabel : prefix + "/" + nextLabel));
entries.put(nextLabel, true);
}
}
}
}
Collections.sort(myData, sDisplayNameComparator);
return myData;
}
private final static Comparator<Map<String, Object>> sDisplayNameComparator =
new Comparator<Map<String, Object>>() {
private final Collator collator = Collator.getInstance();
public int compare(Map<String, Object> map1, Map<String, Object> map2) {
return collator.compare(map1.get("title"), map2.get("title"));
}
};
protected Intent activityIntent(String pkg, String componentName) {
Intent result = new Intent();
result.setClassName(pkg, componentName);
return result;
}
protected Intent browseIntent(String path) {
Intent result = new Intent();
result.setClass(this, SampleList.class);
result.putExtra("com.example.android.apis.Path", path);
return result;
}
protected void addItem(List<Map<String, Object>> data, String name, Intent intent) {
Map<String, Object> temp = new HashMap<String, Object>();
temp.put("title", name);
temp.put("intent", intent);
data.add(temp);
}
@Override
@SuppressWarnings("unchecked")
protected void onListItemClick(ListView l, View v, int position, long id) {
Map<String, Object> map = (Map<String, Object>)l.getItemAtPosition(position);
Intent intent = (Intent) map.get("intent");
startActivity(intent);
}
}

@ -1,50 +0,0 @@
/*
* Copyright (C) 2011 Jake Wharton
*
* 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.
*/
package com.actionbarsherlock.sample.demos;
import android.os.Bundle;
import android.widget.TextView;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
import com.actionbarsherlock.widget.SearchView;
public class SearchViews extends SherlockActivity {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
//Used to put dark icons on light action bar
boolean isLight = SampleList.THEME == R.style.Theme_Sherlock_Light;
//Create the search view
SearchView searchView = new SearchView(getSupportActionBar().getThemedContext());
searchView.setQueryHint("Search for countries…");
menu.add("Search")
.setIcon(isLight ? R.drawable.ic_search_inverse : R.drawable.abs__ic_search)
.setActionView(searchView)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW);
return true;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(SampleList.THEME); //Used for theme switching in samples
super.onCreate(savedInstanceState);
setContentView(R.layout.text);
((TextView)findViewById(R.id.text)).setText(R.string.search_views_content);
}
}

@ -1,129 +0,0 @@
/*
* Copyright (C) 2011 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.
*/
package com.actionbarsherlock.sample.demos;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.widget.TextView;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
import com.actionbarsherlock.widget.ShareActionProvider;
/**
* This activity demonstrates how to use an {@link android.view.ActionProvider}
* for adding functionality to the Action Bar. In particular this demo is adding
* a menu item with ShareActionProvider as its action provider. The
* ShareActionProvider is responsible for managing the UI for sharing actions.
*/
public class ShareActionProviders extends SherlockActivity {
private static final String SHARED_FILE_NAME = "shared.png";
@Override
public void onCreate(Bundle savedInstanceState) {
setTheme(SampleList.THEME); //Used for theme switching in samples
super.onCreate(savedInstanceState);
setContentView(R.layout.text);
((TextView)findViewById(R.id.text)).setText(R.string.share_action_providers_content);
copyPrivateRawResuorceToPubliclyAccessibleFile();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate your menu.
getSupportMenuInflater().inflate(R.menu.share_action_provider, menu);
// Set file with share history to the provider and set the share intent.
MenuItem actionItem = menu.findItem(R.id.menu_item_share_action_provider_action_bar);
ShareActionProvider actionProvider = (ShareActionProvider) actionItem.getActionProvider();
actionProvider.setShareHistoryFileName(ShareActionProvider.DEFAULT_SHARE_HISTORY_FILE_NAME);
// Note that you can set/change the intent any time,
// say when the user has selected an image.
actionProvider.setShareIntent(createShareIntent());
//XXX: For now, ShareActionProviders must be displayed on the action bar
// Set file with share history to the provider and set the share intent.
//MenuItem overflowItem = menu.findItem(R.id.menu_item_share_action_provider_overflow);
//ShareActionProvider overflowProvider =
// (ShareActionProvider) overflowItem.getActionProvider();
//overflowProvider.setShareHistoryFileName(
// ShareActionProvider.DEFAULT_SHARE_HISTORY_FILE_NAME);
// Note that you can set/change the intent any time,
// say when the user has selected an image.
//overflowProvider.setShareIntent(createShareIntent());
return true;
}
/**
* Creates a sharing {@link Intent}.
*
* @return The sharing intent.
*/
private Intent createShareIntent() {
Intent shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.setType("image/*");
Uri uri = Uri.fromFile(getFileStreamPath("shared.png"));
shareIntent.putExtra(Intent.EXTRA_STREAM, uri);
return shareIntent;
}
/**
* Copies a private raw resource content to a publicly readable
* file such that the latter can be shared with other applications.
*/
private void copyPrivateRawResuorceToPubliclyAccessibleFile() {
InputStream inputStream = null;
FileOutputStream outputStream = null;
try {
inputStream = getResources().openRawResource(R.raw.robot);
outputStream = openFileOutput(SHARED_FILE_NAME,
Context.MODE_WORLD_READABLE | Context.MODE_APPEND);
byte[] buffer = new byte[1024];
int length = 0;
try {
while ((length = inputStream.read(buffer)) > 0){
outputStream.write(buffer, 0, length);
}
} catch (IOException ioe) {
/* ignore */
}
} catch (FileNotFoundException fnfe) {
/* ignore */
} finally {
try {
inputStream.close();
} catch (IOException ioe) {
/* ignore */
}
try {
outputStream.close();
} catch (IOException ioe) {
/* ignore */
}
}
}
}

@ -1,31 +0,0 @@
/*
* Copyright (C) 2011 Jake Wharton
*
* 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.
*/
package com.actionbarsherlock.sample.demos;
import android.os.Bundle;
import android.widget.TextView;
import com.actionbarsherlock.app.SherlockActivity;
public class Simple extends SherlockActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(SampleList.THEME); //Used for theme switching in samples
super.onCreate(savedInstanceState);
setContentView(R.layout.text);
((TextView)findViewById(R.id.text)).setText(R.string.simple_content);
}
}

@ -1,26 +0,0 @@
/*
* Copyright (C) 2011 Jake Wharton
*
* 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.
*/
package com.actionbarsherlock.sample.demos;
import android.widget.TextView;
//We're the same! Manifest and content text changes only.
public class SplitActionItems extends ActionItems {
@Override
public void setContent(TextView view) {
view.setText(R.string.split_content);
}
}

@ -1,19 +0,0 @@
/*
* Copyright (C) 2011 Jake Wharton
*
* 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.
*/
package com.actionbarsherlock.sample.demos;
//We're the same! Manifest changes only.
public class SplitActionModes extends ActionModes {}

@ -1,94 +0,0 @@
/*
* Copyright (C) 2011 Jake Wharton
*
* 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.
*/
package com.actionbarsherlock.sample.demos;
import com.actionbarsherlock.ActionBarSherlock;
import com.actionbarsherlock.ActionBarSherlock.OnCreateOptionsMenuListener;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.widget.TextView;
public class StaticAttachment extends Activity implements OnCreateOptionsMenuListener {
ActionBarSherlock mSherlock = ActionBarSherlock.wrap(this);
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(SampleList.THEME); //Used for theme switching in samples
super.onCreate(savedInstanceState);
/*
* Most interactions with what would otherwise be the system UI should
* now be done through this instance. Content, title, action bar, and
* menu inflation can all be done.
*
* All of the base activities use this class to provide the normal
* action bar functionality so everything that they can do is possible
* using this static attachment method.
*
* Calling something like setContentView or getActionBar on this
* instance is required in order to properly set up the wrapped layout
* and dispatch menu events (if they are needed).
*/
mSherlock.setUiOptions(ActivityInfo.UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW);
mSherlock.setContentView(R.layout.text);
((TextView)findViewById(R.id.text)).setText(R.string.static_attach_content);
}
/*
* In order to use action items properly with static attachment you
* need to dispatch create, prepare, and selected events for the
* native type to the ActionBarSherlock instance. If for some reason
* you need to use static attachment you should probably create a
* common base activity that does this for all three methods.
*/
@Override
public boolean onCreateOptionsMenu(android.view.Menu menu) {
return mSherlock.dispatchCreateOptionsMenu(menu);
}
/*
* In order to receive these events you need to implement an interface
* from ActionBarSherlock so it knows to dispatch to this callback.
* There are three possible interface you can implement, one for each
* menu event.
*
* Remember, there are no superclass implementations of these methods so
* you must return a value with meaning.
*/
@Override
public boolean onCreateOptionsMenu(Menu menu) {
//Used to put dark icons on light action bar
boolean isLight = SampleList.THEME == R.style.Theme_Sherlock_Light;
menu.add("Save")
.setIcon(isLight ? R.drawable.ic_compose_inverse : R.drawable.ic_compose)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
menu.add("Search")
.setIcon(isLight ? R.drawable.ic_search_inverse : R.drawable.ic_search)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
menu.add("Refresh")
.setIcon(isLight ? R.drawable.ic_refresh_inverse : R.drawable.ic_refresh)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
return true;
}
}

@ -1,62 +0,0 @@
/*
* Copyright (C) 2011 Jake Wharton
*
* 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.
*/
package com.actionbarsherlock.sample.demos;
import android.graphics.Shader.TileMode;
import android.graphics.drawable.BitmapDrawable;
import android.os.Build;
import android.os.Bundle;
import android.widget.TextView;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
public class Styled extends SherlockActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.text);
((TextView)findViewById(R.id.text)).setText(R.string.styled_content);
//This is a workaround for http://b.android.com/15340 from http://stackoverflow.com/a/5852198/132047
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
BitmapDrawable bg = (BitmapDrawable)getResources().getDrawable(R.drawable.bg_striped);
bg.setTileModeXY(TileMode.REPEAT, TileMode.REPEAT);
getSupportActionBar().setBackgroundDrawable(bg);
BitmapDrawable bgSplit = (BitmapDrawable)getResources().getDrawable(R.drawable.bg_striped_split_img);
bgSplit.setTileModeXY(TileMode.REPEAT, TileMode.REPEAT);
getSupportActionBar().setSplitBackgroundDrawable(bgSplit);
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
menu.add("Save")
.setIcon(R.drawable.ic_compose)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
menu.add("Search")
.setIcon(R.drawable.ic_search)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
menu.add("Refresh")
.setIcon(R.drawable.ic_refresh)
.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
return super.onCreateOptionsMenu(menu);
}
}

@ -1,57 +0,0 @@
/*
* Copyright (C) 2011 Jake Wharton
*
* 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.
*/
package com.actionbarsherlock.sample.demos;
import android.os.Bundle;
import android.widget.TextView;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuItem;
import com.actionbarsherlock.view.SubMenu;
public class SubMenus extends SherlockActivity {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
SubMenu subMenu1 = menu.addSubMenu("Action Item");
subMenu1.add("Sample");
subMenu1.add("Menu");
subMenu1.add("Items");
MenuItem subMenu1Item = subMenu1.getItem();
subMenu1Item.setIcon(R.drawable.ic_title_share_default);
subMenu1Item.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
SubMenu subMenu2 = menu.addSubMenu("Overflow Item");
subMenu2.add("These");
subMenu2.add("Are");
subMenu2.add("Sample");
subMenu2.add("Items");
MenuItem subMenu2Item = subMenu2.getItem();
subMenu2Item.setIcon(R.drawable.ic_compose);
return super.onCreateOptionsMenu(menu);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
setTheme(SampleList.THEME); //Used for theme switching in samples
super.onCreate(savedInstanceState);
setContentView(R.layout.text);
((TextView)findViewById(R.id.text)).setText(R.string.submenus_content);
}
}

@ -1,43 +0,0 @@
package com.actionbarsherlock.sample.demos;
import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;
import android.widget.TextView;
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.ActionBar.Tab;
import com.actionbarsherlock.app.SherlockActivity;
public class TabNavigation extends SherlockActivity implements ActionBar.TabListener {
private TextView mSelected;
@Override
public void onCreate(Bundle savedInstanceState) {
setTheme(SampleList.THEME); //Used for theme switching in samples
super.onCreate(savedInstanceState);
setContentView(R.layout.tab_navigation);
mSelected = (TextView)findViewById(R.id.text);
getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
for (int i = 1; i <= 3; i++) {
ActionBar.Tab tab = getSupportActionBar().newTab();
tab.setText("Tab " + i);
tab.setTabListener(this);
getSupportActionBar().addTab(tab);
}
}
@Override
public void onTabReselected(Tab tab, FragmentTransaction transaction) {
}
@Override
public void onTabSelected(Tab tab, FragmentTransaction transaction) {
mSelected.setText("Selected: " + tab.getText());
}
@Override
public void onTabUnselected(Tab tab, FragmentTransaction transaction) {
}
}

@ -1,15 +0,0 @@
package com.actionbarsherlock.sample.demos;
import android.os.Bundle;
public class TabNavigationCollapsed extends TabNavigation {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//The following two options trigger the collapsing of the main action bar view.
//See the parent activity for the rest of the implementation
getSupportActionBar().setDisplayShowHomeEnabled(false);
getSupportActionBar().setDisplayShowTitleEnabled(false);
}
}

@ -1,164 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2007 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.
--><!-- Declare the contents of this Android application. The namespace
attribute brings in the Android platform namespace, and the package
supplies a unique name for the application. When writing your
own application, the package name must be changed from "com.example.*"
to come from a domain that you own or have control over. --><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="100" android:versionName="4.2.0" package="com.actionbarsherlock.sample.fragments">
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
<application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/application_name">
<activity android:label="@string/activity_sample_code" android:name=".SampleList" android:theme="@style/Theme.Sherlock">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".SendResult"/>
<!-- Fragment Support Samples -->
<activity android:label="@string/fragment_alert_dialog_support" android:name=".FragmentAlertDialogSupport">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.fragments.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/fragment_arguments_support" android:name=".FragmentArgumentsSupport">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.fragments.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/fragment_custom_animation_support" android:name=".FragmentCustomAnimationSupport">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.fragments.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/fragment_hide_show_support" android:name=".FragmentHideShowSupport" android:windowSoftInputMode="stateUnchanged">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.fragments.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/fragment_context_menu_support" android:name=".FragmentContextMenuSupport">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.fragments.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/fragment_dialog_support" android:name=".FragmentDialogSupport">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.fragments.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/fragment_dialog_or_activity_support" android:name=".FragmentDialogOrActivitySupport">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.fragments.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/fragment_layout_support" android:name=".FragmentLayoutSupport">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.fragments.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/fragment_list_array_support" android:name=".FragmentListArraySupport">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.fragments.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:name=".FragmentLayoutSupport$DetailsActivity"/>
<activity android:label="@string/fragment_menu_support" android:name=".FragmentMenuSupport">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.fragments.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/fragment_retain_instance_support" android:name=".FragmentRetainInstanceSupport">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.fragments.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/fragment_receive_result_support" android:name=".FragmentReceiveResultSupport">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.fragments.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/fragment_stack_support" android:name=".FragmentStackSupport">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.fragments.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/fragment_tabs" android:name=".FragmentTabs">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.fragments.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/fragment_tabs_pager" android:name=".FragmentTabsPager">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.fragments.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/fragment_pager_support" android:name=".FragmentPagerSupport">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.fragments.EXAMPLE"/>
</intent-filter>
</activity>
<activity android:label="@string/fragment_state_pager_support" android:name=".FragmentStatePagerSupport">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="com.actionbarsherlock.sample.fragments.EXAMPLE"/>
</intent-filter>
</activity>
<provider android:authorities="com.example.android.apis.supportv4.app.LoaderThrottle" android:name=".LoaderThrottleSupport$SimpleProvider"/>
</application>
</manifest>

@ -1,13 +0,0 @@
ActionBarSherlock Sample: Demos
===============================
See [actionbarsherlock.com/samples.html][1] for information on the sample
contained in this folder.
[1]: http://actionbarsherlock.com/samples.html

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

Loading…
Cancel
Save