Skip to content

Commit a92ef3a

Browse files
committed
appcompat-v7 workalikes for standard action bar samples
1 parent 4b4e8bc commit a92ef3a

File tree

439 files changed

+3813
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

439 files changed

+3813
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.commonsware.android.inflation"
4+
android:versionCode="1"
5+
android:versionName="1.0">
6+
7+
<supports-screens
8+
android:anyDensity="true"
9+
android:largeScreens="true"
10+
android:normalScreens="true"
11+
android:smallScreens="true"/>
12+
13+
<uses-sdk
14+
android:minSdkVersion="10"
15+
android:targetSdkVersion="19"/>
16+
17+
<application
18+
android:allowBackup="false"
19+
android:icon="@drawable/ic_launcher"
20+
android:label="@string/app_name"
21+
android:theme="@style/Theme.AppCompat">
22+
<activity
23+
android:name=".ActionBarDemoActivity"
24+
android:label="@string/app_name">
25+
<intent-filter>
26+
<action android:name="android.intent.action.MAIN"/>
27+
28+
<category android:name="android.intent.category.LAUNCHER"/>
29+
</intent-filter>
30+
</activity>
31+
</application>
32+
33+
</manifest>

AppCompat/ActionBar/build.gradle

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
buildscript {
2+
repositories {
3+
mavenCentral()
4+
}
5+
dependencies {
6+
classpath 'com.android.tools.build:gradle:0.13.2'
7+
}
8+
}
9+
apply plugin: 'com.android.application'
10+
11+
dependencies {
12+
compile "com.android.support:appcompat-v7:21.0.+"
13+
}
14+
15+
android {
16+
compileSdkVersion 21
17+
buildToolsVersion "20.0.0"
18+
19+
sourceSets {
20+
main {
21+
manifest.srcFile 'AndroidManifest.xml'
22+
java.srcDirs = ['src']
23+
resources.srcDirs = ['src']
24+
aidl.srcDirs = ['src']
25+
renderscript.srcDirs = ['src']
26+
res.srcDirs = ['res']
27+
assets.srcDirs = ['assets']
28+
}
29+
30+
// Move the tests to tests/java, tests/res, etc...
31+
instrumentTest.setRoot('tests')
32+
33+
// Move the build types to build-types/<type>
34+
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
35+
// This moves them out of them default location under src/<type>/... which would
36+
// conflict with src/ being used by the main source set.
37+
// Adding new build types or product flavors should be accompanied
38+
// by a similar customization.
39+
debug.setRoot('build-types/debug')
40+
release.setRoot('build-types/release')
41+
}
42+
}

AppCompat/ActionBar/build.xml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project name="InflationDemo" default="help">
3+
4+
<!-- The local.properties file is created and updated by the 'android' tool.
5+
It contains the path to the SDK. It should *NOT* be checked into
6+
Version Control Systems. -->
7+
<loadproperties srcFile="local.properties" />
8+
9+
<!-- The ant.properties file can be created by you. It is only edited by the
10+
'android' tool to add properties to it.
11+
This is the place to change some Ant specific build properties.
12+
Here are some properties you may want to change/update:
13+
14+
source.dir
15+
The name of the source directory. Default is 'src'.
16+
out.dir
17+
The name of the output directory. Default is 'bin'.
18+
19+
For other overridable properties, look at the beginning of the rules
20+
files in the SDK, at tools/ant/build.xml
21+
22+
Properties related to the SDK location or the project target should
23+
be updated using the 'android' tool with the 'update' action.
24+
25+
This file is an integral part of the build system for your
26+
application and should be checked into Version Control Systems.
27+
28+
-->
29+
<property file="ant.properties" />
30+
31+
<!-- The project.properties file is created and updated by the 'android'
32+
tool, as well as ADT.
33+
34+
This contains project specific properties such as project target, and library
35+
dependencies. Lower level build properties are stored in ant.properties
36+
(or in .classpath for Eclipse projects).
37+
38+
This file is an integral part of the build system for your
39+
application and should be checked into Version Control Systems. -->
40+
<loadproperties srcFile="project.properties" />
41+
42+
<!-- quick check on sdk.dir -->
43+
<fail
44+
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
45+
unless="sdk.dir"
46+
/>
47+
48+
49+
<!-- extension targets. Uncomment the ones where you want to do custom work
50+
in between standard targets -->
51+
<!--
52+
<target name="-pre-build">
53+
</target>
54+
<target name="-pre-compile">
55+
</target>
56+
57+
/* This is typically used for code obfuscation.
58+
Compiled code location: ${out.classes.absolute.dir}
59+
If this is not done in place, override ${out.dex.input.absolute.dir} */
60+
<target name="-post-compile">
61+
</target>
62+
-->
63+
64+
<!-- Import the actual build file.
65+
66+
To customize existing targets, there are two options:
67+
- Customize only one target:
68+
- copy/paste the target into this file, *before* the
69+
<import> task.
70+
- customize it to your needs.
71+
- Customize the whole content of build.xml
72+
- copy/paste the content of the rules files (minus the top node)
73+
into this file, replacing the <import> task.
74+
- customize to your needs.
75+
76+
***********************
77+
****** IMPORTANT ******
78+
***********************
79+
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
80+
in order to avoid having your file be overridden by tools such as "android update project"
81+
-->
82+
<!-- version-tag: 1 -->
83+
<import file="${sdk.dir}/tools/ant/build.xml" />
84+
85+
</project>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Wed Apr 10 15:27:10 PDT 2013
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=http\://services.gradle.org/distributions/gradle-2.1-all.zip
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# To enable ProGuard in your project, edit project.properties
2+
# to define the proguard.config property as described in that file.
3+
#
4+
# Add project specific ProGuard rules here.
5+
# By default, the flags in this file are appended to flags specified
6+
# in ${sdk.dir}/tools/proguard/proguard-android.txt
7+
# You can edit the include path and order by changing the ProGuard
8+
# include property in project.properties.
9+
#
10+
# For more details, see
11+
# http://developer.android.com/guide/developing/tools/proguard.html
12+
13+
# Add any project specific keep options here:
14+
15+
# If your project uses WebView with JS, uncomment the following
16+
# and specify the fully qualified class name to the JavaScript interface
17+
# class:
18+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19+
# public *;
20+
#}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sdk-folder=/opt/android-sdk-linux_x86-1.1_r1
2+
target=android-19
614 Bytes
Loading
262 Bytes
Loading
663 Bytes
Loading
5.03 KB
Loading

0 commit comments

Comments
 (0)