diff --git a/.gradle/2.10/taskArtifacts/cache.properties b/.gradle/2.10/taskArtifacts/cache.properties
new file mode 100644
index 0000000..48d4c2e
--- /dev/null
+++ b/.gradle/2.10/taskArtifacts/cache.properties
@@ -0,0 +1 @@
+#Fri May 13 21:08:30 GMT 2016
diff --git a/.gradle/2.10/taskArtifacts/cache.properties.lock b/.gradle/2.10/taskArtifacts/cache.properties.lock
new file mode 100644
index 0000000..1e34e5c
Binary files /dev/null and b/.gradle/2.10/taskArtifacts/cache.properties.lock differ
diff --git a/.gradle/2.10/taskArtifacts/fileHashes.bin b/.gradle/2.10/taskArtifacts/fileHashes.bin
new file mode 100644
index 0000000..8d7d469
Binary files /dev/null and b/.gradle/2.10/taskArtifacts/fileHashes.bin differ
diff --git a/.gradle/2.10/taskArtifacts/fileSnapshots.bin b/.gradle/2.10/taskArtifacts/fileSnapshots.bin
new file mode 100644
index 0000000..902edfa
Binary files /dev/null and b/.gradle/2.10/taskArtifacts/fileSnapshots.bin differ
diff --git a/.gradle/2.10/taskArtifacts/outputFileStates.bin b/.gradle/2.10/taskArtifacts/outputFileStates.bin
new file mode 100644
index 0000000..ad881f9
Binary files /dev/null and b/.gradle/2.10/taskArtifacts/outputFileStates.bin differ
diff --git a/.gradle/2.10/taskArtifacts/taskArtifacts.bin b/.gradle/2.10/taskArtifacts/taskArtifacts.bin
new file mode 100644
index 0000000..f3ec2e5
Binary files /dev/null and b/.gradle/2.10/taskArtifacts/taskArtifacts.bin differ
diff --git a/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin b/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin
new file mode 100644
index 0000000..a626e83
Binary files /dev/null and b/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin differ
diff --git a/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock b/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock
new file mode 100644
index 0000000..34c2a7a
Binary files /dev/null and b/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock differ
diff --git a/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin b/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin
new file mode 100644
index 0000000..b9f9443
Binary files /dev/null and b/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin differ
diff --git a/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock b/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock
new file mode 100644
index 0000000..54476d1
Binary files /dev/null and b/.gradle/2.10/tasks/_app_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock differ
diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..e3bf9c9
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+PBeLL
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..96cc43e
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
new file mode 100644
index 0000000..e7bedf3
--- /dev/null
+++ b/.idea/copyright/profiles_settings.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000..97626ba
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
new file mode 100644
index 0000000..58992cc
--- /dev/null
+++ b/.idea/gradle.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..8d587e7
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000..3b31283
--- /dev/null
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/animated_vector_drawable_23_4_0.xml b/.idea/libraries/animated_vector_drawable_23_4_0.xml
new file mode 100644
index 0000000..ad026d7
--- /dev/null
+++ b/.idea/libraries/animated_vector_drawable_23_4_0.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/appcompat_v7_23_4_0.xml b/.idea/libraries/appcompat_v7_23_4_0.xml
new file mode 100644
index 0000000..4de1ecf
--- /dev/null
+++ b/.idea/libraries/appcompat_v7_23_4_0.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/bottom_bar_1_3_3.xml b/.idea/libraries/bottom_bar_1_3_3.xml
new file mode 100644
index 0000000..1b2d454
--- /dev/null
+++ b/.idea/libraries/bottom_bar_1_3_3.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/couchbase_lite_android_1_2_1.xml b/.idea/libraries/couchbase_lite_android_1_2_1.xml
new file mode 100644
index 0000000..2d593a1
--- /dev/null
+++ b/.idea/libraries/couchbase_lite_android_1_2_1.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/couchbase_lite_android_sqlite_default_1_2_1.xml b/.idea/libraries/couchbase_lite_android_sqlite_default_1_2_1.xml
new file mode 100644
index 0000000..3145632
--- /dev/null
+++ b/.idea/libraries/couchbase_lite_android_sqlite_default_1_2_1.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/couchbase_lite_java_core_1_2_1.xml b/.idea/libraries/couchbase_lite_java_core_1_2_1.xml
new file mode 100644
index 0000000..8355558
--- /dev/null
+++ b/.idea/libraries/couchbase_lite_java_core_1_2_1.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/design_23_4_0.xml b/.idea/libraries/design_23_4_0.xml
new file mode 100644
index 0000000..73038ae
--- /dev/null
+++ b/.idea/libraries/design_23_4_0.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/hamcrest_core_1_3.xml b/.idea/libraries/hamcrest_core_1_3.xml
new file mode 100644
index 0000000..157e3f3
--- /dev/null
+++ b/.idea/libraries/hamcrest_core_1_3.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/jackson_annotations_2_5_0.xml b/.idea/libraries/jackson_annotations_2_5_0.xml
new file mode 100644
index 0000000..27aa43c
--- /dev/null
+++ b/.idea/libraries/jackson_annotations_2_5_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/jackson_core_2_5_0.xml b/.idea/libraries/jackson_core_2_5_0.xml
new file mode 100644
index 0000000..f26c7cf
--- /dev/null
+++ b/.idea/libraries/jackson_core_2_5_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/jackson_databind_2_5_0.xml b/.idea/libraries/jackson_databind_2_5_0.xml
new file mode 100644
index 0000000..95a536a
--- /dev/null
+++ b/.idea/libraries/jackson_databind_2_5_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/junit_4_12.xml b/.idea/libraries/junit_4_12.xml
new file mode 100644
index 0000000..305df30
--- /dev/null
+++ b/.idea/libraries/junit_4_12.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/recyclerview_v7_23_4_0.xml b/.idea/libraries/recyclerview_v7_23_4_0.xml
new file mode 100644
index 0000000..2062fa4
--- /dev/null
+++ b/.idea/libraries/recyclerview_v7_23_4_0.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/stateless4j_2_4_0.xml b/.idea/libraries/stateless4j_2_4_0.xml
new file mode 100644
index 0000000..cf0fdb6
--- /dev/null
+++ b/.idea/libraries/stateless4j_2_4_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/support_annotations_23_4_0.xml b/.idea/libraries/support_annotations_23_4_0.xml
new file mode 100644
index 0000000..b1f1aca
--- /dev/null
+++ b/.idea/libraries/support_annotations_23_4_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/support_v4_23_4_0.xml b/.idea/libraries/support_v4_23_4_0.xml
new file mode 100644
index 0000000..0034d80
--- /dev/null
+++ b/.idea/libraries/support_v4_23_4_0.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/support_vector_drawable_23_4_0.xml b/.idea/libraries/support_vector_drawable_23_4_0.xml
new file mode 100644
index 0000000..85b1985
--- /dev/null
+++ b/.idea/libraries/support_vector_drawable_23_4_0.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..1a3eaff
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..6ac983e
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
new file mode 100644
index 0000000..7f68460
--- /dev/null
+++ b/.idea/runConfigurations.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..2716680
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,2795 @@
+
+
+
+
+
+
+
+
+
+ Landscape
+ @style/AppTheme.NoActionBar
+
+
+
+
+ @style/AppTheme
+
+
+
+
+ Landscape
+ @style/AppTheme
+
+
+
+
+ @android:style/Theme.Material.Light
+
+
+
+
+ @android:style/Theme.Material.Light
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1463165616546
+
+ 1463165616546
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/PBeLL.iml b/PBeLL.iml
new file mode 100644
index 0000000..c52c76a
--- /dev/null
+++ b/PBeLL.iml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.gitignore b/app/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/app/app.iml b/app/app.iml
new file mode 100644
index 0000000..1efb27d
--- /dev/null
+++ b/app/app.iml
@@ -0,0 +1,137 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ generateDebugSources
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
new file mode 100644
index 0000000..59f9b41
--- /dev/null
+++ b/app/build.gradle
@@ -0,0 +1,34 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 23
+ buildToolsVersion "23.0.3"
+
+ defaultConfig {
+ applicationId "pbell.offline.ole.org.pbell"
+ minSdkVersion 15
+ targetSdkVersion 23
+ versionCode 1
+ versionName "1.0"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+ packagingOptions {
+ exclude 'META-INF/ASL2.0'
+ exclude 'META-INF/LICENSE'
+ exclude 'META-INF/NOTICE'
+ }
+}
+
+dependencies {
+ compile fileTree(dir: 'libs', include: ['*.jar'])
+ testCompile 'junit:junit:4.12'
+ compile 'com.android.support:appcompat-v7:23.4.0'
+ compile 'com.android.support:design:23.4.0'
+ compile 'com.couchbase.lite:couchbase-lite-android:1.2.1'
+ compile 'com.roughike:bottom-bar:1.3.3'
+}
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
new file mode 100644
index 0000000..d0a202f
--- /dev/null
+++ b/app/proguard-rules.pro
@@ -0,0 +1,17 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in /Users/leonardmensah/Library/android-sdk-macosx/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
diff --git a/app/src/androidTest/java/pbell/offline/ole/org/pbell/ApplicationTest.java b/app/src/androidTest/java/pbell/offline/ole/org/pbell/ApplicationTest.java
new file mode 100644
index 0000000..8e8e6dc
--- /dev/null
+++ b/app/src/androidTest/java/pbell/offline/ole/org/pbell/ApplicationTest.java
@@ -0,0 +1,13 @@
+package pbell.offline.ole.org.pbell;
+
+import android.app.Application;
+import android.test.ApplicationTestCase;
+
+/**
+ * Testing Fundamentals
+ */
+public class ApplicationTest extends ApplicationTestCase {
+ public ApplicationTest() {
+ super(Application.class);
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..77c550f
--- /dev/null
+++ b/app/src/main/AndroidManifest.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/pbell/offline/ole/org/pbell/CustomAdapter.java b/app/src/main/java/pbell/offline/ole/org/pbell/CustomAdapter.java
new file mode 100644
index 0000000..b138f9f
--- /dev/null
+++ b/app/src/main/java/pbell/offline/ole/org/pbell/CustomAdapter.java
@@ -0,0 +1,159 @@
+package pbell.offline.ole.org.pbell;
+
+/**
+ * Created by leonardmensah on 18/05/16.
+ */
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.res.Resources;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+
+/********* Adapter class extends with BaseAdapter and implements with OnClickListener ************/
+public class CustomAdapter extends BaseAdapter implements View.OnClickListener {
+
+ /*********** Declare Used Variables *********/
+ private Activity activity;
+ private ArrayList data;
+ private static LayoutInflater inflater=null;
+ public Resources res;
+ ListModel tempValues=null;
+ int i=0;
+
+ /************* CustomAdapter Constructor *****************/
+ public CustomAdapter(Activity a, ArrayList d,Resources resLocal) {
+
+ /********** Take passed values **********/
+ activity = a;
+ data=d;
+ res = resLocal;
+
+ /*********** Layout inflator to call external xml layout () ***********/
+ inflater = ( LayoutInflater )activity.
+ getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+
+ }
+
+ /******** What is the size of Passed Arraylist Size ************/
+ public int getCount() {
+
+ if(data.size()<=0)
+ return 1;
+ return data.size();
+ }
+
+ public Object getItem(int position) {
+ return position;
+ }
+
+ public long getItemId(int position) {
+ return position;
+ }
+
+ /********* Create a holder Class to contain inflated xml file elements *********/
+ public static class ViewHolder{
+
+ public TextView text;
+ public TextView text1;
+ public TextView textWide;
+ public ImageView image;
+
+ }
+
+ /****** Depends upon data size called for each row , Create each ListView row *****/
+ public View getView(int position, View convertView, ViewGroup parent) {
+
+ View vi = convertView;
+ ViewHolder holder;
+
+ if(convertView==null){
+
+ /****** Inflate tabitem.xml file for each row ( Defined below ) *******/
+ vi = inflater.inflate(R.layout.tabitem, null);
+
+ /****** View Holder Object to contain tabitem.xml file elements ******/
+
+ holder = new ViewHolder();
+ holder.text = (TextView) vi.findViewById(R.id.text);
+ holder.text1=(TextView)vi.findViewById(R.id.text1);
+ holder.image=(ImageView)vi.findViewById(R.id.image);
+
+ /************ Set holder with LayoutInflater ************/
+ vi.setTag( holder );
+ }
+ else
+ holder=(ViewHolder)vi.getTag();
+
+ if(data.size()<=0)
+ {
+ holder.text.setText("No Data");
+
+ }
+ else
+ {
+ /***** Get each Model object from Arraylist ********/
+ tempValues=null;
+ tempValues = ( ListModel ) data.get( position );
+
+ /************ Set Model values in Holder elements ***********/
+
+ holder.text.setText( tempValues.getCompanyName() );
+ holder.text1.setText( tempValues.getUrl() );
+ holder.image.setImageResource( res.getIdentifier("com.androidexample.customlistview:drawable/"+tempValues.getImage() ,null,null));
+
+ /******** Set Item Click Listner for LayoutInflater for each row *******/
+
+ vi.setOnClickListener(new OnItemClickListener( position ));
+ }
+ return vi;
+ }
+
+ @Override
+ public void onClick(View v) {
+ Log.v("CustomAdapter", "=====Row button clicked=====");
+ }
+
+ /********* Called when Item click in ListView ************/
+ private class OnItemClickListener implements View.OnClickListener {
+ private int mPosition;
+
+ OnItemClickListener(int position){
+ mPosition = position;
+ }
+
+ @Override
+ public void onClick(View arg0) {
+
+
+ MainActivity sct = (MainActivity)activity;
+
+ /**** Call onItemClick Method inside CustomListViewAndroidExample Class ( See Below )****/
+
+ //sct.onItemClick(mPosition);
+ }
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/java/pbell/offline/ole/org/pbell/Dashboard.java b/app/src/main/java/pbell/offline/ole/org/pbell/Dashboard.java
new file mode 100644
index 0000000..05fb8dd
--- /dev/null
+++ b/app/src/main/java/pbell/offline/ole/org/pbell/Dashboard.java
@@ -0,0 +1,293 @@
+package pbell.offline.ole.org.pbell;
+
+/**
+ * Created by leonardmensah on 19/05/16.
+ */
+ import android.app.Dialog;
+ import android.content.Context;
+ import android.content.Intent;
+ import android.content.SharedPreferences;
+ import android.os.Bundle;
+ import android.support.annotation.IdRes;
+ import android.support.design.widget.TabLayout;
+ import android.support.v4.app.Fragment;
+ import android.support.v4.app.FragmentManager;
+ import android.support.v4.app.FragmentPagerAdapter;
+ import android.support.v4.app.FragmentTransaction;
+ import android.support.v4.content.ContextCompat;
+ import android.support.v4.view.ViewPager;
+ import android.support.v7.app.AppCompatActivity;
+ import android.support.v7.widget.Toolbar;
+ import android.util.Log;
+ import android.view.LayoutInflater;
+ import android.view.Menu;
+ import android.view.MenuItem;
+ import android.view.View;
+ import android.view.ViewGroup;
+ import android.widget.Button;
+ import android.widget.EditText;
+ import android.widget.TextView;
+ import android.widget.Toast;
+
+ import com.roughike.bottombar.BottomBar;
+ import com.roughike.bottombar.OnMenuTabClickListener;
+
+ import java.text.SimpleDateFormat;
+ import java.util.Calendar;
+ import java.util.Date;
+
+public class Dashboard extends AppCompatActivity {
+ private BottomBar mBottomBar;
+ private TextView mMessageView;
+ final Context context = this;
+ private EditText txtSuncURL = null;
+
+
+ private ViewPager mViewPager;
+ private SectionsPagerAdapter mySectionsPagerAdapter;
+ TabFragment0 tab0 = new TabFragment0();
+ TabFragment1 tab1= new TabFragment1();
+ TabFragment2 tab2= new TabFragment2();
+ TabFragment3 tab3= new TabFragment3();
+
+ public static final String PREFS_NAME = "MyPrefsFile";
+ SharedPreferences settings;
+ String sys_oldSyncServerURL,sys_username,sys_lastSyncDate= "";
+
+
+ FragmentManager fragMgr = getSupportFragmentManager();
+ FragmentTransaction fragTrans = fragMgr.beginTransaction();
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_dashboard);
+
+ Toolbar toolbar = (Toolbar) findViewById(R.id.mytoolbar);
+ setSupportActionBar(toolbar);
+
+ // Restore preferences
+ settings = getSharedPreferences(PREFS_NAME, 0);
+ sys_username = settings.getString("pf_username","");
+ sys_oldSyncServerURL = settings.getString("pf_sysncUrl","");
+ sys_lastSyncDate = settings.getString("pf_lastSyncDate","");
+
+
+ TextView lbldate = (TextView) findViewById(R.id.lblDate);
+
+ Calendar cal= Calendar.getInstance();
+ Date d = new Date();
+
+
+ SimpleDateFormat s_df = new SimpleDateFormat("EEEE");
+ String dayOfTheWeek = s_df.format(d);
+
+ SimpleDateFormat date_df = new SimpleDateFormat("d");
+ String dayNumber = date_df.format(d);
+
+ SimpleDateFormat month_df = new SimpleDateFormat("MMMM");
+ String month_name = month_df.format(cal.getTime());
+
+ SimpleDateFormat year_df = new SimpleDateFormat("yyyy");
+ String year = year_df.format(d);
+
+ String displayedDate = dayOfTheWeek + " | "+dayNumber+" " + month_name+" "+year;
+
+ lbldate.setText(displayedDate);
+
+
+
+ mySectionsPagerAdapter = new SectionsPagerAdapter(fragMgr);
+
+ mViewPager = (ViewPager) findViewById(R.id.container);
+ mViewPager.setAdapter(mySectionsPagerAdapter);
+
+
+ mBottomBar = BottomBar.attach(this, savedInstanceState);
+
+ mBottomBar.setItemsFromMenu(R.menu.bottombar_menu, new OnMenuTabClickListener() {
+ @Override
+ public void onMenuTabSelected(@IdRes int menuItemId) {
+ /// mMessageView.setText(getMessage(menuItemId, false));
+ }
+
+ @Override
+ public void onMenuTabReSelected(@IdRes int menuItemId) {
+
+ Toast.makeText(getApplicationContext(), getMessage(menuItemId, true), Toast.LENGTH_SHORT).show();
+ }
+ });
+
+ // Setting colors for different tabs when there's more than three of them.
+ // You can set colors for tabs in three different ways as shown below.
+ mBottomBar.mapColorForTab(0, ContextCompat.getColor(this, R.color.colorAccent));
+ mBottomBar.mapColorForTab(1, 0xFF5D4037);
+ mBottomBar.mapColorForTab(2, "#7B1FA2");
+ mBottomBar.mapColorForTab(3, "#FF5252");
+
+ }
+
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu; this adds items to the action bar if it is present.
+ getMenuInflater().inflate(R.menu.menu_main, menu);
+ return true;
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ // Handle action bar item clicks here. The action bar will
+ // automatically handle clicks on the Home/Up button, so long
+ // as you specify a parent activity in AndroidManifest.xml.
+ int id = item.getItemId();
+
+ //noinspection SimplifiableIfStatement
+ if (id == R.id.action_syncserverUrl) {
+ SyncDialog(sys_oldSyncServerURL);
+ return true;
+ }else if (id == R.id.action_syncNow) {
+ Intent syncdeviceIntent = new Intent(this,SyncDevice.class);
+ ///intent.putExtra(EXTRA_MESSAGE, message);
+ startActivity(syncdeviceIntent);
+ return true;
+ }else if (id == R.id.action_about) {
+ return true;
+ }else if (id == R.id.action_help) {
+ return true;
+ }else if (id == R.id.action_profile) {
+ return true;
+ }
+
+ return super.onOptionsItemSelected(item);
+ }
+
+
+
+ private String getMessage(int menuItemId, boolean isReselection) {
+ String message = "Content for ";
+
+ switch (menuItemId) {
+ case R.id.bb_menu_friends:
+ mViewPager.setCurrentItem(0);
+ //message += "friends";
+ break;
+ case R.id.bb_menu_favorites:
+ mViewPager.setCurrentItem(2);
+ /// message += "favorites";
+ break;
+ case R.id.bb_menu_recents:
+ mViewPager.setCurrentItem(1);
+ ///message += "recents";
+ break;
+ case R.id.bb_menu_food:
+ mViewPager.setCurrentItem(3);
+ //message += "food";
+ break;
+ }
+
+ if (isReselection) {
+ message += " WAS RESELECTED! YAY!";
+ }
+
+ return message;
+ }
+
+ @Override
+ protected void onSaveInstanceState(Bundle outState) {
+ super.onSaveInstanceState(outState);
+
+ // Necessary to restore the BottomBar's state, otherwise we would
+ // lose the current tab on orientation change.
+ mBottomBar.onSaveInstanceState(outState);
+ }
+
+
+ public class SectionsPagerAdapter extends FragmentPagerAdapter {
+
+ public SectionsPagerAdapter(FragmentManager fm) {
+
+ super(fm);
+ }
+
+ @Override
+ public Fragment getItem(int position) {
+
+ switch (position) {
+ case 0:
+ return tab0;
+ case 1:
+ return tab1;
+ case 2:
+ return tab2;
+ case 3:
+ return tab3;
+ default:
+ return null;
+ }
+ }
+
+ @Override
+ public int getCount() {
+ // Show 3 total pages.
+ return 4;
+ }
+
+ }
+
+ public static class PlaceholderFragment extends Fragment {
+ /**
+ * The fragment argument representing the section number for this
+ * fragment.
+ */
+ private static final String ARG_SECTION_NUMBER = "section_number";
+
+ /**
+ * Returns a new instance of this fragment for the given section
+ * number.
+ */
+ public static PlaceholderFragment newInstance(int sectionNumber) {
+ PlaceholderFragment fragment = new PlaceholderFragment();
+ Bundle args = new Bundle();
+ args.putInt(ARG_SECTION_NUMBER, sectionNumber);
+ fragment.setArguments(args);
+ return fragment;
+ }
+
+ public PlaceholderFragment() {
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ View rootView = inflater.inflate(R.layout.fragment_main, container, false);
+ return rootView;
+ }
+ }
+ public void SyncDialog(String oldSyncURL){
+ // custom dialog
+ final Dialog dialog = new Dialog(context);
+ dialog.setContentView(R.layout.syncurl_dialog);
+ dialog.setTitle("Synchronization Server Url");
+
+ txtSuncURL = (EditText)dialog.findViewById(R.id.txtsyncURL);
+ txtSuncURL.setText(oldSyncURL);
+ Button dialogButton = (Button) dialog.findViewById(R.id.btnSaveSyncURL);
+ dialogButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ sys_oldSyncServerURL = txtSuncURL.getText().toString();
+ SharedPreferences.Editor editor = settings.edit();
+ editor.putString("pf_sysncUrl", sys_oldSyncServerURL);
+ editor.commit();
+
+ dialog.dismiss();
+ }
+ });
+
+ dialog.show();
+
+ }
+
+ }
+
diff --git a/app/src/main/java/pbell/offline/ole/org/pbell/ListModel.java b/app/src/main/java/pbell/offline/ole/org/pbell/ListModel.java
new file mode 100644
index 0000000..beb4ee1
--- /dev/null
+++ b/app/src/main/java/pbell/offline/ole/org/pbell/ListModel.java
@@ -0,0 +1,45 @@
+package pbell.offline.ole.org.pbell;
+
+/**
+ * Created by leonardmensah on 18/05/16.
+ */
+public class ListModel {
+
+ private String CompanyName="";
+ private String Image="";
+ private String Url="";
+
+ /*********** Set Methods ******************/
+
+ public void setCompanyName(String CompanyName)
+ {
+ this.CompanyName = CompanyName;
+ }
+
+ public void setImage(String Image)
+ {
+ this.Image = Image;
+ }
+
+ public void setUrl(String Url)
+ {
+ this.Url = Url;
+ }
+
+ /*********** Get Methods ****************/
+
+ public String getCompanyName()
+ {
+ return this.CompanyName;
+ }
+
+ public String getImage()
+ {
+ return this.Image;
+ }
+
+ public String getUrl()
+ {
+ return this.Url;
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/pbell/offline/ole/org/pbell/LoginActivity.java b/app/src/main/java/pbell/offline/ole/org/pbell/LoginActivity.java
new file mode 100644
index 0000000..2d3d71d
--- /dev/null
+++ b/app/src/main/java/pbell/offline/ole/org/pbell/LoginActivity.java
@@ -0,0 +1,383 @@
+package pbell.offline.ole.org.pbell;
+
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
+import android.annotation.TargetApi;
+import android.app.Activity;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.pm.PackageManager;
+import android.support.annotation.NonNull;
+import android.support.design.widget.Snackbar;
+import android.support.v7.app.AppCompatActivity;
+import android.app.LoaderManager.LoaderCallbacks;
+
+import android.content.CursorLoader;
+import android.content.Loader;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.AsyncTask;
+
+import android.os.Build;
+import android.os.Bundle;
+import android.provider.ContactsContract;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.inputmethod.EditorInfo;
+import android.widget.ArrayAdapter;
+import android.widget.AutoCompleteTextView;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static android.Manifest.permission.READ_CONTACTS;
+
+/**
+ * A login screen that offers login via email/password.
+ */
+public class LoginActivity extends AppCompatActivity implements LoaderCallbacks {
+
+ /**
+ * Id to identity READ_CONTACTS permission request.
+ */
+ private static final int REQUEST_READ_CONTACTS = 0;
+ public static final String PREFS_NAME = "MyPrefsFile";
+ SharedPreferences settings;
+
+ /**
+ * A dummy authentication store containing known user names and passwords.
+ * TODO: remove after connecting to a real authentication system.
+ */
+ private static final String[] DUMMY_CREDENTIALS = new String[]{
+ "foo@example.com:hello", "bar@example.com:world"
+ };
+ /**
+ * Keep track of the login task to ensure we can cancel it if requested.
+ */
+ private UserLoginTask mAuthTask = null;
+
+ // UI references.
+ private AutoCompleteTextView mUsername;
+ private EditText mPasswordView;
+ private View mProgressView;
+ private View mLoginFormView;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_login);
+
+
+ // Set up the login form.
+ mUsername = (AutoCompleteTextView) findViewById(R.id.username);
+ populateAutoComplete();
+
+ mPasswordView = (EditText) findViewById(R.id.password);
+ mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+ @Override
+ public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) {
+ if (id == R.id.login || id == EditorInfo.IME_NULL) {
+ attemptLogin();
+ return true;
+ }
+ return false;
+ }
+ });
+
+ Button mEmailSignInButton = (Button) findViewById(R.id.email_sign_in_button);
+ mEmailSignInButton.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ attemptLogin();
+ }
+ });
+
+ mLoginFormView = findViewById(R.id.login_form);
+ mProgressView = findViewById(R.id.login_progress);
+
+ // Restore preferences
+ settings = getSharedPreferences(PREFS_NAME, 0);
+ String username = settings.getString("pf_username","");
+ if(username!=""){
+ mUsername.setText(username);
+ }else{
+ mUsername.setText("");
+ }
+ }
+
+ private void populateAutoComplete() {
+ if (!mayRequestContacts()) {
+ return;
+ }
+
+ getLoaderManager().initLoader(0, null, this);
+ }
+
+ private boolean mayRequestContacts() {
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
+ return true;
+ }
+ if (checkSelfPermission(READ_CONTACTS) == PackageManager.PERMISSION_GRANTED) {
+ return true;
+ }
+ if (shouldShowRequestPermissionRationale(READ_CONTACTS)) {
+ Snackbar.make(mUsername, R.string.permission_rationale, Snackbar.LENGTH_INDEFINITE)
+ .setAction(android.R.string.ok, new View.OnClickListener() {
+ @Override
+ @TargetApi(Build.VERSION_CODES.M)
+ public void onClick(View v) {
+ requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS);
+ }
+ });
+ } else {
+ requestPermissions(new String[]{READ_CONTACTS}, REQUEST_READ_CONTACTS);
+ }
+ return false;
+ }
+
+ /**
+ * Callback received when a permissions request has been completed.
+ */
+ @Override
+ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
+ @NonNull int[] grantResults) {
+ if (requestCode == REQUEST_READ_CONTACTS) {
+ if (grantResults.length == 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
+ populateAutoComplete();
+ }
+ }
+ }
+
+
+ /**
+ * Attempts to sign in or register the account specified by the login form.
+ * If there are form errors (invalid email, missing fields, etc.), the
+ * errors are presented and no actual login attempt is made.
+ */
+ private void attemptLogin() {
+ if (mAuthTask != null) {
+ return;
+ }
+
+ // Reset errors.
+ mUsername.setError(null);
+ mPasswordView.setError(null);
+
+ // Store values at the time of the login attempt.
+ String email = mUsername.getText().toString();
+ String password = mPasswordView.getText().toString();
+
+ boolean cancel = false;
+ View focusView = null;
+
+ // Check for a valid password, if the user entered one.
+ if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {
+ mPasswordView.setError(getString(R.string.error_invalid_password));
+ focusView = mPasswordView;
+ cancel = true;
+ }
+
+ // Check for a valid email address.
+ if (TextUtils.isEmpty(email)) {
+ mUsername.setError(getString(R.string.error_field_required));
+ focusView = mUsername;
+ cancel = true;
+ }
+
+ if (cancel) {
+ // There was an error; don't attempt login and focus the first
+ // form field with an error.
+ focusView.requestFocus();
+ } else {
+ // Show a progress spinner, and kick off a background task to
+ // perform the user login attempt.
+ showProgress(true);
+ mAuthTask = new UserLoginTask(email, password);
+ mAuthTask.execute((Void) null);
+ }
+ }
+
+ private boolean isEmailValid(String email) {
+ //TODO: Replace this with your own logic
+ return email.contains("@");
+ }
+
+ private boolean isPasswordValid(String password) {
+ //TODO: Replace this with your own logic
+ return password.length() > 4;
+ }
+
+ /**
+ * Shows the progress UI and hides the login form.
+ */
+ @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)
+ private void showProgress(final boolean show) {
+ // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow
+ // for very easy animations. If available, use these APIs to fade-in
+ // the progress spinner.
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
+ int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime);
+
+ mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
+ mLoginFormView.animate().setDuration(shortAnimTime).alpha(
+ show ? 0 : 1).setListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
+ }
+ });
+
+ mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
+ mProgressView.animate().setDuration(shortAnimTime).alpha(
+ show ? 1 : 0).setListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
+ }
+ });
+ } else {
+ // The ViewPropertyAnimator APIs are not available, so simply show
+ // and hide the relevant UI components.
+ mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
+ mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
+ }
+ }
+
+ @Override
+ public Loader onCreateLoader(int i, Bundle bundle) {
+ return new CursorLoader(this,
+ // Retrieve data rows for the device user's 'profile' contact.
+ Uri.withAppendedPath(ContactsContract.Profile.CONTENT_URI,
+ ContactsContract.Contacts.Data.CONTENT_DIRECTORY), ProfileQuery.PROJECTION,
+
+ // Select only email addresses.
+ ContactsContract.Contacts.Data.MIMETYPE +
+ " = ?", new String[]{ContactsContract.CommonDataKinds.Email
+ .CONTENT_ITEM_TYPE},
+
+ // Show primary email addresses first. Note that there won't be
+ // a primary email address if the user hasn't specified one.
+ ContactsContract.Contacts.Data.IS_PRIMARY + " DESC");
+ }
+
+ @Override
+ public void onLoadFinished(Loader cursorLoader, Cursor cursor) {
+ List emails = new ArrayList<>();
+ cursor.moveToFirst();
+ while (!cursor.isAfterLast()) {
+ emails.add(cursor.getString(ProfileQuery.ADDRESS));
+ cursor.moveToNext();
+ }
+
+ addEmailsToAutoComplete(emails);
+ }
+
+ @Override
+ public void onLoaderReset(Loader cursorLoader) {
+
+ }
+
+ private void addEmailsToAutoComplete(List emailAddressCollection) {
+ //Create adapter to tell the AutoCompleteTextView what to show in its dropdown list.
+ ArrayAdapter adapter =
+ new ArrayAdapter<>(LoginActivity.this,
+ android.R.layout.simple_dropdown_item_1line, emailAddressCollection);
+
+ mUsername.setAdapter(adapter);
+ }
+
+
+ private interface ProfileQuery {
+ String[] PROJECTION = {
+ ContactsContract.CommonDataKinds.Email.ADDRESS,
+ ContactsContract.CommonDataKinds.Email.IS_PRIMARY,
+ };
+
+ int ADDRESS = 0;
+ int IS_PRIMARY = 1;
+ }
+
+ public void openDashboard(){
+ SharedPreferences.Editor editor = settings.edit();
+ editor.putString("pf_username", mUsername.getText().toString());
+ editor.commit();
+
+ ////Log.v("myLoginTag"," NEW NEW "+settings.getString("pf_username",""));
+
+ Intent intent = new Intent(this,Dashboard.class);
+ ///intent.putExtra(EXTRA_MESSAGE, message);
+ startActivity(intent);
+ }
+
+ /**
+ * Represents an asynchronous login/registration task used to authenticate
+ * the user.
+ */
+ public class UserLoginTask extends AsyncTask {
+
+ private final String mEmail;
+ private final String mPassword;
+
+ UserLoginTask(String email, String password) {
+ mEmail = email;
+ mPassword = password;
+ }
+
+ @Override
+ protected Boolean doInBackground(Void... params) {
+ // TODO: attempt authentication against a network service.
+
+ try {
+ // Simulate network access.
+ Thread.sleep(1000);
+ openDashboard();
+ return true;
+
+ } catch (Exception e) {
+ Log.v("myLoginTag","Login Error "+e.getLocalizedMessage());
+ return false;
+ }
+
+ /*for (String credential : DUMMY_CREDENTIALS) {
+
+
+ String[] pieces = credential.split(":");
+ if (pieces[0].equals(mEmail)) {
+ // Account exists, return true if the password matches.
+ return pieces[1].equals(mPassword);
+ }
+ }
+ */
+
+ // TODO: register the new account here.
+ //return false;
+ }
+
+ @Override
+ protected void onPostExecute(final Boolean success) {
+ mAuthTask = null;
+ showProgress(false);
+
+ if (success) {
+ finish();
+ } else {
+ mPasswordView.setError(getString(R.string.error_incorrect_password));
+ mPasswordView.requestFocus();
+ }
+ }
+
+ @Override
+ protected void onCancelled() {
+ mAuthTask = null;
+ showProgress(false);
+ }
+ }
+}
+
diff --git a/app/src/main/java/pbell/offline/ole/org/pbell/MainActivity.java b/app/src/main/java/pbell/offline/ole/org/pbell/MainActivity.java
new file mode 100644
index 0000000..e4fd8af
--- /dev/null
+++ b/app/src/main/java/pbell/offline/ole/org/pbell/MainActivity.java
@@ -0,0 +1,184 @@
+package pbell.offline.ole.org.pbell;
+
+import android.support.design.widget.TabLayout;
+import android.support.design.widget.FloatingActionButton;
+import android.support.design.widget.Snackbar;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.Toolbar;
+
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentManager;
+import android.support.v4.app.FragmentPagerAdapter;
+import android.support.v4.view.ViewPager;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
+
+import android.widget.ListView;
+import android.widget.TextView;
+
+public class MainActivity extends AppCompatActivity {
+
+ /**
+ * The {@link android.support.v4.view.PagerAdapter} that will provide
+ * fragments for each of the sections. We use a
+ * {@link FragmentPagerAdapter} derivative, which will keep every
+ * loaded fragment in memory. If this becomes too memory intensive, it
+ * may be best to switch to a
+ * {@link android.support.v4.app.FragmentStatePagerAdapter}.
+ */
+ private SectionsPagerAdapter mSectionsPagerAdapter;
+ private ListView libraryList;
+
+ /**
+ * The {@link ViewPager} that will host the section contents.
+ */
+ private ViewPager mViewPager;
+ TabFragment1 tab1= new TabFragment1();
+ TabFragment2 tab2= new TabFragment2();
+ TabFragment3 tab3= new TabFragment3();
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_main);
+
+ Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
+ setSupportActionBar(toolbar);
+ // Create the adapter that will return a fragment for each of the three
+ // primary sections of the activity.
+ mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
+
+ // Set up the ViewPager with the sections adapter.
+ mViewPager = (ViewPager) findViewById(R.id.container);
+ mViewPager.setAdapter(mSectionsPagerAdapter);
+
+ TabLayout tabLayout = (TabLayout) findViewById(R.id.tabs);
+ tabLayout.setupWithViewPager(mViewPager);
+
+
+ /*FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
+ fab.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
+ .setAction("Action", null).show();
+ }
+ });*/
+
+ }
+
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ // Inflate the menu; this adds items to the action bar if it is present.
+ getMenuInflater().inflate(R.menu.menu_main, menu);
+ return true;
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ // Handle action bar item clicks here. The action bar will
+ // automatically handle clicks on the Home/Up button, so long
+ // as you specify a parent activity in AndroidManifest.xml.
+ int id = item.getItemId();
+
+ //noinspection SimplifiableIfStatement
+ if (id == R.id.action_syncserverUrl) {
+ return true;
+ }else if (id == R.id.action_about) {
+ return true;
+ }else if (id == R.id.action_help) {
+ return true;
+ }else if (id == R.id.action_profile) {
+ return true;
+ }
+
+ return super.onOptionsItemSelected(item);
+ }
+
+
+
+
+ /**
+ * A {@link FragmentPagerAdapter} that returns a fragment corresponding to
+ * one of the sections/tabs/pages.
+ */
+ public class SectionsPagerAdapter extends FragmentPagerAdapter {
+
+ public SectionsPagerAdapter(FragmentManager fm) {
+
+ super(fm);
+ }
+
+ @Override
+ public Fragment getItem(int position) {
+
+ switch (position) {
+ case 0:
+ return tab1;
+ case 1:
+ return tab2;
+ case 2:
+ return tab3;
+ default:
+ return null;
+ }
+ }
+
+ @Override
+ public int getCount() {
+ // Show 3 total pages.
+ return 3;
+ }
+
+ @Override
+ public CharSequence getPageTitle(int position) {
+ switch (position) {
+ case 0:
+ return "Library";
+ case 1:
+ return "Courses Progress";
+ case 2:
+ return "Meetups";
+ }
+ return null;
+ }
+ }
+
+ /**
+ * A placeholder fragment containing a simple view.
+ */
+ public static class PlaceholderFragment extends Fragment {
+ /**
+ * The fragment argument representing the section number for this
+ * fragment.
+ */
+ private static final String ARG_SECTION_NUMBER = "section_number";
+
+ /**
+ * Returns a new instance of this fragment for the given section
+ * number.
+ */
+ public static PlaceholderFragment newInstance(int sectionNumber) {
+ PlaceholderFragment fragment = new PlaceholderFragment();
+ Bundle args = new Bundle();
+ args.putInt(ARG_SECTION_NUMBER, sectionNumber);
+ fragment.setArguments(args);
+ return fragment;
+ }
+
+ public PlaceholderFragment() {
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ View rootView = inflater.inflate(R.layout.fragment_main, container, false);
+ return rootView;
+ }
+ }
+}
diff --git a/app/src/main/java/pbell/offline/ole/org/pbell/MyLibraryArrayAdapter.java b/app/src/main/java/pbell/offline/ole/org/pbell/MyLibraryArrayAdapter.java
new file mode 100644
index 0000000..d933298
--- /dev/null
+++ b/app/src/main/java/pbell/offline/ole/org/pbell/MyLibraryArrayAdapter.java
@@ -0,0 +1,122 @@
+package pbell.offline.ole.org.pbell;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.support.v7.widget.RecyclerView;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.ImageView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+import static android.widget.Toast.*;
+
+/**
+ * Created by leonardmensah on 17/05/16.
+ */
+public class MyLibraryArrayAdapter extends ArrayAdapter {
+ private final Context context;
+ ///private final String[] values;
+ private ArrayList data;
+ //Datahelper dh;
+
+ public TextView text;
+ public TextView text1;
+ public TextView textWide;
+ public ImageView image;
+ public Map map;
+
+
+ ListModel tempValues=null;
+ int i=0;
+
+ public MyLibraryArrayAdapter(Context context, int textViewResourceId, ArrayList d) {
+ super(context, textViewResourceId, d);
+ this.context = context;
+ //this.values = values;
+ this.data=d;
+ map = new HashMap();
+ map.put("image1", R.drawable.image1);
+ map.put("image2", R.drawable.image2);
+ map.put("image3", R.drawable.image3);
+ map.put("image4", R.drawable.image4);
+ // dh = new DataHelper(getApplicationContext());
+ }
+
+ @Override
+ public View getView(final int position, final View convertView, ViewGroup parent) {
+ LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+ View vi = convertView;
+ CustomAdapter.ViewHolder holder;
+
+ if(convertView==null){
+ holder = new CustomAdapter.ViewHolder();
+ vi = inflater.inflate(R.layout.tabitem, null);
+
+ ///View rowView = inflater.inflate(R.layout.tabitem, parent, false);
+ text = (TextView) vi.findViewById(R.id.text);
+ text1 = (TextView) vi.findViewById(R.id.text1);
+ image = (ImageView) vi.findViewById(R.id.image);
+ }
+ else
+ holder=(CustomAdapter.ViewHolder)vi.getTag();
+
+ if(data.size()<=0)
+ {
+ text.setText("No Data");
+
+ }
+ else
+ {
+
+ tempValues=null;
+ tempValues = ( ListModel ) data.get( position );
+
+ /************ Set Model values in Holder elements ***********/
+
+ text.setText( tempValues.getCompanyName() );
+ text1.setText( tempValues.getUrl() );
+ image.setImageResource(map.get("image3"));
+
+
+
+
+
+ ///image.setImageResource( Resources.getSystem().getIdentifier("pbell.offline.ole.org.pbell:drawable/"+tempValues.getImage() ,null,null));
+ /*
+
+ vi.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Toast.makeText(getContext(), v.getId() + " this is my =)", Toast.LENGTH_LONG).show();
+ }
+ });
+
+ */
+ ///vi.setOnClickListener(new OnItemClickListener( position ));
+
+
+ /// holder.image.setImageResource( res.getIdentifier("com.androidexample.customlistview:drawable/"+tempValues.getImage() ,null,null));
+
+ /******** Set Item Click Listner for LayoutInflater for each row *******/
+
+ ////vi.setOnClickListener(new AdapterView.OnItemClickListener( position ));
+
+
+
+
+
+ }
+
+
+ return vi;
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/pbell/offline/ole/org/pbell/PagerAdapter.java b/app/src/main/java/pbell/offline/ole/org/pbell/PagerAdapter.java
new file mode 100644
index 0000000..e353835
--- /dev/null
+++ b/app/src/main/java/pbell/offline/ole/org/pbell/PagerAdapter.java
@@ -0,0 +1,40 @@
+package pbell.offline.ole.org.pbell;
+
+/**
+ * Created by leonardmensah on 17/05/16.
+ */
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentManager;
+import android.support.v4.app.FragmentStatePagerAdapter;
+
+public class PagerAdapter extends FragmentStatePagerAdapter {
+ int mNumOfTabs;
+
+ public PagerAdapter(FragmentManager fm, int NumOfTabs) {
+ super(fm);
+ this.mNumOfTabs = NumOfTabs;
+ }
+
+ @Override
+ public Fragment getItem(int position) {
+
+ switch (position) {
+ case 0:
+ TabFragment1 tab1 = new TabFragment1();
+ return tab1;
+ case 1:
+ TabFragment2 tab2 = new TabFragment2();
+ return tab2;
+ case 2:
+ TabFragment3 tab3 = new TabFragment3();
+ return tab3;
+ default:
+ return null;
+ }
+ }
+
+ @Override
+ public int getCount() {
+ return mNumOfTabs;
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/pbell/offline/ole/org/pbell/SyncDevice.java b/app/src/main/java/pbell/offline/ole/org/pbell/SyncDevice.java
new file mode 100644
index 0000000..d6aeddb
--- /dev/null
+++ b/app/src/main/java/pbell/offline/ole/org/pbell/SyncDevice.java
@@ -0,0 +1,231 @@
+package pbell.offline.ole.org.pbell;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.net.ConnectivityManager;
+import android.net.NetworkInfo;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.support.design.widget.FloatingActionButton;
+import android.support.design.widget.Snackbar;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.widget.Toolbar;
+import android.util.Log;
+import android.view.View;
+import android.widget.Button;
+import android.widget.CompoundButton;
+import android.widget.Switch;
+import android.widget.TextView;
+
+import com.couchbase.lite.Database;
+import com.couchbase.lite.Manager;
+import com.couchbase.lite.android.AndroidContext;
+import com.couchbase.lite.auth.Authenticator;
+import com.couchbase.lite.auth.BasicAuthenticator;
+import com.couchbase.lite.replicator.Replication;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLConnection;
+
+public class SyncDevice extends AppCompatActivity {
+
+ public static final String PREFS_NAME = "MyPrefsFile";
+ SharedPreferences settings;
+ String sys_oldSyncServerURL,sys_username,sys_lastSyncDate= "";
+ View clcview;
+ FloatingActionButton fab;
+ Boolean wipeClearn =false;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_sync_device);
+ Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
+ setSupportActionBar(toolbar);
+
+ // Restore preferences
+ settings = getSharedPreferences(PREFS_NAME, 0);
+ sys_username = settings.getString("pf_username","");
+ sys_oldSyncServerURL = settings.getString("pf_sysncUrl","");
+ sys_lastSyncDate = settings.getString("pf_lastSyncDate","");
+
+ TextView lblSyncURL = (TextView)findViewById(R.id.lblSyncSyncUrl);
+ lblSyncURL.setText(sys_oldSyncServerURL);
+
+ TextView lblLastSyncDate = (TextView)findViewById(R.id.lblLastDateSync);
+ lblLastSyncDate.setText(sys_lastSyncDate);
+
+ Button btnStartSync = (Button)findViewById(R.id.btnstartSync);
+ btnStartSync.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ couchbaseInitDatabese();
+ }
+
+ });
+
+ Switch sw_wipeClean = (Switch) findViewById(R.id.swWipeClean);
+ sw_wipeClean.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+ wipeClearn = isChecked;
+ ///Log.v("Switch State=", ""+isChecked);
+ }
+ });
+
+
+ fab = (FloatingActionButton) findViewById(R.id.checkConnection);
+ fab.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ clcview = view;
+ try {
+ if (checkConnectionURL()) {
+ fab.setVisibility(View.INVISIBLE);
+ Snackbar.make(clcview, "Checking connection to "+sys_oldSyncServerURL +".... please wait", Snackbar.LENGTH_INDEFINITE)
+ .setAction("Action", null).show();
+ new TryDownloadTask().execute(sys_oldSyncServerURL);
+
+ } else {
+
+ }
+ }catch(Exception e) {
+ Log.v("myErrorTag","Error "+e.getLocalizedMessage());
+
+ }
+ }
+ });
+ getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+ }
+
+
+ private boolean checkConnectionURL() {
+ ConnectivityManager connMgr = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
+ NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
+ if (networkInfo != null && networkInfo.isConnected()) {
+ Log.v("myErrorTag","Network Connected");
+ return true;
+ // fetch data
+ } else {
+
+ Log.v("myErrorTag","Network Not Connected");
+ return false;
+ }
+
+ }
+ private class TryDownloadTask extends AsyncTask {
+ @Override
+ protected String doInBackground(String... urls) {
+
+ // params comes from the execute() call: params[0] is the url.
+ InputStream is = null;
+ int response=0;
+ try {
+ URL url = new URL(sys_oldSyncServerURL);
+ HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+ conn.setReadTimeout(5000 /* milliseconds */);
+ conn.setConnectTimeout(10000 /* milliseconds */);
+ conn.setRequestMethod("GET");
+ conn.setDoInput(true);
+ // Starts the query
+ conn.connect();
+ response = conn.getResponseCode();
+ Log.d("Responce", "The response is: " + response);
+ is = conn.getInputStream();
+ return "";
+ }catch (Exception err) {
+
+ }finally
+ {
+ if(response!=200){
+ displayDownMesage(false);
+ }else{
+ displayDownMesage(true);
+ }
+ if (is != null) {
+ try {
+ is.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ return "";
+ }
+ }
+ // onPostExecute displays the results of the AsyncTask.
+ @Override
+ protected void onPostExecute(String result) {
+ /// textView.setText(result);
+ }
+ }
+ public void displayDownMesage(boolean status){
+ if(status){
+ Snackbar.make(clcview, "Connection to established successful", Snackbar.LENGTH_LONG)
+ .setAction("Action", null).show();
+ }else{
+ Snackbar.make(clcview, "Sorry , server was unreachable, check url and device connection", Snackbar.LENGTH_LONG)
+ .setAction("Action", null).show();
+ }
+ }
+
+ public void couchbaseInitDatabese(){
+ try {
+ Manager manager = new Manager(new AndroidContext(this), Manager.DEFAULT_OPTIONS);
+ if(wipeClearn){
+ Database db = manager.getExistingDatabase("members");
+ db.delete();
+ }
+
+ Database db = manager.getDatabase("members");
+ URL url = new URL(sys_oldSyncServerURL+"/"+"members");
+ Replication push = db.createPushReplication(url);
+ Replication pull = db.createPullReplication(url);
+ pull.setContinuous(false);
+ push.setContinuous(false);
+ push.addChangeListener(new Replication.ChangeListener() {
+ @Override
+ public void changed(Replication.ChangeEvent event) {
+ Log.e("MyCouch", ""+event.getChangeCount());
+ }
+ });
+ pull.addChangeListener(new Replication.ChangeListener() {
+ @Override
+ public void changed(Replication.ChangeEvent event) {
+ Log.e("MyCouch", ""+event.getChangeCount());
+ // will be called back when the pull replication status changes
+ }
+ });
+ push.start();
+ pull.start();
+ //this.push = push;
+ //this.pull = pull;
+ //Authenticator auth = new BasicAuthenticator(username, password);
+ //push.setAuthenticator(auth);
+ //pull.setAuthenticator(auth);
+
+ } catch (Exception e) {
+ Log.e("MyCouch", "Cannot create database", e);
+ return;
+ }
+ }
+
+ /*
+ * couchdb_members = TiTouchDB.databaseManager.getDatabase('members');
+ couchdb_membercourseprogress = TiTouchDB.databaseManager.getDatabase('membercourseprogress');
+ couchdb_meetups = TiTouchDB.databaseManager.getDatabase('meetups');
+ couchdb_usermeetups = TiTouchDB.databaseManager.getDatabase('usermeetups');
+ couchdb_assignments = TiTouchDB.databaseManager.getDatabase('assignments');
+ couchdb_calendar = TiTouchDB.databaseManager.getDatabase('calendar');
+ couchdb_groups = TiTouchDB.databaseManager.getDatabase('groups');
+ couchdb_invitations = TiTouchDB.databaseManager.getDatabase('invitations');
+ couchdb_languages = TiTouchDB.databaseManager.getDatabase('languages');
+ couchdb_shelf = TiTouchDB.databaseManager.getDatabase('shelf');
+ couchdb_requests = TiTouchDB.databaseManager.getDatabase('requests');
+ */
+}
diff --git a/app/src/main/java/pbell/offline/ole/org/pbell/TabFragment0.java b/app/src/main/java/pbell/offline/ole/org/pbell/TabFragment0.java
new file mode 100644
index 0000000..50e2ae3
--- /dev/null
+++ b/app/src/main/java/pbell/offline/ole/org/pbell/TabFragment0.java
@@ -0,0 +1,18 @@
+package pbell.offline.ole.org.pbell;
+
+/**
+ * Created by leonardmensah on 20/05/16.
+ */
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+public class TabFragment0 extends Fragment {
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+ return inflater.inflate(R.layout.tab_fragment_0, container, false);
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/pbell/offline/ole/org/pbell/TabFragment1.java b/app/src/main/java/pbell/offline/ole/org/pbell/TabFragment1.java
new file mode 100644
index 0000000..6ae7afd
--- /dev/null
+++ b/app/src/main/java/pbell/offline/ole/org/pbell/TabFragment1.java
@@ -0,0 +1,111 @@
+package pbell.offline.ole.org.pbell;
+
+/**
+ * Created by leonardmensah on 17/05/16.
+ */
+import android.content.res.Resources;
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.ListView;
+import android.widget.Toast;
+
+import java.util.ArrayList;
+
+public class TabFragment1 extends Fragment {
+ /*
+ String[] data = new String[]{
+ "Max","Nan","Another"
+ };*/
+ ListView list;
+ CustomAdapter adapter;
+ public TabFragment1 CustomListView = null;
+ public ArrayList CustomListViewValuesArr = new ArrayList();
+
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+
+ //Just Download
+ //HTML
+ //PDF.js
+ //Bell-Reader
+ //MP3
+ //Flow Video Player
+ //BeLL Video Book Player
+ //Native Video
+
+
+ //Type
+ //Textbook
+ //Lesson Plan
+ //Activities
+ //Exercises
+ //Discussion Questions
+/*
+ View rootView = inflater.inflate(R.layout.tab_fragment_1, container, false);
+ CustomListView = this;
+ setListData();
+ Resources res =getResources();
+ ListView lv = (ListView)rootView.findViewById(R.id.frg1_listView);
+
+ adapter=new CustomAdapter( getActivity(), CustomListViewValuesArr,res );
+ list.setAdapter( adapter );*/
+
+
+
+ setListData();
+
+ View rootView = inflater.inflate(R.layout.tab_fragment_1, container, false);
+ ListView lv = (ListView)rootView.findViewById(R.id.frg1_listView);
+ MyLibraryArrayAdapter adapter = new MyLibraryArrayAdapter(getActivity(), R.id.frg1_listView,CustomListViewValuesArr);
+ lv.setAdapter(adapter);
+
+ lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+ public void onItemClick(AdapterView> adapter, View v, int position, long id) {
+ Toast.makeText(getContext(), position+" Clicked Item ", Toast.LENGTH_LONG).show();
+ }
+ });
+
+
+
+ //return inflater.inflate(R.layout.tab_fragment_1, container, false);
+ return rootView;
+
+ }
+
+ /****** Function to set data in ArrayList *************/
+ public void setListData()
+ {
+
+ for (int i = 0; i < 8; i++) {
+
+ final ListModel sched = new ListModel();
+
+ /******* Firstly take data in model object ******/
+ sched.setCompanyName("Resource Title : "+i);
+ ///sched.setImage("image"+i);
+ sched.setImage("image"+(i+1)+"");
+ sched.setUrl("Resource Type : "+i+"");
+
+ /******** Take Model Object in ArrayList **********/
+ CustomListViewValuesArr.add( sched );
+ }
+
+ }
+
+
+ /***************** This function used by adapter ****************/
+ public void onItemClick(int mPosition)
+ {
+ ListModel tempValues = ( ListModel ) CustomListViewValuesArr.get(mPosition);
+
+
+ // SHOW ALERT
+
+ // Toast.makeText(CustomListView,""+tempValues.getCompanyName()+" Image:"+tempValues.getImage() +" Url:"+tempValues.getUrl(), Toast.LENGTH_LONG).show();
+ }
+}
diff --git a/app/src/main/java/pbell/offline/ole/org/pbell/TabFragment2.java b/app/src/main/java/pbell/offline/ole/org/pbell/TabFragment2.java
new file mode 100644
index 0000000..9a4e8cf
--- /dev/null
+++ b/app/src/main/java/pbell/offline/ole/org/pbell/TabFragment2.java
@@ -0,0 +1,18 @@
+package pbell.offline.ole.org.pbell;
+
+/**
+ * Created by leonardmensah on 17/05/16.
+ */
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+public class TabFragment2 extends Fragment {
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+ return inflater.inflate(R.layout.tab_fragment_2, container, false);
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/pbell/offline/ole/org/pbell/TabFragment3.java b/app/src/main/java/pbell/offline/ole/org/pbell/TabFragment3.java
new file mode 100644
index 0000000..d6aed68
--- /dev/null
+++ b/app/src/main/java/pbell/offline/ole/org/pbell/TabFragment3.java
@@ -0,0 +1,18 @@
+package pbell.offline.ole.org.pbell;
+
+/**
+ * Created by leonardmensah on 17/05/16.
+ */
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+public class TabFragment3 extends Fragment {
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+ return inflater.inflate(R.layout.tab_fragment_3, container, false);
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/res/drawable-hdpi/ic_favorites.png b/app/src/main/res/drawable-hdpi/ic_favorites.png
new file mode 100755
index 0000000..7b5cccc
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_favorites.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_friends.png b/app/src/main/res/drawable-hdpi/ic_friends.png
new file mode 100755
index 0000000..94aadf8
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_friends.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_nearby.png b/app/src/main/res/drawable-hdpi/ic_nearby.png
new file mode 100755
index 0000000..4384331
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_nearby.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_recents.png b/app/src/main/res/drawable-hdpi/ic_recents.png
new file mode 100755
index 0000000..2c33ab4
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_recents.png differ
diff --git a/app/src/main/res/drawable-hdpi/ic_restaurants.png b/app/src/main/res/drawable-hdpi/ic_restaurants.png
new file mode 100755
index 0000000..12335f8
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_restaurants.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_favorites.png b/app/src/main/res/drawable-mdpi/ic_favorites.png
new file mode 100755
index 0000000..79361bf
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_favorites.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_friends.png b/app/src/main/res/drawable-mdpi/ic_friends.png
new file mode 100755
index 0000000..1a29987
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_friends.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_nearby.png b/app/src/main/res/drawable-mdpi/ic_nearby.png
new file mode 100755
index 0000000..46221eb
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_nearby.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_recents.png b/app/src/main/res/drawable-mdpi/ic_recents.png
new file mode 100755
index 0000000..e982a91
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_recents.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_restaurants.png b/app/src/main/res/drawable-mdpi/ic_restaurants.png
new file mode 100755
index 0000000..4c47da1
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_restaurants.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_favorites.png b/app/src/main/res/drawable-xhdpi/ic_favorites.png
new file mode 100755
index 0000000..9f71219
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_favorites.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_friends.png b/app/src/main/res/drawable-xhdpi/ic_friends.png
new file mode 100755
index 0000000..e6821b3
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_friends.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_nearby.png b/app/src/main/res/drawable-xhdpi/ic_nearby.png
new file mode 100755
index 0000000..84ef9db
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_nearby.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_recents.png b/app/src/main/res/drawable-xhdpi/ic_recents.png
new file mode 100755
index 0000000..19ab935
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_recents.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_restaurants.png b/app/src/main/res/drawable-xhdpi/ic_restaurants.png
new file mode 100755
index 0000000..f5f669f
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_restaurants.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_favorites.png b/app/src/main/res/drawable-xxhdpi/ic_favorites.png
new file mode 100755
index 0000000..2ea82c6
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_favorites.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_friends.png b/app/src/main/res/drawable-xxhdpi/ic_friends.png
new file mode 100755
index 0000000..82a40b2
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_friends.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_nearby.png b/app/src/main/res/drawable-xxhdpi/ic_nearby.png
new file mode 100755
index 0000000..1d9f190
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_nearby.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_recents.png b/app/src/main/res/drawable-xxhdpi/ic_recents.png
new file mode 100755
index 0000000..cff145b
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_recents.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_restaurants.png b/app/src/main/res/drawable-xxhdpi/ic_restaurants.png
new file mode 100755
index 0000000..51e526b
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_restaurants.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_favorites.png b/app/src/main/res/drawable-xxxhdpi/ic_favorites.png
new file mode 100755
index 0000000..bb88340
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_favorites.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_friends.png b/app/src/main/res/drawable-xxxhdpi/ic_friends.png
new file mode 100755
index 0000000..ada25e4
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_friends.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_nearby.png b/app/src/main/res/drawable-xxxhdpi/ic_nearby.png
new file mode 100755
index 0000000..adf77f0
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_nearby.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_recents.png b/app/src/main/res/drawable-xxxhdpi/ic_recents.png
new file mode 100755
index 0000000..f188fce
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_recents.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_restaurants.png b/app/src/main/res/drawable-xxxhdpi/ic_restaurants.png
new file mode 100755
index 0000000..d79ea38
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_restaurants.png differ
diff --git a/app/src/main/res/drawable/ic_favorites.png b/app/src/main/res/drawable/ic_favorites.png
new file mode 100644
index 0000000..bb88340
Binary files /dev/null and b/app/src/main/res/drawable/ic_favorites.png differ
diff --git a/app/src/main/res/drawable/ic_friends.png b/app/src/main/res/drawable/ic_friends.png
new file mode 100644
index 0000000..ada25e4
Binary files /dev/null and b/app/src/main/res/drawable/ic_friends.png differ
diff --git a/app/src/main/res/drawable/ic_recents.png b/app/src/main/res/drawable/ic_recents.png
new file mode 100644
index 0000000..f188fce
Binary files /dev/null and b/app/src/main/res/drawable/ic_recents.png differ
diff --git a/app/src/main/res/drawable/image1.png b/app/src/main/res/drawable/image1.png
new file mode 100644
index 0000000..95208bf
Binary files /dev/null and b/app/src/main/res/drawable/image1.png differ
diff --git a/app/src/main/res/drawable/image2.png b/app/src/main/res/drawable/image2.png
new file mode 100644
index 0000000..6bec7d4
Binary files /dev/null and b/app/src/main/res/drawable/image2.png differ
diff --git a/app/src/main/res/drawable/image3.png b/app/src/main/res/drawable/image3.png
new file mode 100644
index 0000000..41dd526
Binary files /dev/null and b/app/src/main/res/drawable/image3.png differ
diff --git a/app/src/main/res/drawable/image4.png b/app/src/main/res/drawable/image4.png
new file mode 100644
index 0000000..67bff58
Binary files /dev/null and b/app/src/main/res/drawable/image4.png differ
diff --git a/app/src/main/res/drawable/trophy.jpg b/app/src/main/res/drawable/trophy.jpg
new file mode 100644
index 0000000..2a0615d
Binary files /dev/null and b/app/src/main/res/drawable/trophy.jpg differ
diff --git a/app/src/main/res/layout/activity_dashboard.xml b/app/src/main/res/layout/activity_dashboard.xml
new file mode 100644
index 0000000..10d1838
--- /dev/null
+++ b/app/src/main/res/layout/activity_dashboard.xml
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml
new file mode 100644
index 0000000..4c0b9af
--- /dev/null
+++ b/app/src/main/res/layout/activity_login.xml
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..211a63b
--- /dev/null
+++ b/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_sync_device.xml b/app/src/main/res/layout/activity_sync_device.xml
new file mode 100644
index 0000000..56774a3
--- /dev/null
+++ b/app/src/main/res/layout/activity_sync_device.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/content_sync_device.xml b/app/src/main/res/layout/content_sync_device.xml
new file mode 100644
index 0000000..29d0708
--- /dev/null
+++ b/app/src/main/res/layout/content_sync_device.xml
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/fragment_main.xml b/app/src/main/res/layout/fragment_main.xml
new file mode 100644
index 0000000..2ea4852
--- /dev/null
+++ b/app/src/main/res/layout/fragment_main.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
diff --git a/app/src/main/res/layout/list_library_resources.xml b/app/src/main/res/layout/list_library_resources.xml
new file mode 100644
index 0000000..e3ccb42
--- /dev/null
+++ b/app/src/main/res/layout/list_library_resources.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
diff --git a/app/src/main/res/layout/syncurl_dialog.xml b/app/src/main/res/layout/syncurl_dialog.xml
new file mode 100644
index 0000000..93739fa
--- /dev/null
+++ b/app/src/main/res/layout/syncurl_dialog.xml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/tab_fragment_0.xml b/app/src/main/res/layout/tab_fragment_0.xml
new file mode 100644
index 0000000..606e4ac
--- /dev/null
+++ b/app/src/main/res/layout/tab_fragment_0.xml
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/tab_fragment_1.xml b/app/src/main/res/layout/tab_fragment_1.xml
new file mode 100644
index 0000000..63c34a6
--- /dev/null
+++ b/app/src/main/res/layout/tab_fragment_1.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/tab_fragment_2.xml b/app/src/main/res/layout/tab_fragment_2.xml
new file mode 100644
index 0000000..a7d74b4
--- /dev/null
+++ b/app/src/main/res/layout/tab_fragment_2.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/tab_fragment_3.xml b/app/src/main/res/layout/tab_fragment_3.xml
new file mode 100644
index 0000000..350cdca
--- /dev/null
+++ b/app/src/main/res/layout/tab_fragment_3.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/tabitem.xml b/app/src/main/res/layout/tabitem.xml
new file mode 100644
index 0000000..2b304ae
--- /dev/null
+++ b/app/src/main/res/layout/tabitem.xml
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/menu/bottombar_menu.xml b/app/src/main/res/menu/bottombar_menu.xml
new file mode 100644
index 0000000..0e7c0f4
--- /dev/null
+++ b/app/src/main/res/menu/bottombar_menu.xml
@@ -0,0 +1,20 @@
+
+
\ No newline at end of file
diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml
new file mode 100644
index 0000000..6530f59
--- /dev/null
+++ b/app/src/main/res/menu/menu_main.xml
@@ -0,0 +1,25 @@
+
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..cde69bc
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..c133a0c
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..bfa42f0
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..324e72c
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..aee44e1
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/values-ur/strings.xml b/app/src/main/res/values-ur/strings.xml
new file mode 100644
index 0000000..50aea8d
--- /dev/null
+++ b/app/src/main/res/values-ur/strings.xml
@@ -0,0 +1,35 @@
+
+
+ OLE PBeLL
+ کے بارے میں
+ مدد
+ پروفائل
+ ترتیبات
+ میں سائن ان کریں یا رجسٹر کریں
+ داخلہ
+ مطابقت پذیری ڈیوائس
+ مطابقت پذیری سرور لنک
+ کامیابیاں
+ کورسز پیش رفت
+ ملتے
+ میری لائبریری
+ اس کو پر کرنا ضروری ہے
+ یہ پاس ورڈ غلط ہے
+ یہ ای میل ایڈریس درست نہیں ہے
+ یہ پاس ورڈ کافی چھوٹا ہے
+ آخری آمد کی تاریخ
+ پڑھیے وسائل
+ دوروں کی تعداد
+ "رابطے کی اجازتیں ای میل تکمیلات فراہم کرنے کے لئے کی ضرورت ہے . "
+ پاس ورڈ ( اختیاری)
+ صارف کا نام
+ سیکشن سے ہیلو ورلڈ:%1$d
+ مطابقت پذیری سرور لنک
+ تبدیلیاں محفوظ کرو
+ سرور کے ساتھ ہم آہنگ کریں ڈیوائس
+ آخری مطابقت پذیری کی تاریخ
+ مطابقت پذیری کے عمل کا آغاز
+ داخلہ
+ مطابقت پذیری ڈیوائس
+ ٹرافی
+
\ No newline at end of file
diff --git a/app/src/main/res/values-v21/styles.xml b/app/src/main/res/values-v21/styles.xml
new file mode 100644
index 0000000..dbbdd40
--- /dev/null
+++ b/app/src/main/res/values-v21/styles.xml
@@ -0,0 +1,9 @@
+
+
+
+
diff --git a/app/src/main/res/values-w820dp/dimens.xml b/app/src/main/res/values-w820dp/dimens.xml
new file mode 100644
index 0000000..63fc816
--- /dev/null
+++ b/app/src/main/res/values-w820dp/dimens.xml
@@ -0,0 +1,6 @@
+
+
+ 64dp
+
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..6641156
--- /dev/null
+++ b/app/src/main/res/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #3F51B5
+ #303f9f
+ #FF4081
+
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..ec27e86
--- /dev/null
+++ b/app/src/main/res/values/dimens.xml
@@ -0,0 +1,8 @@
+
+
+ 16dp
+ 16dp
+ 16dp
+ 8dp
+ 36dp
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..55fdb73
--- /dev/null
+++ b/app/src/main/res/values/strings.xml
@@ -0,0 +1,47 @@
+
+ OLE PBeLL
+ Sync Server Url
+ Sync Device
+ Settings
+ Profile
+ Help
+ About
+ Hello World from section: %1$d
+ Sign in
+
+
+ Achievements
+ My Library
+ Courses Progress
+ Meetups
+
+
+ Number Of Visits
+ Last Visit Date
+ Read Resources
+
+
+ Sync server url
+ Save changes
+
+
+
+ Last sync date
+ Synchronize device with server
+ Start sync process
+ Wipe Clean
+
+
+ Username
+ Password (optional)
+ Sign in or register
+ Sign in
+ This email address is invalid
+ This password is too short
+ This password is incorrect
+ This field is required
+ "Contacts permissions are needed for providing email completions."
+
+ Trophy
+ Sync Device
+
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..545b9c6
--- /dev/null
+++ b/app/src/main/res/values/styles.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/test/java/pbell/offline/ole/org/pbell/ExampleUnitTest.java b/app/src/test/java/pbell/offline/ole/org/pbell/ExampleUnitTest.java
new file mode 100644
index 0000000..80853b2
--- /dev/null
+++ b/app/src/test/java/pbell/offline/ole/org/pbell/ExampleUnitTest.java
@@ -0,0 +1,15 @@
+package pbell.offline.ole.org.pbell;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * To work on unit tests, switch the Test Artifact in the Build Variants view.
+ */
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() throws Exception {
+ assertEquals(4, 2 + 2);
+ }
+}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..03bced9
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,23 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:2.1.0'
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ jcenter()
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/build/generated/mockable-android-23.jar b/build/generated/mockable-android-23.jar
new file mode 100644
index 0000000..55a168b
Binary files /dev/null and b/build/generated/mockable-android-23.jar differ
diff --git a/build/intermediates/dex-cache/cache.xml b/build/intermediates/dex-cache/cache.xml
new file mode 100644
index 0000000..fba8db8
--- /dev/null
+++ b/build/intermediates/dex-cache/cache.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..1d3591c
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,18 @@
+# Project-wide Gradle settings.
+
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+# Default value: -Xmx10248m -XX:MaxPermSize=256m
+# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
+
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..05ef575
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..c25cec5
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Wed Oct 21 11:34:03 PDT 2015
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000..9d82f78
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,160 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..aec9973
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/local.properties b/local.properties
new file mode 100644
index 0000000..c4341bb
--- /dev/null
+++ b/local.properties
@@ -0,0 +1,10 @@
+## This file is automatically generated by Android Studio.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file should *NOT* be checked into Version Control Systems,
+# as it contains information specific to your local configuration.
+#
+# Location of the SDK. This is only used by Gradle.
+# For customization when using a Version Control System, please read the
+# header note.
+sdk.dir=/Users/leonardmensah/Library/android-sdk-macosx
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..e7b4def
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1 @@
+include ':app'