Skip to content

Commit f11b962

Browse files
Merge pull request #1 from chimdi2000/malaria-setup-screen
Malaria app Updated and initial PR #1.
2 parents 23046e4 + 912d6af commit f11b962

File tree

89 files changed

+1964
-32
lines changed

Some content is hidden

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

89 files changed

+1964
-32
lines changed

.settings/org.eclipse.jdt.core.prefs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
3+
org.eclipse.jdt.core.compiler.compliance=1.6
4+
org.eclipse.jdt.core.compiler.source=1.6

AndroidManifest.xml

+43-3
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,67 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.hackforchange.malariaapp"
3+
package="com.example.viewpagertest"
4+
android:installLocation="internalOnly"
45
android:versionCode="1"
56
android:versionName="1.0" >
67

78
<uses-sdk
89
android:minSdkVersion="11"
9-
android:targetSdkVersion="18" />
10+
android:targetSdkVersion="19" />
11+
12+
<uses-permission android:name="android.permission.VIBRATE" />
13+
<uses-permission android:name="android.permission.WAKE_LOCK" />
14+
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
15+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
1016

1117
<application
1218
android:allowBackup="true"
1319
android:icon="@drawable/ic_launcher"
1420
android:label="@string/app_name"
1521
android:theme="@style/AppTheme" >
22+
<service android:name="com.peacecorps.malaria.AlarmService" >
23+
</service>
24+
25+
<receiver android:name="com.peacecorps.malaria.AlarmAutoStart" >
26+
<intent-filter>
27+
<action android:name="android.intent.action.BOOT_COMPLETED" >
28+
</action>
29+
</intent-filter>
30+
</receiver>
31+
<receiver
32+
android:name="com.peacecorps.malaria.AlarmHandlerClass"
33+
android:exported="true" >
34+
<intent-filter>
35+
<action android:name="com.example.viewpagertest.START_ALARM" />
36+
37+
</intent-filter>
38+
</receiver>
39+
1640
<activity
17-
android:name="com.hackforchange.malariaapp.WelcomeActivity"
41+
android:name="com.peacecorps.malaria.UserMedicineSettingsFragment"
1842
android:label="@string/app_name" >
1943
<intent-filter>
2044
<action android:name="android.intent.action.MAIN" />
2145

2246
<category android:name="android.intent.category.LAUNCHER" />
2347
</intent-filter>
2448
</activity>
49+
<activity
50+
android:name="com.peacecorps.malaria.MainActivity"
51+
android:label="@string/app_name" >
52+
</activity>
53+
<activity
54+
android:name="com.peacecorps.malaria.AlertCallerFragmentActivity"
55+
android:label="@string/app_name" >
56+
<intent-filter>
57+
<action android:name="com.example.viewpagertest.demoActivity" >
58+
</action>
59+
</intent-filter>
60+
</activity>
61+
<activity
62+
android:name="com.peacecorps.malaria.AlertDialogFragment"
63+
android:label="@string/app_name" >
64+
</activity>
2565
</application>
2666

2767
</manifest>

README.md

+5
742 KB
476 KB
765 KB
765 KB

Screenshot_of_progress/screenshot.jpg

382 KB

ant.properties

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This file is used to override default values used by the Ant build system.
2+
#
3+
# This file must be checked into Version Control Systems, as it is
4+
# integral to the build system of your project.
5+
6+
# This file is only used by the Ant script.
7+
8+
# You can use this to override default values such as
9+
# 'source.dir' for the location of your java source folder and
10+
# 'out.dir' for the location of your output folder.
11+
12+
# You can also use it define how the release builds are signed by declaring
13+
# the following properties:
14+
# 'key.store' for the location of your keystore and
15+
# 'key.alias' for the name of the key to use.
16+
# The password will be asked during the build when you use the 'release' target.
17+

build.xml

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project name="myapp9" 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+
<property file="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+
<!-- if sdk.dir was not set from one of the property file, then
32+
get it from the ANDROID_HOME env var.
33+
This must be done before we load project.properties since
34+
the proguard config can use sdk.dir -->
35+
<property environment="env"/>
36+
<condition property="sdk.dir" value="${env.ANDROID_HOME}">
37+
<isset property="env.ANDROID_HOME"/>
38+
</condition>
39+
40+
<!-- The project.properties file is created and updated by the 'android'
41+
tool, as well as ADT.
42+
43+
This contains project specific properties such as project target, and library
44+
dependencies. Lower level build properties are stored in ant.properties
45+
(or in .classpath for Eclipse projects).
46+
47+
This file is an integral part of the build system for your
48+
application and should be checked into Version Control Systems. -->
49+
<loadproperties srcFile="project.properties"/>
50+
51+
<!-- quick check on sdk.dir -->
52+
<fail
53+
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."
54+
unless="sdk.dir"
55+
/>
56+
57+
<!--
58+
Import per project custom build rules if present at the root of the project.
59+
This is the place to put custom intermediary targets such as:
60+
-pre-build
61+
-pre-compile
62+
-post-compile (This is typically used for code obfuscation.
63+
Compiled code location: ${out.classes.absolute.dir}
64+
If this is not done in place, override ${out.dex.input.absolute.dir})
65+
-post-package
66+
-post-build
67+
-pre-clean
68+
-->
69+
<import file="custom_rules.xml" optional="true"/>
70+
71+
<!-- Import the actual build file.
72+
73+
To customize existing targets, there are two options:
74+
- Customize only one target:
75+
- copy/paste the target into this file, *before* the
76+
<import> task.
77+
- customize it to your needs.
78+
- Customize the whole content of build.xml
79+
- copy/paste the content of the rules files (minus the top node)
80+
into this file, replacing the <import> task.
81+
- customize to your needs.
82+
83+
***********************
84+
****** IMPORTANT ******
85+
***********************
86+
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
87+
in order to avoid having your file be overridden by tools such as "android update project"
88+
-->
89+
<!-- version-tag: 1 -->
90+
<import file="${sdk.dir}/tools/ant/build.xml"/>
91+
92+
</project>

ic_launcher-web.png

50.2 KB

lint.xml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<lint>
3+
</lint>

project.properties

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@
1111
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
1212

1313
# Project target.
14-
target=android-19
14+
target=android-16
15+
android.library.reference.1=..\\appcompat_v7_3
16+
android.library.reference.2=../ViewPagerIndicator

res/drawable-hdpi/bg.png

32.5 KB

res/drawable-hdpi/pc_logo.png

50.6 KB

res/drawable-ldpi/bg.png

7.21 KB

res/drawable-ldpi/ic_launcher.png

2.67 KB

res/drawable-ldpi/pc_logo.png

15.3 KB

res/drawable-mdpi/bg.png

16.2 KB
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
4+
android:shape="rectangle">
5+
6+
<corners android:radius="10dp"
7+
8+
/>
9+
10+
<padding android:left="5dp"
11+
android:right="5dp"
12+
android:bottom="5dp"/>
13+
14+
<stroke android:color="#592b15"
15+
16+
android:width="2dp"/>
17+
18+
<solid android:color="@android:color/transparent"/>
19+
20+
21+
22+
23+
</shape>

res/drawable-mdpi/pc_logo.png

28.9 KB

res/drawable-xhdpi/bg.png

54.8 KB

res/drawable-xhdpi/pc_logo.png

74.7 KB

res/drawable-xxhdpi/bg.png

118 KB

res/drawable-xxhdpi/pc_logo.png

202 KB

res/drawable/accept_medi_checked_.png

4.3 KB
4.33 KB

res/drawable/accept_medi_normal.png

4.29 KB

res/drawable/background.png

271 KB

res/drawable/bus_icon_normal.png

731 Bytes
3.94 KB

res/drawable/drug_normal.png

5.95 KB
704 Bytes

res/drawable/home_icon_normal.png

632 Bytes

res/drawable/icon.png

990 Bytes
565 Bytes

res/drawable/info_hub_normal.png

529 Bytes
4.7 KB
4.21 KB
5.96 KB
581 Bytes

res/drawable/reject_medi_checked.png

3.89 KB
4.19 KB

res/drawable/reject_medi_normal.png

4.05 KB

res/drawable/settings_large.png

817 Bytes

res/drawable/settings_normal.png

532 Bytes

res/layout/activity_main.xml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:app="http://schemas.android.com/apk/res-auto"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
android:layout_gravity="center"
6+
android:background="@drawable/background"
7+
android:orientation="vertical" >
8+
9+
<android.support.v4.view.ViewPager
10+
android:id="@+id/vPager"
11+
android:layout_width="match_parent"
12+
android:layout_height="0dp"
13+
android:layout_weight="1" />
14+
15+
<com.viewpagerindicator.CirclePageIndicator
16+
android:id="@+id/vIndicator"
17+
android:layout_width="match_parent"
18+
android:layout_height="wrap_content"
19+
android:padding="10dip"
20+
android:textColor="@color/view_pager_indicator_text_color"
21+
app:footerIndicatorHeight="3dp"
22+
app:footerIndicatorStyle="underline"
23+
app:footerLineHeight="1dp"
24+
app:selectedBold="true"
25+
app:selectedColor="@color/white" />
26+
27+
<View
28+
android:layout_width="200dp"
29+
android:layout_height="0.5dp"
30+
android:layout_gravity="center_horizontal"
31+
android:background="@color/black" />
32+
33+
<LinearLayout
34+
android:layout_width="wrap_content"
35+
android:layout_height="wrap_content"
36+
android:layout_gravity="center_horizontal"
37+
android:layout_marginTop="30dp"
38+
android:orientation="horizontal"
39+
android:paddingBottom="5dp" >
40+
41+
<Button
42+
android:layout_width="30dp"
43+
android:layout_height="30dp"
44+
android:layout_marginRight="15dp"
45+
android:adjustViewBounds="true"
46+
android:background="@drawable/home_icon_normal"
47+
android:scaleType="fitCenter" />
48+
49+
<Button
50+
android:layout_width="30dp"
51+
android:layout_height="30dp"
52+
android:layout_marginLeft="15dp"
53+
android:adjustViewBounds="true"
54+
android:background="@drawable/info_hub_inactive_normal"
55+
android:scaleType="fitCenter" />
56+
</LinearLayout>
57+
58+
</LinearLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
android:layout_gravity="center"
6+
android:background="@drawable/background"
7+
android:orientation="vertical"
8+
android:padding="2dp" >
9+
10+
<Button
11+
android:layout_width="24dp"
12+
android:layout_height="24dp"
13+
android:layout_gravity="end"
14+
android:layout_margin="5dp"
15+
android:adjustViewBounds="true"
16+
android:background="@drawable/settings_normal"
17+
android:scaleType="fitCenter" />
18+
19+
<LinearLayout
20+
android:layout_width="wrap_content"
21+
android:layout_height="wrap_content"
22+
android:layout_gravity="left"
23+
android:orientation="horizontal"
24+
android:padding="5dp" >
25+
26+
<ImageView
27+
android:layout_width="wrap_content"
28+
android:layout_height="wrap_content"
29+
android:adjustViewBounds="true"
30+
android:background="@drawable/medication_last_normal"
31+
android:scaleType="fitCenter" />
32+
33+
<TextView
34+
android:layout_width="wrap_content"
35+
android:layout_height="wrap_content"
36+
android:layout_gravity="center_vertical"
37+
android:paddingLeft="10dp"
38+
android:text="@string/first_analytic_screen_medicine_last_taken_text"
39+
android:textSize="20sp"
40+
android:textStyle="bold" />
41+
</LinearLayout>
42+
43+
<LinearLayout
44+
android:layout_width="wrap_content"
45+
android:layout_height="wrap_content"
46+
android:layout_gravity="left"
47+
android:orientation="horizontal"
48+
android:padding="5dp" >
49+
50+
<ImageView
51+
android:layout_width="wrap_content"
52+
android:layout_height="wrap_content"
53+
android:adjustViewBounds="true"
54+
android:background="@drawable/doses_missing_image_normal"
55+
android:scaleType="fitCenter" />
56+
57+
<TextView
58+
android:layout_width="wrap_content"
59+
android:layout_height="wrap_content"
60+
android:layout_gravity="center_vertical"
61+
android:paddingLeft="10dp"
62+
android:text="@string/first_analytic_screen_doses_missing_text"
63+
android:textSize="20sp"
64+
android:textStyle="bold" />
65+
</LinearLayout>
66+
67+
<LinearLayout
68+
android:layout_width="wrap_content"
69+
android:layout_height="wrap_content"
70+
android:layout_gravity="left"
71+
android:orientation="horizontal"
72+
android:padding="5dp" >
73+
74+
<ImageView
75+
android:layout_width="wrap_content"
76+
android:layout_height="wrap_content"
77+
android:adjustViewBounds="true"
78+
android:background="@drawable/medicine_adhere_normal"
79+
android:scaleType="fitCenter" />
80+
81+
<TextView
82+
android:layout_width="wrap_content"
83+
android:layout_height="wrap_content"
84+
android:layout_gravity="center_vertical"
85+
android:paddingLeft="10dp"
86+
android:text="@string/first_analytic_screen_medicine_adherence_to_medicine_text"
87+
android:textSize="20sp"
88+
android:textStyle="bold" />
89+
</LinearLayout>
90+
91+
</LinearLayout>

0 commit comments

Comments
 (0)