summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authorAndrew Sapperstein <asapperstein@google.com>2013-10-04 18:31:55 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-04 18:31:55 -0700
commitbae0ee4e5446b68e1301131a5cded3585bd87653 (patch)
treeada09178d56a2a7874c81d146a63b490354415d6 /sample
parent1a382343cef5be00d3134bd692411f7866fa7f42 (diff)
parentee3c538fc868e7015fed6bdd0323bc575f2cc476 (diff)
downloadphotoviewer-bae0ee4e5446b68e1301131a5cded3585bd87653.tar.gz
am ee3c538f: am be7764a1: Update target sdk to 19 and add appcompat sample.
* commit 'ee3c538fc868e7015fed6bdd0323bc575f2cc476': Update target sdk to 19 and add appcompat sample.
Diffstat (limited to 'sample')
-rw-r--r--sample/Android.mk31
-rw-r--r--sample/AndroidManifest.xml3
-rw-r--r--sample/res/menu/activity_main.xml6
3 files changed, 27 insertions, 13 deletions
diff --git a/sample/Android.mk b/sample/Android.mk
index 67e2356..f2018d0 100644
--- a/sample/Android.mk
+++ b/sample/Android.mk
@@ -23,14 +23,11 @@ res_dirs := $(photo_dir) res
include $(CLEAR_VARS)
src_dirs := src
-LOCAL_PACKAGE_NAME := LibPhotoViewerSample
+LOCAL_PACKAGE_NAME := PhotoViewerSample
LOCAL_STATIC_JAVA_LIBRARIES += libphotoviewer
-LOCAL_STATIC_JAVA_LIBRARIES += android-common
-LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4
-LOCAL_STATIC_JAVA_LIBRARIES += android-support-v13
-LOCAL_SDK_VERSION := current
+LOCAL_SDK_VERSION := 19
LOCAL_SRC_FILES := $(call all-java-files-under, $(src_dirs)) \
$(call all-logtags-files-under, $(src_dirs))
@@ -41,6 +38,30 @@ LOCAL_AAPT_FLAGS += --extra-packages com.android.ex.photo
include $(BUILD_PACKAGE)
##################################################
+
+#Include res dir from photoviewer
+photo_dir := ../res ../appcompat/res
+res_dirs := $(photo_dir) res ../../../support/v7/appcompat/res
+
+# Build APK
+include $(CLEAR_VARS)
+
+src_dirs := src
+LOCAL_PACKAGE_NAME := AppcompatPhotoViewerSample
+
+LOCAL_STATIC_JAVA_LIBRARIES += libphotoviewer_appcompat
+
+LOCAL_SDK_VERSION := 19
+
+LOCAL_SRC_FILES := $(call all-java-files-under, $(src_dirs)) \
+ $(call all-logtags-files-under, $(src_dirs))
+LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs))
+LOCAL_AAPT_FLAGS := --auto-add-overlay
+LOCAL_AAPT_FLAGS += --extra-packages android.support.v7.appcompat:com.android.ex.photo
+
+include $(BUILD_PACKAGE)
+
+##################################################
# Build all sub-directories
include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/sample/AndroidManifest.xml b/sample/AndroidManifest.xml
index edbb41e..5b41568 100644
--- a/sample/AndroidManifest.xml
+++ b/sample/AndroidManifest.xml
@@ -3,8 +3,7 @@
android:versionCode="1"
android:versionName="1.0" >
- <uses-sdk
- android:minSdkVersion="14"/>
+ <uses-sdk android:targetSdkVersion="19" android:minSdkVersion="14"/>
<application
android:icon="@drawable/ic_launcher"
diff --git a/sample/res/menu/activity_main.xml b/sample/res/menu/activity_main.xml
deleted file mode 100644
index eeb0557..0000000
--- a/sample/res/menu/activity_main.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<menu xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto">
- <item android:id="@+id/menu_settings"
- android:title="@string/menu_settings"
- android:showAsAction="never" />
-</menu>