Skip to content

Commit 6d16801

Browse files
committed
Import the CursorLoaderDemo
1 parent 504916f commit 6d16801

File tree

18 files changed

+785
-0
lines changed

18 files changed

+785
-0
lines changed

CursorLoaderDemo/.classpath

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" output="target/classes" path="src"/>
4+
<classpathentry kind="src" path="gen"/>
5+
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
6+
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
7+
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
8+
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
9+
<classpathentry kind="output" path="bin/classes"/>
10+
</classpath>

CursorLoaderDemo/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
bin
2+
gen
3+
target

CursorLoaderDemo/.project

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>CursorLoaderSample</name>
4+
<comment></comment>
5+
<buildSpec>
6+
<buildCommand>
7+
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
8+
<arguments>
9+
</arguments>
10+
</buildCommand>
11+
<buildCommand>
12+
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
13+
<arguments>
14+
</arguments>
15+
</buildCommand>
16+
<buildCommand>
17+
<name>org.eclipse.jdt.core.javabuilder</name>
18+
<arguments>
19+
</arguments>
20+
</buildCommand>
21+
<buildCommand>
22+
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
23+
<arguments>
24+
</arguments>
25+
</buildCommand>
26+
</buildSpec>
27+
<natures>
28+
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
29+
<nature>org.eclipse.jdt.core.javanature</nature>
30+
</natures>
31+
</projectDescription>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.example.cursorloaderdemo"
4+
android:versionCode="1"
5+
android:versionName="1.0" >
6+
7+
<uses-sdk
8+
android:minSdkVersion="11"
9+
android:targetSdkVersion="21" />
10+
11+
<uses-permission android:name="android.Manifest.permission.READ_HISTORY_BOOKMARKS"/>
12+
13+
<application
14+
android:allowBackup="true"
15+
android:icon="@drawable/ic_launcher"
16+
android:label="@string/app_name"
17+
android:theme="@style/AppTheme" >
18+
<activity
19+
android:name="com.example.cursorloaderdemo.MainActivity"
20+
android:label="@string/app_name" >
21+
<intent-filter>
22+
<action android:name="android.intent.action.MAIN" />
23+
24+
<category android:name="android.intent.category.LAUNCHER" />
25+
</intent-filter>
26+
</activity>
27+
</application>
28+
29+
</manifest>

CursorLoaderDemo/README.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
== CursorLoaderSample
2+
3+
This will be a demo to show using the CursorLoader
4+
to load from a ContentProvider into a ListView.
5+
6+
=== Status
7+
8+
It is not working ATM due to being imported from
9+
another project and needing to adapt it a little.
384 KB
Binary file not shown.

CursorLoaderDemo/pom.xml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>CursorLoaderDemo</groupId>
5+
<artifactId>CursorLoaderDemo</artifactId>
6+
<version>0.0.1-SNAPSHOT</version>
7+
<packaging>apk</packaging>
8+
9+
<properties>
10+
<platform.version>4.0.1.2</platform.version>
11+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
12+
</properties>
13+
14+
<!-- For getting dependencies -->
15+
<repositories>
16+
<repository>
17+
<id>snapshots-nexus.ehealthinnovation.org</id>
18+
<name>Internal Release Snapshots</name>
19+
<url>http://nexus.ehealthinnovation.org/content/repositories/snapshots/</url>
20+
</repository>
21+
<repository>
22+
<id>releases-nexus.ehealthinnovation.org</id>
23+
<name>Internal Releases</name>
24+
<url>http://nexus.ehealthinnovation.org/content/repositories/releases/</url>
25+
</repository>
26+
</repositories>
27+
28+
<!-- For giving dependencies -->
29+
<distributionManagement>
30+
<repository>
31+
<id>nexus.ehealthinnovation.org</id>
32+
<name>Internal Releases</name>
33+
<url>http://nexus.ehealthinnovation.org/content/repositories/releases/</url>
34+
</repository>
35+
<snapshotRepository>
36+
<id>nexus.ehealthinnovation.org</id>
37+
<name>Internal Release Snapshots</name>
38+
<url>http://nexus.ehealthinnovation.org/content/repositories/snapshots/</url>
39+
</snapshotRepository>
40+
</distributionManagement>
41+
42+
<dependencies>
43+
<dependency>
44+
<groupId>com.google.android</groupId>
45+
<artifactId>android</artifactId>
46+
<version>${platform.version}</version>
47+
<scope>provided</scope>
48+
</dependency>
49+
<dependency>
50+
<groupId>com.google.android</groupId>
51+
<artifactId>support-v4</artifactId>
52+
<version>r7</version>
53+
</dependency>
54+
<dependency>
55+
<groupId>org.ehealthinnovation</groupId>
56+
<artifactId>eHealthContentProvider</artifactId>
57+
<version>1.0.1-SNAPSHOT</version>
58+
<type>aar</type>
59+
</dependency>
60+
</dependencies>
61+
62+
<build>
63+
<sourceDirectory>src</sourceDirectory>
64+
<plugins>
65+
<plugin>
66+
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
67+
<artifactId>android-maven-plugin</artifactId>
68+
<version>3.8.2</version>
69+
<configuration>
70+
<androidManifestFile>${project.basedir}/AndroidManifest.xml</androidManifestFile>
71+
<assetsDirectory>${project.basedir}/assets</assetsDirectory>
72+
<resourceDirectory>${project.basedir}/res</resourceDirectory>
73+
<nativeLibrariesDirectory>${project.basedir}/src/main/native</nativeLibrariesDirectory>
74+
<sdk>
75+
<platform>18</platform>
76+
</sdk>
77+
<undeployBeforeDeploy>true</undeployBeforeDeploy>
78+
</configuration>
79+
<extensions>true</extensions>
80+
</plugin>
81+
82+
<plugin>
83+
<artifactId>maven-compiler-plugin</artifactId>
84+
<version>3.0</version>
85+
<configuration>
86+
<source>1.6</source>
87+
<target>1.6</target>
88+
</configuration>
89+
</plugin>
90+
91+
</plugins>
92+
</build>
93+
</project>
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: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# This file is automatically generated by Android Tools.
2+
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3+
#
4+
# This file must be checked in Version Control Systems.
5+
#
6+
# To customize properties used by the Ant build system edit
7+
# "ant.properties", and override values to adapt the script to your
8+
# project structure.
9+
#
10+
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11+
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12+
13+
# Project target.
14+
target=android-19
15+
android.library.reference.1=../eHealthContentProvider
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
<?xml version="1.0" encoding="utf-8"?><TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
android:paddingBottom="@dimen/activity_vertical_margin"
6+
android:paddingLeft="@dimen/activity_horizontal_margin"
7+
android:paddingRight="@dimen/activity_horizontal_margin"
8+
android:paddingTop="@dimen/activity_vertical_margin"
9+
tools:context=".DebugActivity" >
10+
11+
<TextView
12+
android:id="@+id/editText1"
13+
android:layout_width="wrap_content"
14+
android:layout_height="wrap_content"
15+
android:ems="10"
16+
android:text="@string/debug_lecture" >
17+
</TextView>
18+
19+
<TableRow
20+
style="?android:attr/buttonBarStyle"
21+
android:layout_width="match_parent"
22+
android:layout_height="match_parent" >
23+
24+
<Button
25+
style="?android:attr/buttonBarButtonStyle"
26+
android:layout_width="match_parent"
27+
android:layout_height="wrap_content"
28+
android:onClick="doDateTimeNow"
29+
android:text="@string/set_time_now" />
30+
31+
<TextView
32+
android:id="@+id/dateDisplay"
33+
style="?android:attr/actionButtonStyle"
34+
android:layout_width="wrap_content"
35+
android:layout_height="wrap_content"
36+
android:clickable="true"
37+
android:onClick="doSetDate" />
38+
39+
<TextView
40+
android:id="@+id/timeDisplay"
41+
style="?android:attr/actionButtonStyle"
42+
android:layout_width="wrap_content"
43+
android:layout_height="wrap_content"
44+
android:clickable="true"
45+
android:onClick="doSetTime" />
46+
47+
</TableRow>
48+
49+
<TableRow
50+
android:layout_width="match_parent"
51+
android:layout_height="match_parent" >
52+
53+
<TextView
54+
android:layout_width="wrap_content"
55+
android:layout_height="wrap_content"
56+
android:text="@string/rtWeight" />
57+
58+
<EditText android:id="@+id/debugWeightValue"
59+
android:text="@string/dummy_weight"
60+
android:inputType='numberSigned'
61+
android:layout_width="wrap_content"
62+
android:layout_height="wrap_content" >
63+
64+
<requestFocus/>
65+
66+
</EditText>
67+
68+
<Button
69+
android:id="@+id/weightOk"
70+
android:layout_width="wrap_content"
71+
android:layout_height="wrap_content"
72+
android:onClick="fakeWeight"
73+
android:text="@string/ok" />
74+
75+
</TableRow>
76+
77+
<TableRow android:layout_height="wrap_content" >
78+
79+
<TextView android:text="@string/rtBPAndPulse"
80+
android:layout_width="wrap_content"
81+
android:layout_height="wrap_content"
82+
android:layout_gravity="center_vertical"
83+
/>
84+
85+
<LinearLayout android:orientation="vertical">
86+
<EditText android:id="@+id/debugBPsystolicValue"
87+
android:text="@string/dummy_systolic"
88+
android:inputType='numberSigned'
89+
android:layout_width="wrap_content"
90+
android:layout_height="wrap_content"
91+
>
92+
</EditText>
93+
<EditText android:id="@+id/debugBPdiastolicValue"
94+
android:text="@string/dummy_diastolic"
95+
android:inputType='numberSigned'
96+
android:layout_width="wrap_content"
97+
android:layout_height="wrap_content"
98+
>
99+
</EditText>
100+
101+
<EditText android:id="@+id/debugPulseValue"
102+
android:text="@string/dummy_pulse"
103+
android:inputType='numberSigned'
104+
android:layout_width="wrap_content"
105+
android:layout_height="wrap_content" >
106+
</EditText>
107+
</LinearLayout>
108+
109+
<Button android:id="@+id/bpOk"
110+
android:text="@string/ok"
111+
android:onClick="fakeBpAndPulse"
112+
android:layout_width="wrap_content"
113+
android:layout_height="wrap_content"
114+
android:layout_gravity="center_vertical"/>
115+
116+
</TableRow>
117+
118+
<TableRow android:gravity="center_horizontal"
119+
android:layout_width="match_parent"
120+
android:layout_height="wrap_content"
121+
style="?android:attr/buttonBarStyle">
122+
123+
<Button android:text="@string/dump_readings"
124+
style="?android:attr/buttonBarButtonStyle"
125+
android:onClick="dumpReadings"/>
126+
127+
<Button android:text="@string/dump_reading_sets"
128+
style="?android:attr/buttonBarButtonStyle"
129+
android:onClick="dumpReadingSets"/>
130+
131+
</TableRow>
132+
133+
<TableRow android:gravity="center_horizontal"
134+
android:layout_width="match_parent"
135+
android:layout_height="wrap_content">
136+
137+
<Button
138+
android:layout_height="wrap_content"
139+
android:onClick="debugDone"
140+
android:text="@string/done" />
141+
142+
</TableRow>
143+
144+
</TableLayout>

0 commit comments

Comments
 (0)