Conflicts: product/modules/distribution/src/assembly/bin.xmlrevert-dabc3590
@ -0,0 +1,61 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
~ Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||||
|
~
|
||||||
|
~ 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.
|
||||||
|
-->
|
||||||
|
<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/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.wso2.mdmserver</groupId>
|
||||||
|
<artifactId>mdm-android-agent-archetype</artifactId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
<name>WSO2 MDM Agent Android Archetype</name>
|
||||||
|
<description>Creates a MDM-Android agent project</description>
|
||||||
|
<packaging>maven-archetype</packaging>
|
||||||
|
|
||||||
|
<organization>
|
||||||
|
<name>WSO2 Inc.</name>
|
||||||
|
<url>http://www.wso2.com</url>
|
||||||
|
</organization>
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>The Apache Software License, Version 2.0</name>
|
||||||
|
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||||
|
<distribution>repo</distribution>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
<build>
|
||||||
|
<extensions>
|
||||||
|
<extension>
|
||||||
|
<groupId>org.apache.maven.archetype</groupId>
|
||||||
|
<artifactId>archetype-packaging</artifactId>
|
||||||
|
<version>${archetype.packaging.version}</version>
|
||||||
|
</extension>
|
||||||
|
</extensions>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-archetype-plugin</artifactId>
|
||||||
|
<version>${archetype.plugin.version}</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<archetype.packaging.version>2.2</archetype.packaging.version>
|
||||||
|
<archetype.plugin.version>2.2</archetype.plugin.version>
|
||||||
|
</properties>
|
||||||
|
</project>
|
@ -0,0 +1,18 @@
|
|||||||
|
Prerequisites
|
||||||
|
|
||||||
|
1. Apache maven 3.1.1 or higher
|
||||||
|
2. Apache Ant 1.9.3 or higher
|
||||||
|
3. Android SDK (SDK 17 or higher) must be installed & ANDROID_HOME environment variable must be set
|
||||||
|
|
||||||
|
How to use MDM-Android-agent archetype
|
||||||
|
|
||||||
|
1. Install the archetype jar by executing the following command in the cmd.
|
||||||
|
|
||||||
|
mvn install:install-file -Dfile=<PATH_TO mdm-android-agent-archetype-1.0.0-SNAPSHOT.jar> -DgroupId=org.wso2.mdmserver -DartifactId=mdm-android-agent-archetype -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -DgeneratePom=true
|
||||||
|
|
||||||
|
2. Execute the following command to generate a mdm-android-agent project. Use the generated client-key & client-secret for API subscription as the values for -DclientKey & -DclientSecret arguments. The default android target version used here is 17. If you need to change that please provide -Dplatform argument.
|
||||||
|
|
||||||
|
mvn archetype:generate -B -DarchetypeGroupId=org.wso2.mdmserver -DarchetypeArtifactId=mdm-android-agent-archetype -DarchetypeVersion=1.0.0-SNAPSHOT -DgroupId=org.wso2.carbon -DartifactId=mdm-android-agent -DclientKey=<YOUR_CLIENT_KEY> -DclientSecret=<YOUR_CLIENT_SECRET> -Dplatform=<TARGET_ANDROID_SDK_VERSION>
|
||||||
|
|
||||||
|
3. Navigate to the created cdm-android-agent directory through the cmd.
|
||||||
|
4. Execute ant release / ant debug to generate the apk file
|
@ -0,0 +1,86 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
~ Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||||
|
~
|
||||||
|
~ 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.
|
||||||
|
-->
|
||||||
|
<archetype-descriptor name="mdm-android-agent">
|
||||||
|
<requiredProperties>
|
||||||
|
<requiredProperty key="platform">
|
||||||
|
<defaultValue>16</defaultValue>
|
||||||
|
</requiredProperty>
|
||||||
|
<requiredProperty key="clientKey">
|
||||||
|
<defaultValue>iwriqwyriqrqro</defaultValue>
|
||||||
|
</requiredProperty>
|
||||||
|
<requiredProperty key="clientSecret">
|
||||||
|
<defaultValue>wrhqwriqwyroiwq</defaultValue>
|
||||||
|
</requiredProperty>
|
||||||
|
</requiredProperties>
|
||||||
|
|
||||||
|
<fileSets>
|
||||||
|
<fileSet filtered="true" encoding="UTF-8">
|
||||||
|
<directory>src</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.java</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet filtered="false" encoding="UTF-8">
|
||||||
|
<directory>assets</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.*</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet filtered="false" encoding="UTF-8">
|
||||||
|
<directory>libs</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.*</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet filtered="false" encoding="UTF-8">
|
||||||
|
<directory>plugins</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.*</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet filtered="true" encoding="UTF-8">
|
||||||
|
<directory>res</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.xml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet filtered="false" encoding="UTF-8">
|
||||||
|
<directory>res</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.png</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet filtered="false" encoding="UTF-8">
|
||||||
|
<directory>res</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*.bks</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet filtered="true" encoding="UTF-8">
|
||||||
|
<directory></directory>
|
||||||
|
<includes>
|
||||||
|
<include>*.xml</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet filtered="true" encoding="UTF-8">
|
||||||
|
<directory></directory>
|
||||||
|
<includes>
|
||||||
|
<include>*.properties</include>
|
||||||
|
</includes>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
|
</archetype-descriptor>
|
@ -0,0 +1,183 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="org.wso2.cdm.agent"
|
||||||
|
android:sharedUserId="org.wso2.emm.agent"
|
||||||
|
android:sharedUserLabel="@string/hello_world"
|
||||||
|
android:versionCode="1"
|
||||||
|
android:versionName="1.0" >
|
||||||
|
|
||||||
|
<uses-sdk
|
||||||
|
android:minSdkVersion="16"
|
||||||
|
android:targetSdkVersion="${platform}" />
|
||||||
|
|
||||||
|
<!-- GCM connects to Google Services. -->
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
|
||||||
|
<!-- GCM requires a Google account. -->
|
||||||
|
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
||||||
|
|
||||||
|
<!-- Keeps the processor from sleeping when a message is received. -->
|
||||||
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
|
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
|
||||||
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||||
|
<!--
|
||||||
|
Creates a custom permission so only this app can receive its messages.
|
||||||
|
|
||||||
|
NOTE: the permission *must* be called PACKAGE.permission.C2D_MESSAGE,
|
||||||
|
where PACKAGE is the application's package name.
|
||||||
|
-->
|
||||||
|
<permission
|
||||||
|
android:name="org.wso2.emm.agent.permission.C2D_MESSAGE"
|
||||||
|
android:protectionLevel="signature" />
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
|
<uses-permission android:name="org.wso2.emm.agent.permission.C2D_MESSAGE" />
|
||||||
|
<uses-permission android:name="android.permission.READ_PHONE_STATE" >
|
||||||
|
</uses-permission>
|
||||||
|
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" >
|
||||||
|
</uses-permission>
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_GPS" />
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
|
<uses-permission android:name="android.permisssion.ACCESS_COARSE_LOCATION" >
|
||||||
|
</uses-permission>
|
||||||
|
<uses-permission android:name="android.permission.SEND_SMS" >
|
||||||
|
</uses-permission>
|
||||||
|
<uses-permission android:name="android.permission.RECEIVE_SMS" >
|
||||||
|
</uses-permission>
|
||||||
|
<uses-permission android:name="android.permission.READ_SMS" />
|
||||||
|
<uses-permission android:name="android.permission.WRITE_SMS" />
|
||||||
|
<uses-permission android:name="android.permission.READ_CONTACTS" />
|
||||||
|
<uses-permission android:name="android.permission.READ_LOGS" />
|
||||||
|
<uses-permission android:name="android.permission.READ_CALL_LOG" />
|
||||||
|
<uses-permission android:name="android.permission.WRITE_CALL_LOG" />
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
<uses-permission android:name="android.permission.GET_ACCOUNTS" >
|
||||||
|
</uses-permission>
|
||||||
|
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" >
|
||||||
|
</uses-permission>
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" >
|
||||||
|
</uses-permission>
|
||||||
|
|
||||||
|
<application
|
||||||
|
android:allowBackup="true"
|
||||||
|
android:icon="@drawable/ic_launcher"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:theme="@style/TopBarTheme" >
|
||||||
|
<activity
|
||||||
|
android:name="org.wso2.cdm.agent.RegistrationActivity"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:theme="@style/TopBarTheme" >
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name="org.wso2.cdm.agent.DisplayDeviceInfoActivity"
|
||||||
|
android:label="@string/title_activity_display_device_info"
|
||||||
|
android:screenOrientation="portrait" >
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name="org.wso2.cdm.agent.RegisterSuccessfulActivity"
|
||||||
|
android:label="@string/title_activity_register_successful"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:theme="@style/Theme.Sherlock" >
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
<!-- Begin List of Receivers -->
|
||||||
|
<receiver
|
||||||
|
android:name="com.google.android.gcm.GCMBroadcastReceiver"
|
||||||
|
android:permission="com.google.android.c2dm.permission.SEND" >
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
|
||||||
|
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
|
||||||
|
|
||||||
|
<category android:name="org.wso2.emm.agent" />
|
||||||
|
</intent-filter>
|
||||||
|
</receiver>
|
||||||
|
<receiver
|
||||||
|
android:name="org.wso2.cdm.agent.services.WSO2DeviceAdminReceiver"
|
||||||
|
android:permission="android.permission.BIND_DEVICE_ADMIN" >
|
||||||
|
<intent-filter>
|
||||||
|
|
||||||
|
<!-- This action is required -->
|
||||||
|
<action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
|
||||||
|
</intent-filter>
|
||||||
|
|
||||||
|
<!-- This is required this receiver to become device admin component. -->
|
||||||
|
<meta-data
|
||||||
|
android:name="android.app.device_admin"
|
||||||
|
android:resource="@xml/wso2_device_admin" >
|
||||||
|
</meta-data>
|
||||||
|
</receiver>
|
||||||
|
<receiver android:name="org.wso2.cdm.agent.services.SMSReceiver">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
|
||||||
|
</intent-filter>
|
||||||
|
</receiver>
|
||||||
|
<receiver android:name="org.wso2.cdm.agent.services.AlarmReceiver"></receiver>
|
||||||
|
<receiver android:name="org.wso2.cdm.agent.services.DeviceStartupIntentReceiver" android:enabled="true" android:exported="false">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||||
|
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
</intent-filter>
|
||||||
|
</receiver>
|
||||||
|
<!-- End List of Receivers -->
|
||||||
|
<service android:name="org.wso2.cdm.agent.GCMIntentService" />
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name="org.wso2.cdm.agent.AlreadyRegisteredActivity"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:theme="@style/Theme.Sherlock" >
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name="org.wso2.cdm.agent.AuthenticationActivity"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:theme="@style/Theme.Sherlock"
|
||||||
|
android:windowSoftInputMode="stateUnchanged|adjustPan" >
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name="org.wso2.cdm.agent.AuthenticationErrorActivity"
|
||||||
|
android:screenOrientation="portrait" >
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name="org.wso2.cdm.agent.NotifyActivity"
|
||||||
|
android:label="@string/title_activity_notify"
|
||||||
|
android:screenOrientation="portrait" >
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name="org.wso2.cdm.agent.ServerDetails"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:windowSoftInputMode="stateUnchanged|adjustPan" >
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name="org.wso2.cdm.agent.PinCodeActivity"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:windowSoftInputMode="stateUnchanged|adjustPan" >
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name="org.wso2.cdm.agent.Notification"
|
||||||
|
android:label="@string/title_activity_notification"
|
||||||
|
android:screenOrientation="portrait" >
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name="org.wso2.cdm.agent.AlertActivity"
|
||||||
|
android:label="@string/title_activity_alert"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:theme="@android:style/Theme.Dialog" >
|
||||||
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name="org.wso2.cdm.agent.LogActivity"
|
||||||
|
android:label="@string/title_activity_log"
|
||||||
|
android:screenOrientation="portrait" >
|
||||||
|
</activity>
|
||||||
|
</application>
|
||||||
|
|
||||||
|
</manifest>
|
@ -0,0 +1,18 @@
|
|||||||
|
WSO2 EMM Agent
|
||||||
|
=================
|
||||||
|
|
||||||
|
Configure and build the Android client application
|
||||||
|
----------------------
|
||||||
|
Follow the instructions below to configure and build the Android client application:
|
||||||
|
|
||||||
|
1. Get a Git clone of the project.
|
||||||
|
2. Download <a href="https://developer.android.com/sdk/installing/installing-adt.html"> Android ADT plugin and configure </a> it in your Eclipse.
|
||||||
|
3. Open the project in your Eclipse IDE.
|
||||||
|
4. Import the project as an Android project using "File-->Import-->Existing Android Code Into Workspace"
|
||||||
|
5. Two projects will show, a library and the agent. Clean the Library first and build it.
|
||||||
|
6. Open the file properties of the Agent project.
|
||||||
|
7. Under "Android" scroll down (past the Build targets).
|
||||||
|
8. The library project will show with a red "X" next to it. Remove it.
|
||||||
|
9. Add the library project you just built in step 3
|
||||||
|
10. Ensure the Library is also on your "Java Build Path" under Libraries.
|
||||||
|
11. Clean and build.
|
@ -0,0 +1 @@
|
|||||||
|
SHOP_URL=""
|
@ -0,0 +1,92 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project name="client" default="help">
|
||||||
|
|
||||||
|
<!-- The local.properties file is created and updated by the 'android' tool.
|
||||||
|
It contains the path to the SDK. It should *NOT* be checked into
|
||||||
|
Version Control Systems. -->
|
||||||
|
<property file="local.properties" />
|
||||||
|
|
||||||
|
<!-- The ant.properties file can be created by you. It is only edited by the
|
||||||
|
'android' tool to add properties to it.
|
||||||
|
This is the place to change some Ant specific build properties.
|
||||||
|
Here are some properties you may want to change/update:
|
||||||
|
|
||||||
|
source.dir
|
||||||
|
The name of the source directory. Default is 'src'.
|
||||||
|
out.dir
|
||||||
|
The name of the output directory. Default is 'bin'.
|
||||||
|
|
||||||
|
For other overridable properties, look at the beginning of the rules
|
||||||
|
files in the SDK, at tools/ant/build.xml
|
||||||
|
|
||||||
|
Properties related to the SDK location or the project target should
|
||||||
|
be updated using the 'android' tool with the 'update' action.
|
||||||
|
|
||||||
|
This file is an integral part of the build system for your
|
||||||
|
application and should be checked into Version Control Systems.
|
||||||
|
|
||||||
|
-->
|
||||||
|
<property file="ant.properties" />
|
||||||
|
|
||||||
|
<!-- if sdk.dir was not set from one of the property file, then
|
||||||
|
get it from the ANDROID_HOME env var.
|
||||||
|
This must be done before we load project.properties since
|
||||||
|
the proguard config can use sdk.dir -->
|
||||||
|
<property environment="env" />
|
||||||
|
<condition property="sdk.dir" value="${env.ANDROID_HOME}">
|
||||||
|
<isset property="env.ANDROID_HOME" />
|
||||||
|
</condition>
|
||||||
|
|
||||||
|
<!-- The project.properties file is created and updated by the 'android'
|
||||||
|
tool, as well as ADT.
|
||||||
|
|
||||||
|
This contains project specific properties such as project target, and library
|
||||||
|
dependencies. Lower level build properties are stored in ant.properties
|
||||||
|
(or in .classpath for Eclipse projects).
|
||||||
|
|
||||||
|
This file is an integral part of the build system for your
|
||||||
|
application and should be checked into Version Control Systems. -->
|
||||||
|
<loadproperties srcFile="project.properties" />
|
||||||
|
|
||||||
|
<!-- quick check on sdk.dir -->
|
||||||
|
<fail
|
||||||
|
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable."
|
||||||
|
unless="sdk.dir"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Import per project custom build rules if present at the root of the project.
|
||||||
|
This is the place to put custom intermediary targets such as:
|
||||||
|
-pre-build
|
||||||
|
-pre-compile
|
||||||
|
-post-compile (This is typically used for code obfuscation.
|
||||||
|
Compiled code location: ${out.classes.absolute.dir}
|
||||||
|
If this is not done in place, override ${out.dex.input.absolute.dir})
|
||||||
|
-post-package
|
||||||
|
-post-build
|
||||||
|
-pre-clean
|
||||||
|
-->
|
||||||
|
<import file="custom_rules.xml" optional="true" />
|
||||||
|
|
||||||
|
<!-- Import the actual build file.
|
||||||
|
|
||||||
|
To customize existing targets, there are two options:
|
||||||
|
- Customize only one target:
|
||||||
|
- copy/paste the target into this file, *before* the
|
||||||
|
<import> task.
|
||||||
|
- customize it to your needs.
|
||||||
|
- Customize the whole content of build.xml
|
||||||
|
- copy/paste the content of the rules files (minus the top node)
|
||||||
|
into this file, replacing the <import> task.
|
||||||
|
- customize to your needs.
|
||||||
|
|
||||||
|
***********************
|
||||||
|
****** IMPORTANT ******
|
||||||
|
***********************
|
||||||
|
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
|
||||||
|
in order to avoid having your file be overridden by tools such as "android update project"
|
||||||
|
-->
|
||||||
|
<!-- version-tag: 1 -->
|
||||||
|
<import file="${sdk.dir}/tools/ant/build.xml" />
|
||||||
|
|
||||||
|
</project>
|
@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<lint>
|
||||||
|
</lint>
|
@ -0,0 +1,34 @@
|
|||||||
|
#Android generated
|
||||||
|
bin
|
||||||
|
gen
|
||||||
|
lint.xml
|
||||||
|
|
||||||
|
#Eclipse
|
||||||
|
.project
|
||||||
|
.classpath
|
||||||
|
.settings
|
||||||
|
.checkstyle
|
||||||
|
|
||||||
|
#IntelliJ IDEA
|
||||||
|
.idea
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
*.iws
|
||||||
|
classes
|
||||||
|
gen-external-apklibs
|
||||||
|
|
||||||
|
#Maven
|
||||||
|
target
|
||||||
|
release.properties
|
||||||
|
pom.xml.*
|
||||||
|
|
||||||
|
#Ant
|
||||||
|
build.xml
|
||||||
|
ant.properties
|
||||||
|
local.properties
|
||||||
|
proguard.cfg
|
||||||
|
proguard-project.txt
|
||||||
|
|
||||||
|
#Other
|
||||||
|
.DS_Store
|
||||||
|
tmp
|
@ -0,0 +1,11 @@
|
|||||||
|
language: java
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
email: false
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- wget http://dl.google.com/android/android-sdk_r20.0.3-linux.tgz
|
||||||
|
- tar -zxf android-sdk_r20.0.3-linux.tgz
|
||||||
|
- export ANDROID_HOME=~/builds/JakeWharton/ActionBarSherlock/android-sdk-linux
|
||||||
|
- export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
|
||||||
|
- android update sdk --filter 1,5 --no-ui --force
|
@ -0,0 +1,469 @@
|
|||||||
|
Change Log
|
||||||
|
===============================================================================
|
||||||
|
|
||||||
|
Version 4.2.0 *(2012-10-07)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
**Maven `artifactId` is now to 'actionbarsherlock'.**
|
||||||
|
|
||||||
|
Note: The `.Dialog` themes are now deprecated. These will be removed in a future
|
||||||
|
version of the library.
|
||||||
|
|
||||||
|
* Add `SearchView` widget for standard search interaction (API 8+ only)
|
||||||
|
* Fix: `ShareActionProvider` in the split action bar no longer fills the entire
|
||||||
|
screen.
|
||||||
|
* Fix: `ShareActionProvider` now does file I/O on a background thread.
|
||||||
|
* Fix: Automatically correct `ColorDrawable` not respecting bounds when used as
|
||||||
|
a stacked background.
|
||||||
|
* Fix: Ensure fragments collection is present before dispatching events.
|
||||||
|
* Fix: XML-defined `onClick` searches the correct context for the declared
|
||||||
|
method.
|
||||||
|
* Fix: Ensure action mode start/finish callbacks are invoked on the activity
|
||||||
|
for the native action bar.
|
||||||
|
* Fix: Allow tab callbacks to have a fragment transaction instance for any
|
||||||
|
`FragmentActivity`.
|
||||||
|
* Fix: Ensure `CollapsibleActionView` callbacks are dispatched in both native
|
||||||
|
and compatbility action bars.
|
||||||
|
* Fix: Remove `.ForceOverflow` themes. These never should have been included.
|
||||||
|
|
||||||
|
|
||||||
|
Version 4.1.0 *(2012-05-17)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Fix: Altered technique used for menu event dispatching through the fragment
|
||||||
|
manager for greater control.
|
||||||
|
* Fix: Do not dispatch menu creation event if the activity has been destroyed.
|
||||||
|
* Fix: Correct potential `NullPointerException` when expanding an action item.
|
||||||
|
* Fix: Correct potential `NullPointerException` when the hardware menu key was
|
||||||
|
pressed in an activity that is forcing the overflow menu.
|
||||||
|
* Fix: Do not set a listener on the native action bar tab wrapper unless a
|
||||||
|
compatibility listener has been set.
|
||||||
|
* Fix: Ensure the compatibility animation framework is always available on
|
||||||
|
views even if they were previously detached from the view hierarchy.
|
||||||
|
|
||||||
|
|
||||||
|
Version 4.0.2 *(2012-04-15)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Upgrade to r7 support library.
|
||||||
|
* Fix: Do not trigger menu creation after `onCreate` if activity is finishing.
|
||||||
|
* Fix: Prevent overflow from displaying if there are no overflow action items.
|
||||||
|
* Fix: Long-pressing menu key no longer triggers overflow.
|
||||||
|
* Fix: Use proper tab state-list drawable to mimic ICS.
|
||||||
|
* Fix: Ensure dispatching menu creation and preparation to fragments can
|
||||||
|
properly return `false` when appropriate to avoid rendering artifacts.
|
||||||
|
* Fix: Properly save and fetch action mode tag on ICS.
|
||||||
|
* Fix: Add missing density-specific resources for certain asssets and remove
|
||||||
|
unused assets.
|
||||||
|
|
||||||
|
|
||||||
|
Version 4.0.1 *(2012-03-25)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Add `ShareActionProvider` widget for use as action items.
|
||||||
|
* Re-add 'Styled' sample to provide a more comprehensive theming example.
|
||||||
|
* Fix: Do not dispatch options item selection to fragments if the activity
|
||||||
|
handles the callback.
|
||||||
|
* Fix: Prevent menu key from opening the overflow menu when an action mode is
|
||||||
|
currently displayed.
|
||||||
|
* Fix: Ensure fragment transaction instance is not `null` on initial tab
|
||||||
|
selection callback.
|
||||||
|
* Fix: Displaying an action mode while using stacked tab navigation no longer
|
||||||
|
throws an exception.
|
||||||
|
* Fix: Using expandable action item callbacks no longer results in a possible
|
||||||
|
exception on older devices.
|
||||||
|
|
||||||
|
|
||||||
|
Version 4.0.0 *(2012-03-07)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
Complete rewrite of the library to backport the Android 4.0 action bar.
|
||||||
|
|
||||||
|
* The minimum supported version of Android is now 2.1 (API 7).
|
||||||
|
* New base activities are provided (e.g., `SherlockActivity` and
|
||||||
|
`SherlockFragmentActivity`) which extend from the native activities.
|
||||||
|
* The support library sources are no longer included in the library. You must
|
||||||
|
include `android-support-v4.jar` in your project separately.
|
||||||
|
* Theming now mirrors that of the native action bar through the use of multiple
|
||||||
|
styles rather than through `ab`- and `am`-prefixed attributes in the theme.
|
||||||
|
* The action bar can be statically attached to an activity view without the
|
||||||
|
requirement of using one of the provided base activities.
|
||||||
|
|
||||||
|
|
||||||
|
Version 3.5.1 *(2012-01-03)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Fix: `NullPointerException` in `FragmentManager` can no longer occur when an
|
||||||
|
attempt is being made to save to a `Bundle` that has not yet been created.
|
||||||
|
* Fix: Pre-3.0 action item submenu dialogs now properly dismiss themselves when
|
||||||
|
an item of theirs is selected.
|
||||||
|
|
||||||
|
|
||||||
|
Version 3.5.0 *(2011-12-18)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Library now uses the `r6` version of the compatibility library for its base.
|
||||||
|
Ice Cream Sandwich-specific implementations are currently disabled, however,
|
||||||
|
but will be added in a future version of the library.
|
||||||
|
|
||||||
|
`MenuCompat`, `MenuItemCompat`, and `ActivityCompat` have be added back in
|
||||||
|
to ease transition to this library but all their methods and the classes
|
||||||
|
themselves have been deprecated.
|
||||||
|
* Rewritten menu and action item support from Ice Cream Sandwich.
|
||||||
|
|
||||||
|
* Removed the need for the custom `Window.FEATURE_ACTION_ITEM_TEXT` flag.
|
||||||
|
You should now use the `showAsAction` attribute and/or the
|
||||||
|
`setShowAsAction(int)` method on each `MenuItem` to control whether or
|
||||||
|
not text is shown
|
||||||
|
* Action item dividers are now added automatically only when necessary
|
||||||
|
to distinguish possible confusion between action items.
|
||||||
|
* Fix: Action views now properly size themselves within the bounded space
|
||||||
|
of the menu.
|
||||||
|
|
||||||
|
* Fix: List navigation no longer becomes unusable on certain device
|
||||||
|
configurations.
|
||||||
|
* Fix: `SubMenu`'s `findItem(int)` method now properly returns the support
|
||||||
|
version of `MenuItem`.
|
||||||
|
* Fix: Invisible sub-menu items are no longer shown on the pre-3.0 popup list.
|
||||||
|
|
||||||
|
|
||||||
|
Version 3.4.2 *(2001-11-09)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Fix: Stacked action bar now properly sets the tab bar background based on
|
||||||
|
the theme.
|
||||||
|
|
||||||
|
|
||||||
|
Version 3.4.1 *(2011-11-09)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* The `makeFragmentName` method in `FragmentPagerAdapter` has been changed to
|
||||||
|
`public` scope to allow for easier access to your fragments that it is
|
||||||
|
managing.
|
||||||
|
* Action bar will now animate when calling `show()` or `hide()`.
|
||||||
|
* `SherlockPreferenceActivity` now provides full fragment and loader support.
|
||||||
|
* Examples for the plugins are now in their own sample application.
|
||||||
|
* Fix: Home icon no longer erroneously clipped when it exceeds the size of the
|
||||||
|
action bar.
|
||||||
|
* Fix: Tabs will now scroll horizontally to mimic the native action bar
|
||||||
|
behavior.
|
||||||
|
* Fix: Plugins now properly DO NOT inline their `R.java` integer constants.
|
||||||
|
* Fix: Tabs below the action bar are now styled with a default background so
|
||||||
|
that they do not incorrectly inherit an applied background unless explicity
|
||||||
|
declared.
|
||||||
|
|
||||||
|
|
||||||
|
Version 3.4.0 *(2011-10-30)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Library now uses the `r4` version of the compatibility library for its base.
|
||||||
|
Ice Cream Sandwich-specific implementations are currently disabled, however,
|
||||||
|
but will be added in a future version of the library.
|
||||||
|
* Context menu callbacks now use the support version of `MenuItem` to maintain
|
||||||
|
consistency.
|
||||||
|
* Added preference plugin which provides an action bar enhanced preference
|
||||||
|
screen.
|
||||||
|
* Fix: `abHomeLayout` theme attribute is now honored.
|
||||||
|
* Fix: `onPrepareOptionsMenu` is now properly dispatched upon menu
|
||||||
|
invalidation.
|
||||||
|
|
||||||
|
|
||||||
|
Version 3.3.1 *(2011-10-20)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
ADT 14 is now required. Maven 3 is required if building from the command line.
|
||||||
|
|
||||||
|
* XML-defined `onClick` attributes will now check for an `onClick` method that
|
||||||
|
takes an `android.support.v4.view.MenuItem` instance.
|
||||||
|
* Tabs on medium screens in landscape now display inline rather than below the
|
||||||
|
action bar to mirror how Android 4.0 behaves with the same configuration.
|
||||||
|
* Fix: Menu inflater properly checks activity context for `onClick` method
|
||||||
|
declared in the XML.
|
||||||
|
* Fix: Dialog fragment properly saves its `showDialog` state when not being
|
||||||
|
used as a popup.
|
||||||
|
* Fix: Return `-1` when in tab navigation but no tab is selected. This brings
|
||||||
|
the library in line with the post-3.0 behavior.
|
||||||
|
* Fix: Removing a menu group no longer throws an `IndexOutOfBoundsException`.
|
||||||
|
* Fix: `getSelectedTab` and `getTabAt` no longer throw `NullPointerException`s
|
||||||
|
on post-3.0 when no tab was selected or no tab existed at the specified
|
||||||
|
position, respectively.
|
||||||
|
* Fix: `findFragmentById` now properly returns fragments attached to
|
||||||
|
`android.R.id.content` when run on pre-3.0 devices.
|
||||||
|
|
||||||
|
|
||||||
|
Version 3.3.0 *(2011-10-11)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Tabs are now displayed below the action bar on all medium-screen devices and
|
||||||
|
portrait large-screen devices.
|
||||||
|
* Fix: Dialog fragments no longer throw an `IllegalStateException` when being
|
||||||
|
used as a regular fragment (i.e., not as a popup). See
|
||||||
|
[StackOverflow](http://stackoverflow.com/questions/5637894/dialogfragments-with-devices-api-level-11/7560686#7560686)
|
||||||
|
for more information.
|
||||||
|
* Fix: Popping a fragment off of the back stack now properly assigns its parent
|
||||||
|
activity.
|
||||||
|
* Fix: An activity result no longer causes a `NullPointerException` when the
|
||||||
|
target fragment no longer exists.
|
||||||
|
* Fix: Action item dividers are now properly initially hidden when their
|
||||||
|
associated action items are as well.
|
||||||
|
|
||||||
|
|
||||||
|
Version 3.2.3 *(2011-09-16)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Fix: Fragments in a `ViewPager` that contributed items to the options menu
|
||||||
|
were caught in a race condition causing inconsistent results when a new page
|
||||||
|
was selected. This regression was introduced in version 3.2.2.
|
||||||
|
|
||||||
|
|
||||||
|
Version 3.2.2 *(2011-09-15)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Fix: Side-effects related to using `FragmentMapActivity` due to how it was
|
||||||
|
referencing resources from the main library.
|
||||||
|
* Fix: Fragments adjacent to the currently selected fragment in a `ViewPager`
|
||||||
|
no longer receive context menu events.
|
||||||
|
* Fix: Eliminate exception when inflating context menus on 3.0+ when using
|
||||||
|
`getMenuInflater()`.
|
||||||
|
* Fix: `ViewPager` now determines whether or not an activity menu invalidation
|
||||||
|
is required independently of whether or not fragments were created or
|
||||||
|
destroyed. This should fix an edge case where an activity with a `ViewPager`
|
||||||
|
containing only two fragments would not get its menu properly invalidated.
|
||||||
|
|
||||||
|
|
||||||
|
Version 3.2.1 *(2011-09-12)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Fix: Action mode API incorrectly using the native `Menu` and `MenuItem`
|
||||||
|
classes causing an easy pitfall for `ClassCastExceptions`.
|
||||||
|
* Fix: Large action bar backgrounds increasing the size beyond that alloted in
|
||||||
|
the theme.
|
||||||
|
|
||||||
|
|
||||||
|
Version 3.2.0 *(2011-09-05)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Added support for `MapView` and the Google APIs through the use of
|
||||||
|
`FragmentMapActivity`. If you are using a map within a fragment you must
|
||||||
|
ensure it is always attached to an activity which extends from this new base
|
||||||
|
class.
|
||||||
|
|
||||||
|
Since supporting maps requires compiling against the Google APIs, this
|
||||||
|
functionality is implemented in the form of a plugin which is to be used
|
||||||
|
alongside the normal library. You can choose to add it as an additional
|
||||||
|
library project or by including it as a `.jar`. Maven users may simply
|
||||||
|
include the additional dependency (artifactId: `plugin-maps`).
|
||||||
|
* Fix: Fragments adjacent to the currently selected fragment in a `ViewPager`
|
||||||
|
no longer contribute to the activity menu.
|
||||||
|
* `ActionBar.Tab` has been changed from an interface to an abstract class to
|
||||||
|
mirror its native counterpart.
|
||||||
|
|
||||||
|
|
||||||
|
Version 3.1.3 *(2011-08-14)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Renamed all resources to be prefixed with `abs__` to avoid conflicts when
|
||||||
|
including in your project.
|
||||||
|
* Fix: Action bar background being set on two views causing artifacts to remain
|
||||||
|
on screen when the action bar was hidden.
|
||||||
|
* Fix: Incorrect sub-menu item being selected by default when the sub-menu was
|
||||||
|
triggered from the native options menu on pre-3.0.
|
||||||
|
* Fix: `MenuItem.setVisible` now properly updates the associated action item and
|
||||||
|
native menu item visible state.
|
||||||
|
* Fix: Adding items to a menu now honors its ordering and category.
|
||||||
|
* Fix: Fragment options item selected callback now uses the proper version of
|
||||||
|
`MenuItem`.
|
||||||
|
|
||||||
|
|
||||||
|
Version 3.1.2 *(2011-08-07)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Fix: `MenuItem.getMenuInfo()` was throwing runtime exception. Will now just
|
||||||
|
return `null`.
|
||||||
|
* Fix: Dragging over a `WebView` contained in a `ViewPager` would not register.
|
||||||
|
* Fix: Inflation of context menu incorrectly being handled by the custom menu
|
||||||
|
inflater for the library.
|
||||||
|
|
||||||
|
|
||||||
|
Version 3.1.1 *(2011-07-31)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Fix: `MenuItem.getSubMenu` now returns a support instance rather than a
|
||||||
|
native instance.
|
||||||
|
* Fix: Fragment methods `onAttach` and `onInflate` incorrectly regressed to use
|
||||||
|
`Activity` instead of a `FragmentActivity` in their method signatures.
|
||||||
|
* Fix: Retained fragments not being re-attached on pre-3.0 when attached to
|
||||||
|
`android.R.id.content` upon activity recreation.
|
||||||
|
* Fix: `onPrepareOptionsMenu` not dispatched to fragments. This still will only
|
||||||
|
occur if the activity method returns true (which is the default).
|
||||||
|
* Fix: `Menu.findItem` not returning `null` when the item was not found on
|
||||||
|
Android 3.0+.
|
||||||
|
|
||||||
|
|
||||||
|
Version 3.1.0 *(2011-07-22)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
Due to shortcomings in the Android theming system, a small change must be made
|
||||||
|
in how this library handles themes. If you were using a custom style for
|
||||||
|
`actionBarStyle` you must now specify its attributes in the root of the theme
|
||||||
|
and prefix them with 'ab'.
|
||||||
|
|
||||||
|
You can see an example of this in the `SherlockCustom` theme in
|
||||||
|
`samples/demos/res/values/styles.xml`.
|
||||||
|
|
||||||
|
* Library now uses the `r3` version of the compatibility library for its base.
|
||||||
|
* `actionBarStyle` is no longer a valid theme attribute (see note above).
|
||||||
|
* Added the demo project included with the new compatibility library under
|
||||||
|
`samples/demos/` and merged in the old 'featuredemo'.
|
||||||
|
* Dividers are now shown on pre-3.0 devices between all action items.
|
||||||
|
* `Window.FEATURE_ACTION_BAR_OVERLAY` is now honored on pre-3.0 devices.
|
||||||
|
* Inflation of XML menu resources will now honor `android:actionLayout` and
|
||||||
|
`android:actionViewClass` attributes.
|
||||||
|
* Buttons for displaying the determinate and indeterminate progress bars have
|
||||||
|
been added to the feature toggle demo.
|
||||||
|
* Added support for indeterminate progress bar. Due to the `final` modifier on
|
||||||
|
the native type, you must use `setIndeterminateProgressBarVisibility(Boolean)`
|
||||||
|
and pass `Boolean.TRUE` or `Boolean.FALSE`.
|
||||||
|
* Fix: `MenuBuilder#removeItem(int)` and `MenuBuilder#findItem(int)` throwing
|
||||||
|
`IndexOutOfBoundsException`s when the item was not found.
|
||||||
|
* Fix: Theme attributes for home item data (e.g., icon, logo) will not be
|
||||||
|
overwritten by the special `MenuItem` instance for home.
|
||||||
|
* Fix: Native strings can now be specified for an XML menu `<item>` in
|
||||||
|
`android:title` and `android:titleCondensed`.
|
||||||
|
* `Window.FEATURE_ENABLE_ACTION_BAR_WATSON_TEXT` is now
|
||||||
|
`Window.FEATURE_ACTION_BAR_ITEM_TEXT`.
|
||||||
|
* `Widget.Sherlock.Spinner.DropDown.ActionBar` and
|
||||||
|
`Widget.Sherlock.Light.Spinner.DropDown.ActionBar` styles are now
|
||||||
|
`Widget.Sherlock.Spinner` and `Widget.Sherlock.Light.Spinner`, respectively.
|
||||||
|
* `Widget.Sherlock.ActionBarView_TabXXX` styles are now
|
||||||
|
`Widget.Sherlock.ActionBar.TabXXX`.
|
||||||
|
|
||||||
|
|
||||||
|
Version 3.0.3 *(2011-07-17)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
This version is a hotfix for incompatibilities introduced with the SDKs for
|
||||||
|
3.1 r2 and 3.2 r1. Due to unavoidable changes in the underlying SDK, the library
|
||||||
|
must now be compiled against API level 13.
|
||||||
|
|
||||||
|
* `actionModeStyle` and `actionModePopupWindowStyle` are no longer valid theme
|
||||||
|
attributes.
|
||||||
|
|
||||||
|
|
||||||
|
Version 3.0.2 *(2011-06-23)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Sub-menus for action items are now shown in a list dialog.
|
||||||
|
* Moved certain classes to the `com.actionbarsherlock.internal` package which
|
||||||
|
were not meant for public consumption. Despite being given `public` scope in
|
||||||
|
this new package, these classes should **NOT** be used under any circumstances
|
||||||
|
as their API can be considered highly volatile and is subject to change often
|
||||||
|
and without warning.
|
||||||
|
|
||||||
|
|
||||||
|
Version 3.0.1 *(2011-06-08)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Fix: `onOptionsItemSelected()` not being called in fragments if the activity
|
||||||
|
version returns `false`.
|
||||||
|
* Fix: `onCreateOptionsMenu()` not being called in fragments on Android 3.0+.
|
||||||
|
* New: Enable action item text display on pre-Android 3.0 by calling
|
||||||
|
`requestWindowFeature` with `Window.FEATURE_ENABLE_ACTION_BAR_WATSON_TEXT`.
|
||||||
|
* Fix: `setCustomView()` no longer automatically enables the custom view on
|
||||||
|
pre-3.0. You must call `setDisplayShowCustomEnabled()` in order to display
|
||||||
|
the view.
|
||||||
|
|
||||||
|
|
||||||
|
Version 3.0.0 *(2011-06-05)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
The API has been rewritten to mimic that of the native action bar. As a result,
|
||||||
|
usage now only requires changing a few imports to use the support versions
|
||||||
|
of classes and calling `getSupportActionBar()`. See the README for more info.
|
||||||
|
|
||||||
|
The rewrite necessitated tight interaction with the
|
||||||
|
[compatibility library](http://android-developers.blogspot.com/2011/03/fragments-for-all.html)
|
||||||
|
to the point where its sources are now included. You are no longer required to
|
||||||
|
have the standalone `.jar` file.
|
||||||
|
|
||||||
|
Also included is a default custom action bar for use by default on pre-3.0
|
||||||
|
devices. This custom implementation is based off of Johan Nilsson's
|
||||||
|
[Android-ActionBar](https://github.com/johannilsson/android-actionbar) and the
|
||||||
|
[work that I have done](https://github.com/johannilsson/android-actionbar/pull/25)
|
||||||
|
on it.
|
||||||
|
|
||||||
|
More details are available at http://actionbarsherlock.com
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.1.1 *(2011-03-21)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
**No changes to library code.**
|
||||||
|
|
||||||
|
* Moved library to the root of the repository.
|
||||||
|
* Added `samples/dependencies.py` script to automatically download the needed
|
||||||
|
dependencies for the sample projects.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.1.0 *(2011-03-21)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
**WARNING**: The
|
||||||
|
[Android Compatibility Library (v4)](http://android-developers.blogspot.com/2011/03/fragments-for-all.html)
|
||||||
|
is now required.
|
||||||
|
|
||||||
|
* Added `ActionBarSherlock.Activity`, `ActionBarSherlock.FragmentActivity`,
|
||||||
|
and `ActionBarSherlock.ListActivity` for extension by implementing
|
||||||
|
activities, the latter of which is deprecated. This affords a much tighter
|
||||||
|
integration and allows for the use of other new features listed below.
|
||||||
|
* New API method: `layout(Fragment)` will use the fragment argument as the
|
||||||
|
content to the activity.
|
||||||
|
* New API method: `menu(int)` allows for the inflation of menu XMLs from a
|
||||||
|
resource. For the non-native implementation, the XML can be inflated to a
|
||||||
|
custom Menu which can then be applied appropriately to the third-party
|
||||||
|
action bar. Sub-menus are also supported. Third-party action bar handlers
|
||||||
|
should implement `ActionBarSherlock.HasMenu` for this functionality. *This
|
||||||
|
feature requires that activities extend from one of the provided activity
|
||||||
|
base classes.*
|
||||||
|
* New API method: `homeAsUp(boolean)`. This mimics the native method
|
||||||
|
`setDisplayHomeAsUpEnalbed` on the native action bar. Third-party action bar
|
||||||
|
handlers should implement `ActionBarSherlock.HasHomeAsUp` for this
|
||||||
|
functionality.
|
||||||
|
* New API method: `useLogo(boolean)` will trigger the action bar to hide the
|
||||||
|
application icon/home button and title and show a larger logo representing
|
||||||
|
the application. Third-party action bar handlers should implement
|
||||||
|
`ActionBarSherlock.HasLogo` for this functionality.
|
||||||
|
* New API method: `listNavigation(SpinnerAdapter, OnNavigationListener)`. Tells
|
||||||
|
the action bar to use drop-down style navigation with the specified list of
|
||||||
|
items and callback listener. Third-party action bar handlers should
|
||||||
|
implement `ActionBarSherlock.HasListNavigation` for this functionality.
|
||||||
|
* Javadocs are now available at
|
||||||
|
[jakewharton.github.com/ActionBarSherlock](http://jakewharton.github.com/ActionBarSherlock/).
|
||||||
|
* A standalone JAR is now available via the
|
||||||
|
[GitHub downloads page](https://github.com/JakeWharton/ActionBarSherlock/downloads)
|
||||||
|
or in my
|
||||||
|
[personal maven repository](http://r.jakewharton.com/maven/)
|
||||||
|
as `com.jakewharton:android-actionbarsherlock:2.1.0`.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.0.1 *(2011-03-11)*
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
* Use `Class.forName()` for detection of native action bar. This provides
|
||||||
|
compatability all the way back to Android 1.5.
|
||||||
|
|
||||||
|
|
||||||
|
Version 2.0.0 *(2011-03-09)*
|
||||||
|
----------------------------
|
||||||
|
Complete rewrite!
|
||||||
|
|
||||||
|
* New and better API.
|
||||||
|
* More sane logic and attachment to activity.
|
||||||
|
* Extensible via generics. Implement any ActionBar or roll your own with
|
||||||
|
minimal effort.
|
||||||
|
* Now a library project for easy inclusion in applications.
|
||||||
|
|
||||||
|
|
||||||
|
Version 1.0.0 *(2011-03-07)*
|
||||||
|
----------------------------
|
||||||
|
Initial release.
|
@ -0,0 +1,11 @@
|
|||||||
|
Contributing
|
||||||
|
============
|
||||||
|
|
||||||
|
If you would like to contribute code to ActionBarSherlock you can do so through
|
||||||
|
GitHub by forking the repository and sending a pull request.
|
||||||
|
|
||||||
|
When submitting code, please make every effort to follow existing conventions
|
||||||
|
and style in order to keep the code as readable as possible. Please also make
|
||||||
|
sure your code compiles by running `mvn clean verify`. Checkstyle failures
|
||||||
|
during compilation indicate errors in your style and can be viewed in the
|
||||||
|
`checkstyle-result.xml` file.
|
@ -0,0 +1,202 @@
|
|||||||
|
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
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.
|
@ -0,0 +1,60 @@
|
|||||||
|
ActionBarSherlock
|
||||||
|
=================
|
||||||
|
|
||||||
|
ActionBarSherlock is an standalone library designed to facilitate the use of
|
||||||
|
the action bar design pattern across all versions of Android through a single
|
||||||
|
API.
|
||||||
|
|
||||||
|
The library will automatically use the [native ActionBar][2] implementation on
|
||||||
|
Android 4.0 or later. For previous versions which do not include ActionBar, a
|
||||||
|
custom action bar implementation based on the sources of Ice Cream Sandwich
|
||||||
|
will automatically be wrapped around the layout. This allows you to easily
|
||||||
|
develop an application with an action bar for every version of Android from 2.x
|
||||||
|
and up.
|
||||||
|
|
||||||
|
**See http://actionbarsherlock.com for more information.**
|
||||||
|
|
||||||
|
![Example Image][3]
|
||||||
|
|
||||||
|
Try out the sample applications on the Android Market: [Feature Demos][4],
|
||||||
|
[Fragments][5], and [RoboGuice][6].
|
||||||
|
|
||||||
|
Continuous integration is provided by [Travis CI][7].
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Developed By
|
||||||
|
============
|
||||||
|
|
||||||
|
* Jake Wharton - <jakewharton@gmail.com>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
License
|
||||||
|
=======
|
||||||
|
|
||||||
|
Copyright 2012 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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[1]: http://android-developers.blogspot.com/2011/03/fragments-for-all.html
|
||||||
|
[2]: http://developer.android.com/guide/topics/ui/actionbar.html
|
||||||
|
[3]: http://actionbarsherlock.com/static/feature.png
|
||||||
|
[4]: https://play.google.com/store/apps/details?id=com.actionbarsherlock.sample.demos
|
||||||
|
[5]: https://play.google.com/store/apps/details?id=com.actionbarsherlock.sample.fragments
|
||||||
|
[6]: https://play.google.com/store/apps/details?id=com.actionbarsherlock.sample.roboguice
|
||||||
|
[7]: https://travis-ci.org/JakeWharton/ActionBarSherlock
|
@ -0,0 +1,121 @@
|
|||||||
|
<?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"/>
|
||||||
|
<!--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"/-->
|
||||||
|
<module name="StringLiteralEquality"/>
|
||||||
|
<module name="CovariantEquals"/>
|
||||||
|
<!--module name="NoClone"/-->
|
||||||
|
<module name="NoFinalizer"/>
|
||||||
|
<module name="PackageDeclaration"/>
|
||||||
|
<!--module name="FallThrough"/-->
|
||||||
|
|
||||||
|
<!-- 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>
|
@ -0,0 +1,7 @@
|
|||||||
|
<?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">
|
||||||
|
|
||||||
|
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16"/>
|
||||||
|
|
||||||
|
</manifest>
|
@ -0,0 +1,15 @@
|
|||||||
|
ActionBarSherlock Library
|
||||||
|
=========================
|
||||||
|
|
||||||
|
This folder contains the main library which should be linked against as an
|
||||||
|
Android library project in your application.
|
||||||
|
|
||||||
|
For more information see the "Including In Your Project" section of the
|
||||||
|
[usage page][1].
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[1]: http://actionbarsherlock.com/usage.html
|
@ -0,0 +1,32 @@
|
|||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'com.android.tools.build:gradle:0.4'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
apply plugin: 'android-library'
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile fileTree(dir: 'libs', include: '*.jar')
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdkVersion 15
|
||||||
|
buildToolsVersion "18.0.1"
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
manifest.srcFile 'AndroidManifest.xml'
|
||||||
|
java.srcDirs = ['src']
|
||||||
|
resources.srcDirs = ['src']
|
||||||
|
aidl.srcDirs = ['src']
|
||||||
|
renderscript.srcDirs = ['src']
|
||||||
|
res.srcDirs = ['res']
|
||||||
|
assets.srcDirs = ['assets']
|
||||||
|
}
|
||||||
|
|
||||||
|
instrumentTest.setRoot('tests')
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,148 @@
|
|||||||
|
<?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>actionbarsherlock</artifactId>
|
||||||
|
<name>ActionBarSherlock</name>
|
||||||
|
<packaging>apklib</packaging>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>com.actionbarsherlock</groupId>
|
||||||
|
<artifactId>parent</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.google.android</groupId>
|
||||||
|
<artifactId>support-v4</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<sourceDirectory>src</sourceDirectory>
|
||||||
|
<testSourceDirectory>test</testSourceDirectory>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
|
||||||
|
<artifactId>android-maven-plugin</artifactId>
|
||||||
|
<extensions>true</extensions>
|
||||||
|
<configuration>
|
||||||
|
<nativeLibrariesDirectory>ignored</nativeLibrariesDirectory>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<skip>true</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.google.code.maven-replacer-plugin</groupId>
|
||||||
|
<artifactId>maven-replacer-plugin</artifactId>
|
||||||
|
<version>1.4.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>process-sources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>replace</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<ignoreMissingFile>false</ignoreMissingFile>
|
||||||
|
<file>target/generated-sources/r/com/actionbarsherlock/R.java</file>
|
||||||
|
<outputFile>target/generated-sources/r/com/actionbarsherlock/R.java</outputFile>
|
||||||
|
<regex>false</regex>
|
||||||
|
<token>static final int</token>
|
||||||
|
<value>static int</value>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.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>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<version>1.7</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>attach-artifact</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<artifacts>
|
||||||
|
<artifact>
|
||||||
|
<type>jar</type>
|
||||||
|
<file>${project.build.directory}/${project.build.finalName}.jar</file>
|
||||||
|
</artifact>
|
||||||
|
</artifacts>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.eclipse.m2e</groupId>
|
||||||
|
<artifactId>lifecycle-mapping</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<configuration>
|
||||||
|
<lifecycleMappingMetadata>
|
||||||
|
<pluginExecutions>
|
||||||
|
<pluginExecution>
|
||||||
|
<pluginExecutionFilter>
|
||||||
|
<groupId>com.google.code.maven-replacer-plugin</groupId>
|
||||||
|
<artifactId>maven-replacer-plugin</artifactId>
|
||||||
|
<versionRange>[1.4.0,)</versionRange>
|
||||||
|
<goals>
|
||||||
|
<goal>replace</goal>
|
||||||
|
</goals>
|
||||||
|
</pluginExecutionFilter>
|
||||||
|
<action>
|
||||||
|
<ignore />
|
||||||
|
</action>
|
||||||
|
</pluginExecution>
|
||||||
|
</pluginExecutions>
|
||||||
|
</lifecycleMappingMetadata>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
</build>
|
||||||
|
</project>
|
@ -0,0 +1,12 @@
|
|||||||
|
# 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-15
|
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2010 The Android Open Source Project
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_enabled="false" android:color="@color/abs__bright_foreground_disabled_holo_dark"/>
|
||||||
|
<item android:color="@color/abs__bright_foreground_holo_dark"/> <!-- not selected -->
|
||||||
|
</selector>
|
@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2010 The Android Open Source Project
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_enabled="false" android:color="@color/abs__bright_foreground_disabled_holo_light"/>
|
||||||
|
<item android:color="@color/abs__bright_foreground_holo_light"/> <!-- not selected -->
|
||||||
|
</selector>
|
||||||
|
|
@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2010 The Android Open Source Project
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_enabled="false" android:color="@color/abs__bright_foreground_disabled_holo_dark"/>
|
||||||
|
<item android:state_window_focused="false" android:color="@color/abs__bright_foreground_holo_dark"/>
|
||||||
|
<item android:state_pressed="true" android:color="@color/abs__bright_foreground_holo_dark"/>
|
||||||
|
<item android:state_selected="true" android:color="@color/abs__bright_foreground_holo_dark"/>
|
||||||
|
<item android:state_activated="true" android:color="@color/abs__bright_foreground_holo_dark"/>
|
||||||
|
<item android:color="@color/abs__bright_foreground_holo_dark"/> <!-- not selected -->
|
||||||
|
</selector>
|
@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2010 The Android Open Source Project
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_enabled="false" android:color="@color/abs__bright_foreground_disabled_holo_light"/>
|
||||||
|
<item android:state_window_focused="false" android:color="@color/abs__bright_foreground_holo_light"/>
|
||||||
|
<item android:state_pressed="true" android:color="@color/abs__bright_foreground_holo_light"/>
|
||||||
|
<item android:state_selected="true" android:color="@color/abs__bright_foreground_holo_light"/>
|
||||||
|
<item android:state_activated="true" android:color="@color/abs__bright_foreground_holo_light"/>
|
||||||
|
<item android:color="@color/abs__bright_foreground_holo_light"/> <!-- not selected -->
|
||||||
|
|
||||||
|
</selector>
|
||||||
|
|
After Width: | Height: | Size: 144 B |
After Width: | Height: | Size: 138 B |
After Width: | Height: | Size: 144 B |
After Width: | Height: | Size: 135 B |
After Width: | Height: | Size: 134 B |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 146 B |
After Width: | Height: | Size: 145 B |
After Width: | Height: | Size: 192 B |
After Width: | Height: | Size: 146 B |
After Width: | Height: | Size: 146 B |
After Width: | Height: | Size: 139 B |
After Width: | Height: | Size: 133 B |
After Width: | Height: | Size: 155 B |
After Width: | Height: | Size: 145 B |
After Width: | Height: | Size: 104 B |
After Width: | Height: | Size: 102 B |
After Width: | Height: | Size: 112 B |
After Width: | Height: | Size: 108 B |
After Width: | Height: | Size: 110 B |
After Width: | Height: | Size: 108 B |
After Width: | Height: | Size: 149 B |
After Width: | Height: | Size: 145 B |
After Width: | Height: | Size: 147 B |
After Width: | Height: | Size: 147 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 602 B |
After Width: | Height: | Size: 546 B |
After Width: | Height: | Size: 713 B |
After Width: | Height: | Size: 737 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 144 B |
After Width: | Height: | Size: 148 B |
After Width: | Height: | Size: 467 B |
After Width: | Height: | Size: 505 B |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 154 B |
After Width: | Height: | Size: 78 B |
After Width: | Height: | Size: 76 B |
After Width: | Height: | Size: 159 B |
After Width: | Height: | Size: 154 B |
After Width: | Height: | Size: 159 B |
After Width: | Height: | Size: 159 B |
After Width: | Height: | Size: 189 B |
After Width: | Height: | Size: 189 B |
After Width: | Height: | Size: 922 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 178 B |
After Width: | Height: | Size: 174 B |
After Width: | Height: | Size: 917 B |
After Width: | Height: | Size: 917 B |
After Width: | Height: | Size: 188 B |
After Width: | Height: | Size: 188 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 311 B |
After Width: | Height: | Size: 312 B |
After Width: | Height: | Size: 306 B |
After Width: | Height: | Size: 306 B |