DT @17.12.2015: Sehr viele Design-Changes.. ProfileActivityFragments ebenfalls übearbeitet
68
app/app.iml
@@ -71,38 +71,25 @@
|
|||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/debug" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/debug" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.1/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.1/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/22.2.0/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/23.1.1/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/mediarouter-v7/22.2.0/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.1.1/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/22.2.1/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.1/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.beardedhen/androidbootstrap/2.0.1/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.beardedhen/androidbootstrap/2.0.1/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.facebook.android/facebook-android-sdk/4.1.0/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.facebook.android/facebook-android-sdk/4.1.0/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-ads/8.3.0/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-ads/8.3.0/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-analytics/8.3.0/jars" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-appindexing/8.3.0/jars" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-appinvite/8.3.0/jars" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-appstate/8.3.0/jars" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-auth/8.3.0/jars" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-base/8.3.0/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-base/8.3.0/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-basement/8.3.0/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-basement/8.3.0/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-cast/8.3.0/jars" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-drive/8.3.0/jars" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-fitness/8.3.0/jars" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-games/8.3.0/jars" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-gcm/8.3.0/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-gcm/8.3.0/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-identity/8.3.0/jars" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-location/8.3.0/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-location/8.3.0/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-maps/8.3.0/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-maps/8.3.0/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-measurement/8.3.0/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-measurement/8.3.0/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-nearby/8.3.0/jars" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-panorama/8.3.0/jars" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-plus/8.3.0/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-plus/8.3.0/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-safetynet/8.3.0/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.maps.android/android-maps-utils/0.4/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-vision/8.3.0/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.mikepenz/google-material-typeface/2.1.0.1.original/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-wallet/8.3.0/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.mikepenz/iconics-core/2.5.1/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-wearable/8.3.0/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.mikepenz/materialdrawer/4.5.8/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services/8.3.0/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.mikepenz/materialize/0.5.1/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.maps.android/android-maps-utils/0.3.4/jars" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.twitter.sdk.android/twitter-core/1.4.1/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.twitter.sdk.android/twitter-core/1.4.1/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/io.fabric.sdk.android/fabric/1.3.4/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/io.fabric.sdk.android/fabric/1.3.4/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
|
||||||
@@ -115,46 +102,33 @@
|
|||||||
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
|
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
|
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="library" exported="" name="design-22.2.0" level="project" />
|
<orderEntry type="library" exported="" name="design-23.1.1" level="project" />
|
||||||
<orderEntry type="library" exported="" name="play-services-ads-8.3.0" level="project" />
|
<orderEntry type="library" exported="" name="play-services-ads-8.3.0" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="materialize-0.5.1" level="project" />
|
||||||
<orderEntry type="library" exported="" name="play-services-measurement-8.3.0" level="project" />
|
<orderEntry type="library" exported="" name="play-services-measurement-8.3.0" level="project" />
|
||||||
<orderEntry type="library" exported="" name="play-services-fitness-8.3.0" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="play-services-games-8.3.0" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="androidbootstrap-2.0.1" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="play-services-vision-8.3.0" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="retrofit-1.6.1" level="project" />
|
<orderEntry type="library" exported="" name="retrofit-1.6.1" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="androidbootstrap-2.0.1" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="appcompat-v7-23.1.1" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="materialdrawer-4.5.8" level="project" />
|
||||||
<orderEntry type="library" exported="" name="library-1.0.19" level="project" />
|
<orderEntry type="library" exported="" name="library-1.0.19" level="project" />
|
||||||
<orderEntry type="library" exported="" name="play-services-base-8.3.0" level="project" />
|
<orderEntry type="library" exported="" name="play-services-base-8.3.0" level="project" />
|
||||||
<orderEntry type="library" exported="" name="play-services-appindexing-8.3.0" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="play-services-auth-8.3.0" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="play-services-drive-8.3.0" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="play-services-identity-8.3.0" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="fabric-1.3.4" level="project" />
|
<orderEntry type="library" exported="" name="fabric-1.3.4" level="project" />
|
||||||
<orderEntry type="library" exported="" name="play-services-appstate-8.3.0" level="project" />
|
<orderEntry type="library" exported="" name="android-maps-utils-0.4" level="project" />
|
||||||
<orderEntry type="library" exported="" name="support-annotations-23.1.1" level="project" />
|
<orderEntry type="library" exported="" name="support-annotations-23.1.1" level="project" />
|
||||||
<orderEntry type="library" exported="" name="play-services-location-8.3.0" level="project" />
|
<orderEntry type="library" exported="" name="play-services-location-8.3.0" level="project" />
|
||||||
<orderEntry type="library" exported="" name="play-services-safetynet-8.3.0" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="twitter-core-1.4.1" level="project" />
|
<orderEntry type="library" exported="" name="twitter-core-1.4.1" level="project" />
|
||||||
<orderEntry type="library" exported="" name="mediarouter-v7-22.2.0" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="play-services-plus-8.3.0" level="project" />
|
<orderEntry type="library" exported="" name="play-services-plus-8.3.0" level="project" />
|
||||||
<orderEntry type="library" exported="" name="play-services-8.3.0" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="play-services-appinvite-8.3.0" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="play-services-cast-8.3.0" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="play-services-wearable-8.3.0" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="bolts-android-1.2.0" level="project" />
|
<orderEntry type="library" exported="" name="bolts-android-1.2.0" level="project" />
|
||||||
<orderEntry type="library" exported="" name="play-services-maps-8.3.0" level="project" />
|
<orderEntry type="library" exported="" name="play-services-maps-8.3.0" level="project" />
|
||||||
<orderEntry type="library" exported="" name="play-services-nearby-8.3.0" level="project" />
|
<orderEntry type="library" exported="" name="google-material-typeface-2.1.0.1.original" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="recyclerview-v7-23.1.1" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="support-v4-23.1.1" level="project" />
|
||||||
<orderEntry type="library" exported="" name="facebook-android-sdk-4.1.0" level="project" />
|
<orderEntry type="library" exported="" name="facebook-android-sdk-4.1.0" level="project" />
|
||||||
<orderEntry type="library" exported="" name="play-services-panorama-8.3.0" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="support-v4-22.2.1" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="play-services-gcm-8.3.0" level="project" />
|
<orderEntry type="library" exported="" name="play-services-gcm-8.3.0" level="project" />
|
||||||
<orderEntry type="library" exported="" name="play-services-analytics-8.3.0" level="project" />
|
<orderEntry type="library" exported="" name="iconics-core-2.5.1" level="project" />
|
||||||
<orderEntry type="library" exported="" name="play-services-wallet-8.3.0" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="android-maps-utils-0.3.4" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="appcompat-v7-22.2.1" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="play-services-basement-8.3.0" level="project" />
|
|
||||||
<orderEntry type="library" exported="" name="gson-2.4" level="project" />
|
<orderEntry type="library" exported="" name="gson-2.4" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="play-services-basement-8.3.0" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
@@ -12,8 +12,8 @@ apply plugin: 'io.fabric'
|
|||||||
apply plugin: 'com.google.gms.google-services'
|
apply plugin: 'com.google.gms.google-services'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 22
|
compileSdkVersion 23
|
||||||
buildToolsVersion "22.0.1"
|
buildToolsVersion "23.0.1"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "org.deke.risk.riskahead"
|
applicationId "org.deke.risk.riskahead"
|
||||||
@@ -36,17 +36,25 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
compile fileTree(dir: 'libs', include: 'Parse-*.jar')
|
||||||
compile('com.twitter.sdk.android:twitter-core:1.4.1@aar') {
|
compile('com.twitter.sdk.android:twitter-core:1.4.1@aar') {
|
||||||
transitive = true;
|
transitive = true;
|
||||||
}
|
}
|
||||||
compile 'com.android.support:appcompat-v7:22.2.1'
|
compile 'com.android.support:appcompat-v7:23.1.1'
|
||||||
compile 'com.google.android.gms:play-services:8.3.0'
|
compile 'com.mikepenz:iconics-core:2.5.1@aar'
|
||||||
|
compile 'com.mikepenz:google-material-typeface:2.1.0.1.original@aar'
|
||||||
|
compile 'com.google.android.gms:play-services-gcm:8.3.0'
|
||||||
|
compile 'com.google.android.gms:play-services-plus:8.3.0'
|
||||||
|
compile 'com.google.android.gms:play-services-location:8.3.0'
|
||||||
|
compile 'com.google.android.gms:play-services-ads:8.3.0'
|
||||||
compile 'com.facebook.android:facebook-android-sdk:4.1.0'
|
compile 'com.facebook.android:facebook-android-sdk:4.1.0'
|
||||||
compile 'com.beardedhen:androidbootstrap:2.0.1'
|
compile 'com.beardedhen:androidbootstrap:2.0.1'
|
||||||
compile 'com.mcxiaoke.volley:library:1.0.+'
|
compile 'com.mcxiaoke.volley:library:1.0.19'
|
||||||
compile 'com.android.support:design:22.2.0'
|
compile 'com.android.support:design:23.1.1'
|
||||||
compile 'com.google.code.gson:gson:2.4'
|
compile 'com.google.code.gson:gson:2.4'
|
||||||
compile 'com.google.maps.android:android-maps-utils:0.3.+'
|
compile 'com.google.maps.android:android-maps-utils:0.4'
|
||||||
compile 'com.android.support:support-v4:22.2.1'
|
compile 'com.android.support:support-v4:23.1.1'
|
||||||
|
compile('com.mikepenz:materialdrawer:4.5.8@aar') {
|
||||||
|
transitive = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ import android.widget.Button;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import org.deke.risk.riskahead.fragments.FacebookButtonFragment;
|
import org.deke.risk.riskahead.fragment.FacebookButtonFragment;
|
||||||
import org.deke.risk.riskahead.fragments.GooglePlusButtonFragment;
|
import org.deke.risk.riskahead.fragment.GooglePlusButtonFragment;
|
||||||
import org.deke.risk.riskahead.fragments.TwitterButtonFragment;
|
import org.deke.risk.riskahead.fragment.TwitterButtonFragment;
|
||||||
import org.deke.risk.riskahead.helper.AppConfig;
|
import org.deke.risk.riskahead.helper.AppConfig;
|
||||||
import org.deke.risk.riskahead.helper.AppController;
|
import org.deke.risk.riskahead.helper.AppController;
|
||||||
import org.deke.risk.riskahead.helper.SessionManager;
|
import org.deke.risk.riskahead.helper.SessionManager;
|
||||||
|
|||||||
@@ -1,18 +1,23 @@
|
|||||||
package org.deke.risk.riskahead;
|
package org.deke.risk.riskahead;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.support.v4.app.FragmentManager;
|
import android.support.v4.app.FragmentManager;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import com.android.volley.Request;
|
import com.android.volley.Request;
|
||||||
import com.android.volley.Response;
|
import com.android.volley.Response;
|
||||||
import com.android.volley.VolleyError;
|
import com.android.volley.VolleyError;
|
||||||
import com.android.volley.toolbox.StringRequest;
|
import com.android.volley.toolbox.StringRequest;
|
||||||
|
import com.beardedhen.androidbootstrap.font.FontAwesome;
|
||||||
|
import com.mikepenz.google_material_typeface_library.GoogleMaterial;
|
||||||
|
import com.mikepenz.iconics.IconicsDrawable;
|
||||||
|
|
||||||
import org.deke.risk.riskahead.helper.AppConfig;
|
import org.deke.risk.riskahead.helper.AppConfig;
|
||||||
import org.deke.risk.riskahead.helper.AppController;
|
import org.deke.risk.riskahead.helper.AppController;
|
||||||
@@ -36,6 +41,9 @@ public class MainActivity extends BaseActivity{
|
|||||||
|
|
||||||
private final static int INTERVAL = 1000 * 20; //20 seconds
|
private final static int INTERVAL = 1000 * 20; //20 seconds
|
||||||
|
|
||||||
|
private Button report;
|
||||||
|
private Button map;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
@@ -46,19 +54,36 @@ public class MainActivity extends BaseActivity{
|
|||||||
|
|
||||||
fragmentManager = getSupportFragmentManager();
|
fragmentManager = getSupportFragmentManager();
|
||||||
|
|
||||||
findViewById(R.id.btn_main_report).setOnClickListener(new View.OnClickListener() {
|
report = (Button) findViewById(R.id.btn_main_report);
|
||||||
|
report.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
gotoReportActivity();
|
gotoReportActivity();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
findViewById(R.id.btn_main_viewmap).setOnClickListener(new View.OnClickListener() {
|
Drawable reportIcon = new IconicsDrawable(this)
|
||||||
|
.icon(GoogleMaterial.Icon.gmd_room)
|
||||||
|
.sizeDp(24);
|
||||||
|
|
||||||
|
report.setCompoundDrawables(reportIcon, null, null, null);
|
||||||
|
|
||||||
|
map = (Button) findViewById(R.id.btn_main_viewmap);
|
||||||
|
|
||||||
|
map.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
gotoMapActivity();
|
gotoMapActivity();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Drawable mapIcon = new IconicsDrawable(this)
|
||||||
|
.icon(GoogleMaterial.Icon.gmd_map)
|
||||||
|
.sizeDp(24);
|
||||||
|
|
||||||
|
map.setCompoundDrawables(null,null, mapIcon, null);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -82,6 +107,7 @@ public class MainActivity extends BaseActivity{
|
|||||||
@Override
|
@Override
|
||||||
protected void onResume(){
|
protected void onResume(){
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
result.setSelection(mainAvtivityID,false);
|
||||||
startRepeatingTask();
|
startRepeatingTask();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ import com.google.maps.android.clustering.Cluster;
|
|||||||
import com.google.maps.android.clustering.ClusterManager;
|
import com.google.maps.android.clustering.ClusterManager;
|
||||||
import com.google.maps.android.heatmaps.HeatmapTileProvider;
|
import com.google.maps.android.heatmaps.HeatmapTileProvider;
|
||||||
|
|
||||||
import org.deke.risk.riskahead.helper.AppClusterItem;
|
import org.deke.risk.riskahead.helper.IncidentReport;
|
||||||
import org.deke.risk.riskahead.helper.AppConfig;
|
import org.deke.risk.riskahead.helper.AppConfig;
|
||||||
import org.deke.risk.riskahead.helper.AppController;
|
import org.deke.risk.riskahead.helper.AppController;
|
||||||
import org.deke.risk.riskahead.helper.BaseActivity;
|
import org.deke.risk.riskahead.helper.BaseActivity;
|
||||||
@@ -55,7 +55,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
|
|
||||||
public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCallbacks<Cursor>,
|
public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCallbacks<Cursor>,
|
||||||
ClusterManager.OnClusterItemInfoWindowClickListener<AppClusterItem>, ClusterManager.OnClusterClickListener<AppClusterItem>, ClusterManager.OnClusterItemClickListener<AppClusterItem>{
|
ClusterManager.OnClusterItemInfoWindowClickListener<IncidentReport>, ClusterManager.OnClusterClickListener<IncidentReport>, ClusterManager.OnClusterItemClickListener<IncidentReport>{
|
||||||
|
|
||||||
private final static String mActivityTitle = "Risk Map";
|
private final static String mActivityTitle = "Risk Map";
|
||||||
private static final String TAG = MapsActivity.class.getSimpleName();
|
private static final String TAG = MapsActivity.class.getSimpleName();
|
||||||
@@ -63,12 +63,12 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
|||||||
private static GoogleMap mMap;
|
private static GoogleMap mMap;
|
||||||
private Marker mMarker;
|
private Marker mMarker;
|
||||||
|
|
||||||
private AppClusterItem clickedClusterItem;
|
private IncidentReport clickedClusterItem;
|
||||||
private ArrayList<AppClusterItem> myMarkers = new ArrayList<AppClusterItem>();
|
private ArrayList<IncidentReport> myMarkers = new ArrayList<IncidentReport>();
|
||||||
private HashMap<Integer, AppClusterItem> visibleMarkers = new HashMap<Integer, AppClusterItem>();
|
private HashMap<Integer, IncidentReport> visibleMarkers = new HashMap<Integer, IncidentReport>();
|
||||||
private List<LatLng> mHeatMapPositionList = new ArrayList<>();
|
private List<LatLng> mHeatMapPositionList = new ArrayList<>();
|
||||||
|
|
||||||
private ClusterManager<AppClusterItem> mClusterManager;
|
private ClusterManager<IncidentReport> mClusterManager;
|
||||||
|
|
||||||
TileOverlay mOverlay;
|
TileOverlay mOverlay;
|
||||||
HeatmapTileProvider mProvider;
|
HeatmapTileProvider mProvider;
|
||||||
@@ -115,6 +115,7 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
|||||||
});
|
});
|
||||||
|
|
||||||
setUpClustering();
|
setUpClustering();
|
||||||
|
result.setSelection(mapAvtivityID,false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GoogleMap.OnCameraChangeListener getCameraChangeListener()
|
public GoogleMap.OnCameraChangeListener getCameraChangeListener()
|
||||||
@@ -146,7 +147,7 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
|||||||
LatLngBounds bounds = mMap.getProjection().getVisibleRegion().latLngBounds;
|
LatLngBounds bounds = mMap.getProjection().getVisibleRegion().latLngBounds;
|
||||||
mHeatMapPositionList.clear();
|
mHeatMapPositionList.clear();
|
||||||
//Loop through all the items that are available to be placed on the map
|
//Loop through all the items that are available to be placed on the map
|
||||||
for(AppClusterItem item : myMarkers)
|
for(IncidentReport item : myMarkers)
|
||||||
{
|
{
|
||||||
//If the item is within the the bounds of the screen
|
//If the item is within the the bounds of the screen
|
||||||
if(bounds.contains(item.getPosition()))
|
if(bounds.contains(item.getPosition()))
|
||||||
@@ -184,7 +185,7 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
|||||||
|
|
||||||
|
|
||||||
private void setUpClustering() {
|
private void setUpClustering() {
|
||||||
mClusterManager = new ClusterManager<AppClusterItem>(this, mMap);
|
mClusterManager = new ClusterManager<IncidentReport>(this, mMap);
|
||||||
mMap.setOnCameraChangeListener(getCameraChangeListener());
|
mMap.setOnCameraChangeListener(getCameraChangeListener());
|
||||||
|
|
||||||
mClusterManager.setRenderer(new OwnIconRendered(MapsActivity.this,mMap,mClusterManager));
|
mClusterManager.setRenderer(new OwnIconRendered(MapsActivity.this,mMap,mClusterManager));
|
||||||
@@ -199,9 +200,9 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
|||||||
mClusterManager.setOnClusterClickListener(this);
|
mClusterManager.setOnClusterClickListener(this);
|
||||||
mClusterManager.setOnClusterItemClickListener(this);
|
mClusterManager.setOnClusterItemClickListener(this);
|
||||||
mClusterManager
|
mClusterManager
|
||||||
.setOnClusterItemClickListener(new ClusterManager.OnClusterItemClickListener<AppClusterItem>() {
|
.setOnClusterItemClickListener(new ClusterManager.OnClusterItemClickListener<IncidentReport>() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onClusterItemClick(AppClusterItem item) {
|
public boolean onClusterItemClick(IncidentReport item) {
|
||||||
clickedClusterItem = item;
|
clickedClusterItem = item;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -212,12 +213,12 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onClusterItemClick(AppClusterItem appClusterItem) {
|
public boolean onClusterItemClick(IncidentReport incidentReport) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onClusterClick(Cluster<AppClusterItem> cluster) {
|
public boolean onClusterClick(Cluster<IncidentReport> cluster) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -266,7 +267,7 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addClusterMarkers(ClusterManager<AppClusterItem> mClusterManager) {
|
private void addClusterMarkers(ClusterManager<IncidentReport> mClusterManager) {
|
||||||
|
|
||||||
String tag_string_req = "getincidentswithposition";
|
String tag_string_req = "getincidentswithposition";
|
||||||
StringRequest strReq = getStringRequestGetAllIncidentsWithPosition();
|
StringRequest strReq = getStringRequestGetAllIncidentsWithPosition();
|
||||||
@@ -429,7 +430,7 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
|||||||
JSONObject incident = incidents.getJSONObject(i);
|
JSONObject incident = incidents.getJSONObject(i);
|
||||||
LatLng pos = new LatLng(Double.parseDouble(incident.getString("latitude")),Double.parseDouble(incident.getString("longitude")));
|
LatLng pos = new LatLng(Double.parseDouble(incident.getString("latitude")),Double.parseDouble(incident.getString("longitude")));
|
||||||
|
|
||||||
myMarkers.add(new AppClusterItem(incident,pos));
|
myMarkers.add(new IncidentReport(incident,pos));
|
||||||
}
|
}
|
||||||
|
|
||||||
addHeatMap();
|
addHeatMap();
|
||||||
@@ -464,8 +465,8 @@ public class MapsActivity extends BaseActivity implements LoaderManager.LoaderCa
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClusterItemInfoWindowClick(AppClusterItem appClusterItem) {
|
public void onClusterItemInfoWindowClick(IncidentReport incidentReport) {
|
||||||
gotoViewReportActivity(appClusterItem.getID());
|
gotoViewReportActivity(incidentReport.getID());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,43 +1,17 @@
|
|||||||
package org.deke.risk.riskahead;
|
package org.deke.risk.riskahead;
|
||||||
|
|
||||||
import android.app.LocalActivityManager;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.graphics.Color;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.design.widget.TabLayout;
|
import android.support.design.widget.TabLayout;
|
||||||
import android.support.v4.view.PagerAdapter;
|
import android.support.v4.view.PagerAdapter;
|
||||||
import android.support.v4.view.ViewPager;
|
import android.support.v4.view.ViewPager;
|
||||||
import android.support.v7.widget.Toolbar;
|
|
||||||
import android.util.Log;
|
|
||||||
import android.view.MenuItem;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.TabHost;
|
|
||||||
import android.widget.TableLayout;
|
|
||||||
import android.widget.TableRow;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import com.android.volley.Request;
|
|
||||||
import com.android.volley.Response;
|
|
||||||
import com.android.volley.VolleyError;
|
|
||||||
import com.android.volley.toolbox.StringRequest;
|
|
||||||
|
|
||||||
import org.deke.risk.riskahead.helper.AppConfig;
|
|
||||||
import org.deke.risk.riskahead.helper.BaseActivity;
|
import org.deke.risk.riskahead.helper.BaseActivity;
|
||||||
import org.deke.risk.riskahead.helper.ProfilePagerAdapter;
|
import org.deke.risk.riskahead.adapter.ProfilePagerAdapter;
|
||||||
import org.json.JSONArray;
|
|
||||||
import org.json.JSONException;
|
|
||||||
import org.json.JSONObject;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class ProfileActivity extends BaseActivity{
|
public class ProfileActivity extends BaseActivity{
|
||||||
|
|
||||||
private final static String mActivityTitle = "User Statistics";
|
private final static String mActivityTitle = "User Statistics";
|
||||||
private final static String TAG = ProfileActivity.class.getSimpleName();
|
private final static String TAG = ProfileActivity.class.getSimpleName();
|
||||||
|
|
||||||
private TabHost tabs=null;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
@@ -72,6 +46,14 @@ public class ProfileActivity extends BaseActivity{
|
|||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
result.setSelection(userstatsAvtivityID, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -189,6 +189,14 @@ public class ReportActivity extends BaseActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
result.setSelection(reportAvtivityID, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ import com.beardedhen.androidbootstrap.BootstrapButton;
|
|||||||
import com.google.android.gms.maps.model.LatLng;
|
import com.google.android.gms.maps.model.LatLng;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
|
|
||||||
import org.deke.risk.riskahead.fragments.ReportWF_1_Fragment;
|
import org.deke.risk.riskahead.fragment.ReportWF_1_Fragment;
|
||||||
import org.deke.risk.riskahead.fragments.ReportWF_2_Fragment;
|
import org.deke.risk.riskahead.fragment.ReportWF_2_Fragment;
|
||||||
import org.deke.risk.riskahead.fragments.ReportWF_3_Fragment;
|
import org.deke.risk.riskahead.fragment.ReportWF_3_Fragment;
|
||||||
import org.deke.risk.riskahead.helper.AppClusterItem;
|
import org.deke.risk.riskahead.helper.IncidentReport;
|
||||||
import org.deke.risk.riskahead.helper.AppConfig;
|
import org.deke.risk.riskahead.helper.AppConfig;
|
||||||
import org.deke.risk.riskahead.helper.AppController;
|
import org.deke.risk.riskahead.helper.AppController;
|
||||||
import org.deke.risk.riskahead.helper.BaseActivity;
|
import org.deke.risk.riskahead.helper.BaseActivity;
|
||||||
@@ -51,7 +51,7 @@ public class ReportWFActivity extends BaseActivity implements ReportWF_1_Fragmen
|
|||||||
private BootstrapButton btnContinue;
|
private BootstrapButton btnContinue;
|
||||||
private BootstrapButton btnReportNow;
|
private BootstrapButton btnReportNow;
|
||||||
|
|
||||||
private AppClusterItem incident = new AppClusterItem();
|
private IncidentReport incident = new IncidentReport();
|
||||||
|
|
||||||
private int currentState = 0;
|
private int currentState = 0;
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ public class ReportWFActivity extends BaseActivity implements ReportWF_1_Fragmen
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void reportIncident(AppClusterItem incident){
|
private void reportIncident(IncidentReport incident){
|
||||||
String tag_string_req = "addincidentwithposition";
|
String tag_string_req = "addincidentwithposition";
|
||||||
StringRequest strReq = getStringRequestAddIncidentWithPosition(incident);
|
StringRequest strReq = getStringRequestAddIncidentWithPosition(incident);
|
||||||
AppController.getInstance().addToRequestQueue(strReq, tag_string_req);
|
AppController.getInstance().addToRequestQueue(strReq, tag_string_req);
|
||||||
@@ -115,11 +115,11 @@ public class ReportWFActivity extends BaseActivity implements ReportWF_1_Fragmen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public AppClusterItem getIncident(){
|
public IncidentReport getIncident(){
|
||||||
return incident;
|
return incident;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIncident(AppClusterItem newIncident){
|
public void setIncident(IncidentReport newIncident){
|
||||||
incident = newIncident;
|
incident = newIncident;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,7 +194,7 @@ public class ReportWFActivity extends BaseActivity implements ReportWF_1_Fragmen
|
|||||||
SharedPreferences mPrefs = getPreferences(MODE_PRIVATE);
|
SharedPreferences mPrefs = getPreferences(MODE_PRIVATE);
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
|
|
||||||
if(!mPrefs.getString("incident", "").equals("")) incident = gson.fromJson(mPrefs.getString("incident", ""), AppClusterItem.class);
|
if(!mPrefs.getString("incident", "").equals("")) incident = gson.fromJson(mPrefs.getString("incident", ""), IncidentReport.class);
|
||||||
|
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
String pos = intent.getStringExtra(EXTRA_MESSAGE);
|
String pos = intent.getStringExtra(EXTRA_MESSAGE);
|
||||||
@@ -202,8 +202,11 @@ public class ReportWFActivity extends BaseActivity implements ReportWF_1_Fragmen
|
|||||||
|
|
||||||
currentState = mPrefs.getInt("currentState",0);
|
currentState = mPrefs.getInt("currentState",0);
|
||||||
if(currentState != 0) initFragment(currentState);
|
if(currentState != 0) initFragment(currentState);
|
||||||
|
|
||||||
|
result.setSelection(reportAvtivityID, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCallMap() {
|
public void onCallMap() {
|
||||||
gotoMapActivity();
|
gotoMapActivity();
|
||||||
@@ -213,9 +216,7 @@ public class ReportWFActivity extends BaseActivity implements ReportWF_1_Fragmen
|
|||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
int id = item.getItemId();
|
int id = item.getItemId();
|
||||||
|
|
||||||
if((id == R.id.menu_btn_goback)){
|
if((id == R.id.menu_btn_gotostart)){
|
||||||
initFragment(currentState-1);
|
|
||||||
}else if((id == R.id.menu_btn_gotostart)){
|
|
||||||
initFragment(0);
|
initFragment(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -223,7 +224,7 @@ public class ReportWFActivity extends BaseActivity implements ReportWF_1_Fragmen
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private StringRequest getStringRequestAddIncidentWithPosition(final AppClusterItem incident) {
|
private StringRequest getStringRequestAddIncidentWithPosition(final IncidentReport incident) {
|
||||||
showDialog();
|
showDialog();
|
||||||
return new StringRequest(Request.Method.POST, AppConfig.URL_REGISTER, new Response.Listener<String>() {
|
return new StringRequest(Request.Method.POST, AppConfig.URL_REGISTER, new Response.Listener<String>() {
|
||||||
|
|
||||||
|
|||||||
@@ -131,12 +131,23 @@ public class SettingsActivity extends BaseActivity {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if(user.get("providerType") != null && user.get("providerType").equals("local")){
|
if(user.get("providerType") != null && user.get("providerType").equals("local")){
|
||||||
findViewById(R.id.rl_main_content_2).setVisibility(View.VISIBLE);
|
findViewById(R.id.lbl_settings_password).setVisibility(View.VISIBLE);
|
||||||
|
findViewById(R.id.txt_settings_password).setVisibility(View.VISIBLE);
|
||||||
|
findViewById(R.id.btn_settings_req_password).setVisibility(View.VISIBLE);
|
||||||
}else{
|
}else{
|
||||||
findViewById(R.id.rl_main_content_2).setVisibility(View.INVISIBLE);
|
findViewById(R.id.lbl_settings_password).setVisibility(View.INVISIBLE);
|
||||||
|
findViewById(R.id.txt_settings_password).setVisibility(View.INVISIBLE);
|
||||||
|
findViewById(R.id.btn_settings_req_password).setVisibility(View.INVISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
result.setSelection(settingsAvtivityID,false);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutResourceId() {
|
protected int getLayoutResourceId() {
|
||||||
return R.layout.activity_settings;
|
return R.layout.activity_settings;
|
||||||
|
|||||||
@@ -16,6 +16,12 @@ public class SubscriptionsActivity extends BaseActivity {
|
|||||||
userHasToBeLoggedIn();
|
userHasToBeLoggedIn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
result.setSelection(subscriptionsAvtivityID,false);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutResourceId() {
|
protected int getLayoutResourceId() {
|
||||||
return R.layout.activity_subscriptions;
|
return R.layout.activity_subscriptions;
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package org.deke.risk.riskahead.helper;
|
package org.deke.risk.riskahead.adapter;
|
||||||
|
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.support.v4.app.FragmentManager;
|
import android.support.v4.app.FragmentManager;
|
||||||
import android.support.v4.app.FragmentStatePagerAdapter;
|
import android.support.v4.app.FragmentStatePagerAdapter;
|
||||||
|
|
||||||
import org.deke.risk.riskahead.fragments.ProfileStatisticsFragment;
|
import org.deke.risk.riskahead.fragment.ProfileStatisticsFragment;
|
||||||
import org.deke.risk.riskahead.fragments.ReportListFragment;
|
import org.deke.risk.riskahead.fragment.ReportListFragment;
|
||||||
import org.deke.risk.riskahead.fragments.Top10Fragment;
|
import org.deke.risk.riskahead.fragment.Top10Fragment;
|
||||||
|
|
||||||
public class ProfilePagerAdapter extends FragmentStatePagerAdapter {
|
public class ProfilePagerAdapter extends FragmentStatePagerAdapter {
|
||||||
int mNumOfTabs;
|
int mNumOfTabs;
|
||||||
@@ -18,20 +18,21 @@ public class ProfilePagerAdapter extends FragmentStatePagerAdapter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Fragment getItem(int position) {
|
public Fragment getItem(int position) {
|
||||||
|
Fragment returnFragment;
|
||||||
switch (position) {
|
switch (position) {
|
||||||
case 0:
|
case 0:
|
||||||
ProfileStatisticsFragment tab1 = new ProfileStatisticsFragment();
|
returnFragment = new ProfileStatisticsFragment();
|
||||||
return tab1;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
Top10Fragment tab2 = new Top10Fragment();
|
returnFragment = new Top10Fragment();
|
||||||
return tab2;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
ReportListFragment tab3 = new ReportListFragment();
|
returnFragment = new ReportListFragment();
|
||||||
return tab3;
|
break;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
return returnFragment;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.deke.risk.riskahead.helper;
|
package org.deke.risk.riskahead.adapter;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
@@ -7,10 +7,12 @@ import android.view.LayoutInflater;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.BaseAdapter;
|
import android.widget.BaseAdapter;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import org.deke.risk.riskahead.R;
|
import org.deke.risk.riskahead.R;
|
||||||
|
import org.deke.risk.riskahead.helper.IncidentReport;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
@@ -48,12 +50,14 @@ public class ReportListAdapter extends BaseAdapter {
|
|||||||
@Override
|
@Override
|
||||||
public View getView(int position, View convertView, ViewGroup parent) {
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
View vi = convertView;
|
View vi = convertView;
|
||||||
if (vi == null) vi = inflater.inflate(R.layout.activity_reportlist_lvrow, null);
|
if (vi == null) vi = inflater.inflate(R.layout.fragment_reportlist_row, null);
|
||||||
|
|
||||||
TextView itemText = (TextView) vi.findViewById(R.id.txt_reportlist_lvrow_text);
|
TextView itemText = (TextView) vi.findViewById(R.id.txt_reportlist_lvrow_text);
|
||||||
TextView titleText = (TextView) vi.findViewById(R.id.txt_reportlist_lvrow_title);
|
TextView titleText = (TextView) vi.findViewById(R.id.txt_reportlist_lvrow_title);
|
||||||
TextView categoryText = (TextView) vi.findViewById(R.id.txt_reportlist_lvrow_category);
|
TextView categoryText = (TextView) vi.findViewById(R.id.txt_reportlist_lvrow_category);
|
||||||
LinearLayout ll = (LinearLayout) vi.findViewById(R.id.lay_reportlist_color);
|
LinearLayout ll = (LinearLayout) vi.findViewById(R.id.lay_reportlist_color);
|
||||||
|
ImageView iv = (ImageView) vi.findViewById(R.id.ic_reportlist_row);
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
titleText.setText(data.get(position).getString("created_at")+" : "+data.get(position).getString("text_short"));
|
titleText.setText(data.get(position).getString("created_at")+" : "+data.get(position).getString("text_short"));
|
||||||
@@ -61,6 +65,9 @@ public class ReportListAdapter extends BaseAdapter {
|
|||||||
categoryText.setText(data.get(position).getString("cat_name"));
|
categoryText.setText(data.get(position).getString("cat_name"));
|
||||||
titleText.setTypeface(null, Typeface.BOLD);
|
titleText.setTypeface(null, Typeface.BOLD);
|
||||||
ll.setBackgroundColor(Color.parseColor("#" + data.get(position).getString("color")));
|
ll.setBackgroundColor(Color.parseColor("#" + data.get(position).getString("color")));
|
||||||
|
|
||||||
|
IncidentReport item = new IncidentReport(data.get(position));
|
||||||
|
iv.setBackground(parent.getContext().getDrawable(item.getIconDrawable()));
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.deke.risk.riskahead.helper;
|
package org.deke.risk.riskahead.adapter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Dennis on 06.12.2015.
|
* Created by Dennis on 06.12.2015.
|
||||||
@@ -15,7 +15,7 @@ import android.widget.SpinnerAdapter;
|
|||||||
* Decorator Adapter to allow a Spinner to show a 'Nothing Selected...' initially
|
* Decorator Adapter to allow a Spinner to show a 'Nothing Selected...' initially
|
||||||
* displayed instead of the first choice in the Adapter.
|
* displayed instead of the first choice in the Adapter.
|
||||||
*/
|
*/
|
||||||
public class HintAdapter implements SpinnerAdapter, ListAdapter {
|
public class SpinnerHintAdapter implements SpinnerAdapter, ListAdapter {
|
||||||
|
|
||||||
protected static final int EXTRA = 1;
|
protected static final int EXTRA = 1;
|
||||||
protected SpinnerAdapter adapter;
|
protected SpinnerAdapter adapter;
|
||||||
@@ -33,7 +33,7 @@ public class HintAdapter implements SpinnerAdapter, ListAdapter {
|
|||||||
* you want text grayed out like a prompt...
|
* you want text grayed out like a prompt...
|
||||||
* @param context
|
* @param context
|
||||||
*/
|
*/
|
||||||
public HintAdapter(
|
public SpinnerHintAdapter(
|
||||||
SpinnerAdapter spinnerAdapter,
|
SpinnerAdapter spinnerAdapter,
|
||||||
int nothingSelectedLayout, Context context) {
|
int nothingSelectedLayout, Context context) {
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ public class HintAdapter implements SpinnerAdapter, ListAdapter {
|
|||||||
* the dropdown.
|
* the dropdown.
|
||||||
* @param context
|
* @param context
|
||||||
*/
|
*/
|
||||||
public HintAdapter(SpinnerAdapter spinnerAdapter, int nothingSelectedLayout, int nothingSelectedDropdownLayout, Context context) {
|
public SpinnerHintAdapter(SpinnerAdapter spinnerAdapter, int nothingSelectedLayout, int nothingSelectedDropdownLayout, Context context) {
|
||||||
this.adapter = spinnerAdapter;
|
this.adapter = spinnerAdapter;
|
||||||
this.context = context;
|
this.context = context;
|
||||||
this.nothingSelectedLayout = nothingSelectedLayout;
|
this.nothingSelectedLayout = nothingSelectedLayout;
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package org.deke.risk.riskahead.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.Typeface;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.BaseAdapter;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import org.deke.risk.riskahead.R;
|
||||||
|
import org.json.JSONException;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class Top10ListAdapter extends BaseAdapter {
|
||||||
|
|
||||||
|
Context context;
|
||||||
|
List<JSONObject> data;
|
||||||
|
|
||||||
|
private static LayoutInflater inflater = null;
|
||||||
|
|
||||||
|
public Top10ListAdapter(Context context, List<JSONObject> data) {
|
||||||
|
this.context = context;
|
||||||
|
this.data = data;
|
||||||
|
inflater = (LayoutInflater) context
|
||||||
|
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
return data.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getItem(int position) {
|
||||||
|
return data.get(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getItemId(int position) {
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View getView(int position, View convertView, ViewGroup parent) {
|
||||||
|
View vi = convertView;
|
||||||
|
if (vi == null) vi = inflater.inflate(R.layout.fragment_top10list_row, null);
|
||||||
|
|
||||||
|
TextView rank = (TextView) vi.findViewById(R.id.txt_top10_rank);
|
||||||
|
TextView name = (TextView) vi.findViewById(R.id.txt_top10_name);
|
||||||
|
TextView numberOfIncidents = (TextView) vi.findViewById(R.id.txt_top10_numberOfIncidents);
|
||||||
|
TextView memberSince = (TextView) vi.findViewById(R.id.txt_top10_membersince);
|
||||||
|
TextView points = (TextView) vi.findViewById(R.id.txt_top10_points);
|
||||||
|
|
||||||
|
try {
|
||||||
|
rank.setText("#"+data.get(position).getString("rank"));
|
||||||
|
name.setText(data.get(position).getString("username"));
|
||||||
|
name.setTypeface(null, Typeface.BOLD);
|
||||||
|
points.setText(data.get(position).getString("points"));
|
||||||
|
|
||||||
|
numberOfIncidents.setText(data.get(position).getString("numberOfPosts")+" reported incidents");
|
||||||
|
memberSince.setText("Member since "+data.get(position).getString("created_at").split(" ")[0]);
|
||||||
|
} catch (JSONException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return vi;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.deke.risk.riskahead.fragments;
|
package org.deke.risk.riskahead.fragment;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@@ -77,7 +77,7 @@ public class FacebookButtonFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public interface OnFragmentInteractionListener {
|
public interface OnFragmentInteractionListener {
|
||||||
public void onFragmentInteraction(Uri uri);
|
void onFragmentInteraction(Uri uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initFacebookButton() {
|
private void initFacebookButton() {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.deke.risk.riskahead.fragments;
|
package org.deke.risk.riskahead.fragment;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@@ -238,6 +238,6 @@ public class GooglePlusButtonFragment extends Fragment implements GoogleApiClien
|
|||||||
}
|
}
|
||||||
|
|
||||||
public interface OnFragmentInteractionListener {
|
public interface OnFragmentInteractionListener {
|
||||||
public void onFragmentInteraction(Uri uri);
|
void onFragmentInteraction(Uri uri);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.deke.risk.riskahead.fragments;
|
package org.deke.risk.riskahead.fragment;
|
||||||
|
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -36,7 +36,7 @@ public class ProfileStatisticsFragment extends Fragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
view = inflater.inflate(R.layout.activity_profile_stats, container, false);
|
view = inflater.inflate(R.layout.fragment_profile_stats, container, false);
|
||||||
parent = (ProfileActivity)getActivity();
|
parent = (ProfileActivity)getActivity();
|
||||||
|
|
||||||
StringRequest strReq = getStringRequestProfileStats();
|
StringRequest strReq = getStringRequestProfileStats();
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.deke.risk.riskahead.fragments;
|
package org.deke.risk.riskahead.fragment;
|
||||||
|
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -19,7 +19,7 @@ import org.deke.risk.riskahead.ProfileActivity;
|
|||||||
import org.deke.risk.riskahead.R;
|
import org.deke.risk.riskahead.R;
|
||||||
import org.deke.risk.riskahead.helper.AppConfig;
|
import org.deke.risk.riskahead.helper.AppConfig;
|
||||||
import org.deke.risk.riskahead.helper.AppController;
|
import org.deke.risk.riskahead.helper.AppController;
|
||||||
import org.deke.risk.riskahead.helper.ReportListAdapter;
|
import org.deke.risk.riskahead.adapter.ReportListAdapter;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
@@ -45,11 +45,10 @@ public class ReportListFragment extends Fragment{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
view = inflater.inflate(R.layout.activity_reportlist, container, false);
|
view = inflater.inflate(R.layout.fragment_reportlist, container, false);
|
||||||
parent = (ProfileActivity)getActivity();
|
parent = (ProfileActivity)getActivity();
|
||||||
|
Log.d(TAG,"ReportListActivated!");
|
||||||
myListView = (ListView) view.findViewById(R.id.lv_reportlist_list);
|
myListView = (ListView) view.findViewById(R.id.lv_reportlist_list);
|
||||||
//setContentView(R.layout.activity_reportlist);
|
|
||||||
|
|
||||||
String tag_string_req = "getincidentswithpositionfromid";
|
String tag_string_req = "getincidentswithpositionfromid";
|
||||||
StringRequest strReq = getStringRequestGetIncidentsWithPositionFromUserID();
|
StringRequest strReq = getStringRequestGetIncidentsWithPositionFromUserID();
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.deke.risk.riskahead.fragments;
|
package org.deke.risk.riskahead.fragment;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Fragment;
|
import android.app.Fragment;
|
||||||
@@ -17,8 +17,8 @@ import com.beardedhen.androidbootstrap.BootstrapButton;
|
|||||||
|
|
||||||
import org.deke.risk.riskahead.R;
|
import org.deke.risk.riskahead.R;
|
||||||
import org.deke.risk.riskahead.ReportWFActivity;
|
import org.deke.risk.riskahead.ReportWFActivity;
|
||||||
import org.deke.risk.riskahead.helper.AppClusterItem;
|
import org.deke.risk.riskahead.helper.IncidentReport;
|
||||||
import org.deke.risk.riskahead.helper.HintAdapter;
|
import org.deke.risk.riskahead.adapter.SpinnerHintAdapter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Dennis on 04.12.2015.
|
* Created by Dennis on 04.12.2015.
|
||||||
@@ -44,7 +44,7 @@ public class ReportWF_1_Fragment extends Fragment{
|
|||||||
|
|
||||||
private boolean isMandatoryCategoryFilled;
|
private boolean isMandatoryCategoryFilled;
|
||||||
|
|
||||||
AppClusterItem incident;
|
IncidentReport incident;
|
||||||
|
|
||||||
OnInputFinishedListener mCallbackFinished;
|
OnInputFinishedListener mCallbackFinished;
|
||||||
OnCallMapListener mCallbackMapListener;
|
OnCallMapListener mCallbackMapListener;
|
||||||
@@ -89,7 +89,7 @@ public class ReportWF_1_Fragment extends Fragment{
|
|||||||
ArrayAdapter<CharSequence> adapter_main_1 = ArrayAdapter.createFromResource(getActivity(),
|
ArrayAdapter<CharSequence> adapter_main_1 = ArrayAdapter.createFromResource(getActivity(),
|
||||||
R.array.cat_situation_main, android.R.layout.simple_spinner_dropdown_item);
|
R.array.cat_situation_main, android.R.layout.simple_spinner_dropdown_item);
|
||||||
adapter_main_1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
adapter_main_1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||||
crimeCategory.setAdapter(new HintAdapter(adapter_main_1, R.layout.contact_spinner_row_nothing_selected, getActivity()));
|
crimeCategory.setAdapter(new SpinnerHintAdapter(adapter_main_1, R.layout.contact_spinner_row_nothing_selected, getActivity()));
|
||||||
|
|
||||||
crimeCategory.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
crimeCategory.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -124,9 +124,9 @@ public class ReportWF_1_Fragment extends Fragment{
|
|||||||
ArrayAdapter<CharSequence> adapter_sub_1 = ArrayAdapter.createFromResource(viewFragment.getContext(),
|
ArrayAdapter<CharSequence> adapter_sub_1 = ArrayAdapter.createFromResource(viewFragment.getContext(),
|
||||||
stringid, android.R.layout.simple_spinner_dropdown_item);
|
stringid, android.R.layout.simple_spinner_dropdown_item);
|
||||||
adapter_sub_1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
adapter_sub_1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||||
spinner_sub_1.setAdapter(new HintAdapter(adapter_sub_1, R.layout.contact_spinner_row_nothing_selected, getActivity()));
|
spinner_sub_1.setAdapter(new SpinnerHintAdapter(adapter_sub_1, R.layout.contact_spinner_row_nothing_selected, getActivity()));
|
||||||
|
|
||||||
if (((HintAdapter) crimeCategory.getAdapter()).isInInitialState()) {
|
if (((SpinnerHintAdapter) crimeCategory.getAdapter()).isInInitialState()) {
|
||||||
spinner_sub_1.setVisibility(View.INVISIBLE);
|
spinner_sub_1.setVisibility(View.INVISIBLE);
|
||||||
} else {
|
} else {
|
||||||
spinner_sub_1.setVisibility(View.VISIBLE);
|
spinner_sub_1.setVisibility(View.VISIBLE);
|
||||||
@@ -180,7 +180,7 @@ public class ReportWF_1_Fragment extends Fragment{
|
|||||||
viewFragment.findViewById(R.id.txt_reportwf_1_cat_etc).setVisibility(View.INVISIBLE);
|
viewFragment.findViewById(R.id.txt_reportwf_1_cat_etc).setVisibility(View.INVISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((HintAdapter) crimeSubCategory.getAdapter()).isInInitialState()) {
|
if (((SpinnerHintAdapter) crimeSubCategory.getAdapter()).isInInitialState()) {
|
||||||
isMandatoryCategoryFilled = false;
|
isMandatoryCategoryFilled = false;
|
||||||
checkIfFinished();
|
checkIfFinished();
|
||||||
} else {
|
} else {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.deke.risk.riskahead.fragments;
|
package org.deke.risk.riskahead.fragment;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.DatePickerDialog;
|
import android.app.DatePickerDialog;
|
||||||
@@ -21,8 +21,8 @@ import android.widget.TimePicker;
|
|||||||
|
|
||||||
import org.deke.risk.riskahead.R;
|
import org.deke.risk.riskahead.R;
|
||||||
import org.deke.risk.riskahead.ReportWFActivity;
|
import org.deke.risk.riskahead.ReportWFActivity;
|
||||||
import org.deke.risk.riskahead.helper.AppClusterItem;
|
import org.deke.risk.riskahead.helper.IncidentReport;
|
||||||
import org.deke.risk.riskahead.helper.HintAdapter;
|
import org.deke.risk.riskahead.adapter.SpinnerHintAdapter;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
@@ -50,7 +50,7 @@ public class ReportWF_2_Fragment extends Fragment {
|
|||||||
|
|
||||||
private EditText tmpInput;
|
private EditText tmpInput;
|
||||||
|
|
||||||
private AppClusterItem incident;
|
private IncidentReport incident;
|
||||||
private boolean isMandatoryCategoryFilled;
|
private boolean isMandatoryCategoryFilled;
|
||||||
|
|
||||||
OnInputFinishedListener mCallback;
|
OnInputFinishedListener mCallback;
|
||||||
@@ -132,7 +132,7 @@ public class ReportWF_2_Fragment extends Fragment {
|
|||||||
ArrayAdapter<CharSequence> adapter_main_1 = ArrayAdapter.createFromResource(getActivity(),
|
ArrayAdapter<CharSequence> adapter_main_1 = ArrayAdapter.createFromResource(getActivity(),
|
||||||
R.array.cat_time_main, android.R.layout.simple_spinner_dropdown_item);
|
R.array.cat_time_main, android.R.layout.simple_spinner_dropdown_item);
|
||||||
adapter_main_1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
adapter_main_1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||||
timeCategory.setAdapter(new HintAdapter(adapter_main_1, R.layout.contact_spinner_row_nothing_selected, getActivity()));
|
timeCategory.setAdapter(new SpinnerHintAdapter(adapter_main_1, R.layout.contact_spinner_row_nothing_selected, getActivity()));
|
||||||
|
|
||||||
timeCategory.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
timeCategory.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -181,16 +181,16 @@ public class ReportWF_2_Fragment extends Fragment {
|
|||||||
|
|
||||||
checkIfFinished();
|
checkIfFinished();
|
||||||
|
|
||||||
if (!((HintAdapter) timeCategory.getAdapter()).isInInitialState() && stringid != 0) {
|
if (!((SpinnerHintAdapter) timeCategory.getAdapter()).isInInitialState() && stringid != 0) {
|
||||||
ArrayAdapter<CharSequence> adapter_sub_1 = ArrayAdapter.createFromResource(viewFragment.getContext(),stringid, android.R.layout.simple_spinner_dropdown_item);
|
ArrayAdapter<CharSequence> adapter_sub_1 = ArrayAdapter.createFromResource(viewFragment.getContext(),stringid, android.R.layout.simple_spinner_dropdown_item);
|
||||||
adapter_sub_1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
adapter_sub_1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||||
timeSubCategory.setAdapter(new HintAdapter(adapter_sub_1, R.layout.contact_spinner_row_nothing_selected, getActivity()));
|
timeSubCategory.setAdapter(new SpinnerHintAdapter(adapter_sub_1, R.layout.contact_spinner_row_nothing_selected, getActivity()));
|
||||||
timeSubCategory.setVisibility(View.VISIBLE);
|
timeSubCategory.setVisibility(View.VISIBLE);
|
||||||
} else if (stringid == 0) {
|
} else if (stringid == 0) {
|
||||||
timeSubCategory.setVisibility(View.INVISIBLE);
|
timeSubCategory.setVisibility(View.INVISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((HintAdapter) timeCategory.getAdapter()).isInInitialState()) {
|
if (((SpinnerHintAdapter) timeCategory.getAdapter()).isInInitialState()) {
|
||||||
isMandatoryCategoryFilled = false;
|
isMandatoryCategoryFilled = false;
|
||||||
checkIfFinished();
|
checkIfFinished();
|
||||||
}
|
}
|
||||||
@@ -213,7 +213,7 @@ public class ReportWF_2_Fragment extends Fragment {
|
|||||||
timeSubCategory.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
timeSubCategory.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
isMandatoryCategoryFilled = !((HintAdapter) timeSubCategory.getAdapter()).isInInitialState();
|
isMandatoryCategoryFilled = !((SpinnerHintAdapter) timeSubCategory.getAdapter()).isInInitialState();
|
||||||
|
|
||||||
if ((position == 0) && (incident.getmFidTimeSubCat() != 0))
|
if ((position == 0) && (incident.getmFidTimeSubCat() != 0))
|
||||||
timeSubCategory.setSelection(incident.getmFidTimeSubCat());
|
timeSubCategory.setSelection(incident.getmFidTimeSubCat());
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.deke.risk.riskahead.fragments;
|
package org.deke.risk.riskahead.fragment;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Fragment;
|
import android.app.Fragment;
|
||||||
@@ -13,8 +13,8 @@ import android.widget.Spinner;
|
|||||||
|
|
||||||
import org.deke.risk.riskahead.R;
|
import org.deke.risk.riskahead.R;
|
||||||
import org.deke.risk.riskahead.ReportWFActivity;
|
import org.deke.risk.riskahead.ReportWFActivity;
|
||||||
import org.deke.risk.riskahead.helper.AppClusterItem;
|
import org.deke.risk.riskahead.helper.IncidentReport;
|
||||||
import org.deke.risk.riskahead.helper.HintAdapter;
|
import org.deke.risk.riskahead.adapter.SpinnerHintAdapter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Dennis on 08.12.2015.
|
* Created by Dennis on 08.12.2015.
|
||||||
@@ -36,7 +36,7 @@ public class ReportWF_3_Fragment extends Fragment {
|
|||||||
private Spinner suspectOriginCategory;
|
private Spinner suspectOriginCategory;
|
||||||
private EditText suspectEtcInput;
|
private EditText suspectEtcInput;
|
||||||
|
|
||||||
private AppClusterItem incident;
|
private IncidentReport incident;
|
||||||
private boolean isMandatoryCategoryFilled;
|
private boolean isMandatoryCategoryFilled;
|
||||||
|
|
||||||
OnInputFinishedListener mCallback;
|
OnInputFinishedListener mCallback;
|
||||||
@@ -71,7 +71,7 @@ public class ReportWF_3_Fragment extends Fragment {
|
|||||||
ArrayAdapter<CharSequence> adapter_main_1 = ArrayAdapter.createFromResource(getActivity(),
|
ArrayAdapter<CharSequence> adapter_main_1 = ArrayAdapter.createFromResource(getActivity(),
|
||||||
R.array.cat_suspect_main, android.R.layout.simple_spinner_dropdown_item);
|
R.array.cat_suspect_main, android.R.layout.simple_spinner_dropdown_item);
|
||||||
adapter_main_1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
adapter_main_1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||||
suspectCategory.setAdapter(new HintAdapter(adapter_main_1, R.layout.contact_spinner_row_nothing_selected, getActivity()));
|
suspectCategory.setAdapter(new SpinnerHintAdapter(adapter_main_1, R.layout.contact_spinner_row_nothing_selected, getActivity()));
|
||||||
|
|
||||||
suspectCategory.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
suspectCategory.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -114,16 +114,16 @@ public class ReportWF_3_Fragment extends Fragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!((HintAdapter) suspectCategory.getAdapter()).isInInitialState() && stringid != 0) {
|
if (!((SpinnerHintAdapter) suspectCategory.getAdapter()).isInInitialState() && stringid != 0) {
|
||||||
ArrayAdapter<CharSequence> adapter_sub_1 = ArrayAdapter.createFromResource(viewFragment.getContext(), stringid, android.R.layout.simple_spinner_dropdown_item);
|
ArrayAdapter<CharSequence> adapter_sub_1 = ArrayAdapter.createFromResource(viewFragment.getContext(), stringid, android.R.layout.simple_spinner_dropdown_item);
|
||||||
adapter_sub_1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
adapter_sub_1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||||
suspectOriginCategory.setAdapter(new HintAdapter(adapter_sub_1, R.layout.contact_spinner_row_nothing_selected, getActivity()));
|
suspectOriginCategory.setAdapter(new SpinnerHintAdapter(adapter_sub_1, R.layout.contact_spinner_row_nothing_selected, getActivity()));
|
||||||
suspectOriginCategory.setVisibility(View.VISIBLE);
|
suspectOriginCategory.setVisibility(View.VISIBLE);
|
||||||
} else if (stringid == 0) {
|
} else if (stringid == 0) {
|
||||||
suspectOriginCategory.setVisibility(View.INVISIBLE);
|
suspectOriginCategory.setVisibility(View.INVISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((HintAdapter) suspectCategory.getAdapter()).isInInitialState()) {
|
if (((SpinnerHintAdapter) suspectCategory.getAdapter()).isInInitialState()) {
|
||||||
isMandatoryCategoryFilled = false;
|
isMandatoryCategoryFilled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,7 +145,7 @@ public class ReportWF_3_Fragment extends Fragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||||
|
|
||||||
isMandatoryCategoryFilled = !((HintAdapter) suspectOriginCategory.getAdapter()).isInInitialState();
|
isMandatoryCategoryFilled = !((SpinnerHintAdapter) suspectOriginCategory.getAdapter()).isInInitialState();
|
||||||
|
|
||||||
if ((position == 0) && (incident.getmFidTimeSubCat() != 0))
|
if ((position == 0) && (incident.getmFidTimeSubCat() != 0))
|
||||||
suspectOriginCategory.setSelection(incident.getmFidSuspectOrigin());
|
suspectOriginCategory.setSelection(incident.getmFidSuspectOrigin());
|
||||||
@@ -1,15 +1,13 @@
|
|||||||
package org.deke.risk.riskahead.fragments;
|
package org.deke.risk.riskahead.fragment;
|
||||||
|
|
||||||
import android.graphics.Color;
|
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.TableLayout;
|
import android.widget.ListAdapter;
|
||||||
import android.widget.TableRow;
|
import android.widget.ListView;
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import com.android.volley.Request;
|
import com.android.volley.Request;
|
||||||
import com.android.volley.Response;
|
import com.android.volley.Response;
|
||||||
@@ -20,11 +18,14 @@ import org.deke.risk.riskahead.ProfileActivity;
|
|||||||
import org.deke.risk.riskahead.R;
|
import org.deke.risk.riskahead.R;
|
||||||
import org.deke.risk.riskahead.helper.AppConfig;
|
import org.deke.risk.riskahead.helper.AppConfig;
|
||||||
import org.deke.risk.riskahead.helper.AppController;
|
import org.deke.risk.riskahead.helper.AppController;
|
||||||
|
import org.deke.risk.riskahead.adapter.Top10ListAdapter;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -38,10 +39,16 @@ public class Top10Fragment extends Fragment {
|
|||||||
private View view;
|
private View view;
|
||||||
private ProfileActivity parent;
|
private ProfileActivity parent;
|
||||||
|
|
||||||
|
ListView myListView;
|
||||||
|
ListAdapter myListAdapter;
|
||||||
|
List<JSONObject> resultList;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
view = inflater.inflate(R.layout.activity_profile_top10, container, false);
|
view = inflater.inflate(R.layout.fragment_top10list, container, false);
|
||||||
parent = (ProfileActivity)getActivity();
|
parent = (ProfileActivity)getActivity();
|
||||||
|
Log.d(TAG,"Top10ListActivated!");
|
||||||
|
myListView = (ListView) view.findViewById(R.id.lv_top10list);
|
||||||
|
|
||||||
StringRequest strReq2 = getStringRequestTop10();
|
StringRequest strReq2 = getStringRequestTop10();
|
||||||
String tag_string_req2 = "req_top10";
|
String tag_string_req2 = "req_top10";
|
||||||
@@ -63,34 +70,20 @@ public class Top10Fragment extends Fragment {
|
|||||||
JSONObject jObj = new JSONObject(response);
|
JSONObject jObj = new JSONObject(response);
|
||||||
boolean error = jObj.getBoolean("error");
|
boolean error = jObj.getBoolean("error");
|
||||||
if (!error) {
|
if (!error) {
|
||||||
TableLayout tbltop10 = (TableLayout) view.findViewById(R.id.tableTop10);
|
JSONArray users = jObj.getJSONArray("msg");
|
||||||
JSONArray listitems = jObj.getJSONArray("msg");
|
resultList = new ArrayList<>();
|
||||||
for(int i=0;i<listitems.length();i++){
|
Log.d(TAG,"Writing stuff in resultList!");
|
||||||
JSONObject listitem = listitems.getJSONObject(i);
|
for(int i=0;i<users.length();i++){
|
||||||
|
JSONObject user = users.getJSONObject(i);
|
||||||
TableRow row = new TableRow(view.getContext());
|
resultList.add(user);
|
||||||
TableRow.LayoutParams lp = new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT);
|
|
||||||
lp.setMargins(3,3,3,3);
|
|
||||||
row.setLayoutParams(lp);
|
|
||||||
|
|
||||||
TextView rank = new TextView(view.getContext());
|
|
||||||
rank.setText(listitem.getString("rank"));
|
|
||||||
rank.setTextColor(Color.BLACK);
|
|
||||||
|
|
||||||
TextView username = new TextView(view.getContext());
|
|
||||||
username.setText(listitem.getString("username"));
|
|
||||||
username.setTextColor(Color.BLACK);
|
|
||||||
|
|
||||||
TextView points = new TextView(view.getContext());
|
|
||||||
points.setText(listitem.getString("points"));
|
|
||||||
points.setTextColor(Color.BLACK);
|
|
||||||
|
|
||||||
row.addView(rank);
|
|
||||||
row.addView(username);
|
|
||||||
row.addView(points);
|
|
||||||
|
|
||||||
tbltop10.addView(row,i+1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
myListAdapter = new Top10ListAdapter(
|
||||||
|
parent.getApplicationContext(),
|
||||||
|
resultList);
|
||||||
|
|
||||||
|
myListView.setAdapter(myListAdapter);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
String errorMsg = jObj.getString("error_msg");
|
String errorMsg = jObj.getString("error_msg");
|
||||||
Log.e(TAG, "Error getting top 10 stats (Server returned error): " + errorMsg);
|
Log.e(TAG, "Error getting top 10 stats (Server returned error): " + errorMsg);
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package org.deke.risk.riskahead.fragments;
|
package org.deke.risk.riskahead.fragment;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@@ -145,7 +145,7 @@ public class TwitterButtonFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public interface OnFragmentInteractionListener {
|
public interface OnFragmentInteractionListener {
|
||||||
public void onFragmentInteraction(Uri uri);
|
void onFragmentInteraction(Uri uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.deke.risk.riskahead.helper;
|
package org.deke.risk.riskahead.helper;
|
||||||
|
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
|
import android.content.Context;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import com.android.volley.DefaultRetryPolicy;
|
import com.android.volley.DefaultRetryPolicy;
|
||||||
@@ -26,6 +27,11 @@ public class AppController extends Application {
|
|||||||
TypefaceProvider.registerDefaultIconSets();
|
TypefaceProvider.registerDefaultIconSets();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void attachBaseContext(Context base) {
|
||||||
|
super.attachBaseContext(base);
|
||||||
|
}
|
||||||
|
|
||||||
public static synchronized AppController getInstance() {
|
public static synchronized AppController getInstance() {
|
||||||
return mInstance;
|
return mInstance;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,27 +5,35 @@ import android.app.ProgressDialog;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.res.Configuration;
|
|
||||||
import android.net.ConnectivityManager;
|
import android.net.ConnectivityManager;
|
||||||
import android.net.NetworkInfo;
|
import android.net.NetworkInfo;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.support.v4.widget.DrawerLayout;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v7.app.ActionBarDrawerToggle;
|
import android.support.v4.view.LayoutInflaterCompat;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.support.v7.widget.ShareActionProvider;
|
import android.support.v7.widget.Toolbar;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.AdapterView;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ListView;
|
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.google.android.gms.ads.AdListener;
|
import com.google.android.gms.ads.AdListener;
|
||||||
import com.google.android.gms.ads.AdRequest;
|
import com.google.android.gms.ads.AdRequest;
|
||||||
import com.google.android.gms.ads.InterstitialAd;
|
import com.google.android.gms.ads.InterstitialAd;
|
||||||
|
import com.mikepenz.google_material_typeface_library.GoogleMaterial;
|
||||||
|
import com.mikepenz.iconics.context.IconicsLayoutInflater;
|
||||||
|
import com.mikepenz.materialdrawer.AccountHeader;
|
||||||
|
import com.mikepenz.materialdrawer.AccountHeaderBuilder;
|
||||||
|
import com.mikepenz.materialdrawer.Drawer;
|
||||||
|
import com.mikepenz.materialdrawer.DrawerBuilder;
|
||||||
|
import com.mikepenz.materialdrawer.model.DividerDrawerItem;
|
||||||
|
import com.mikepenz.materialdrawer.model.PrimaryDrawerItem;
|
||||||
|
import com.mikepenz.materialdrawer.model.ProfileDrawerItem;
|
||||||
|
import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem;
|
||||||
|
|
||||||
import org.deke.risk.riskahead.LoginActivity;
|
import org.deke.risk.riskahead.LoginActivity;
|
||||||
import org.deke.risk.riskahead.MainActivity;
|
import org.deke.risk.riskahead.MainActivity;
|
||||||
@@ -44,20 +52,25 @@ public abstract class BaseActivity extends AppCompatActivity {
|
|||||||
public final static String EXTRA_MESSAGE = "org.deke.risk.riskahead.MESSAGE";
|
public final static String EXTRA_MESSAGE = "org.deke.risk.riskahead.MESSAGE";
|
||||||
private final static String TAG = BaseActivity.class.getSimpleName();
|
private final static String TAG = BaseActivity.class.getSimpleName();
|
||||||
|
|
||||||
private ActionBarDrawerToggle mDrawerToggle;
|
public final static int mainAvtivityID = 1;
|
||||||
private DrawerLayout mDrawerLayout;
|
public final static int reportAvtivityID = 2;
|
||||||
private ListView mDrawerList;
|
public final static int mapAvtivityID = 3;
|
||||||
private ShareActionProvider mShareActionProvider;
|
public final static int userstatsAvtivityID = 4;
|
||||||
private DrawerItemCustomAdapter mCustomDrawerAdapter;
|
public final static int settingsAvtivityID = 5;
|
||||||
|
public final static int subscriptionsAvtivityID = 6;
|
||||||
|
public final static int logoutAvtivityID = 7;
|
||||||
|
|
||||||
public SessionManager session;
|
public SessionManager session;
|
||||||
public HashMap<String, String> user;
|
public HashMap<String, String> user;
|
||||||
public ProgressDialog pDialog;
|
public ProgressDialog pDialog;
|
||||||
|
|
||||||
Handler mHandler = new Handler();
|
|
||||||
private final static int INTERVAL = 1000 * 300; //300 seconds
|
private final static int INTERVAL = 1000 * 300; //300 seconds
|
||||||
InterstitialAd mInterstitialAd;
|
InterstitialAd mInterstitialAd;
|
||||||
|
|
||||||
|
private AccountHeader headerResult = null;
|
||||||
|
public Drawer result = null;
|
||||||
|
public Toolbar mToolbar;
|
||||||
|
|
||||||
public void userHasToBeLoggedIn(){
|
public void userHasToBeLoggedIn(){
|
||||||
if (!session.isLoggedIn()) {
|
if (!session.isLoggedIn()) {
|
||||||
logout();
|
logout();
|
||||||
@@ -71,6 +84,7 @@ public abstract class BaseActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
LayoutInflaterCompat.setFactory(getLayoutInflater(), new IconicsLayoutInflater(getDelegate()));
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(getLayoutResourceId());
|
setContentView(getLayoutResourceId());
|
||||||
|
|
||||||
@@ -96,25 +110,130 @@ public abstract class BaseActivity extends AppCompatActivity {
|
|||||||
session = new SessionManager(getApplicationContext());
|
session = new SessionManager(getApplicationContext());
|
||||||
user = session.getUserDetails();
|
user = session.getUserDetails();
|
||||||
|
|
||||||
ObjectDrawerItem[] drawerItem = new ObjectDrawerItem[7];
|
//initToolbar();
|
||||||
drawerItem[0] = new ObjectDrawerItem(R.drawable.ic_action_web_site, getString(R.string.navigation_start));
|
mToolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||||
drawerItem[1] = new ObjectDrawerItem(R.drawable.ic_action_flash_on, getString(R.string.navigation_report));
|
setSupportActionBar(mToolbar);
|
||||||
drawerItem[2] = new ObjectDrawerItem(R.drawable.ic_action_map, getString(R.string.navigation_incident_map));
|
initNavigationDrawer(savedInstanceState);
|
||||||
drawerItem[3] = new ObjectDrawerItem(R.drawable.ic_action_about, getString(R.string.navigation_user_stats));
|
}
|
||||||
drawerItem[4] = new ObjectDrawerItem(R.drawable.ic_action_settings, getString(R.string.navigation_acc_settings));
|
|
||||||
drawerItem[5] = new ObjectDrawerItem(R.drawable.ic_action_important, getString(R.string.navigation_settings));
|
|
||||||
drawerItem[6] = new ObjectDrawerItem(R.drawable.ic_action_back, getString(R.string.navigation_logout));
|
|
||||||
|
|
||||||
mCustomDrawerAdapter = new DrawerItemCustomAdapter(this, R.layout.listview_item_row, drawerItem);
|
|
||||||
|
|
||||||
mDrawerList = (ListView)findViewById(R.id.navList);
|
private void initNavigationDrawer(Bundle savedInstanceState) {
|
||||||
mDrawerLayout = (DrawerLayout)findViewById(R.id.drawer_layout);
|
PrimaryDrawerItem item1 = new PrimaryDrawerItem()
|
||||||
|
.withName(R.string.navigation_start)
|
||||||
|
.withIdentifier(mainAvtivityID)
|
||||||
|
.withIcon(GoogleMaterial.Icon.gmd_home);
|
||||||
|
|
||||||
|
PrimaryDrawerItem item2 = new PrimaryDrawerItem()
|
||||||
|
.withName(R.string.navigation_report)
|
||||||
|
.withIdentifier(reportAvtivityID)
|
||||||
|
.withIcon(GoogleMaterial.Icon.gmd_room);
|
||||||
|
|
||||||
|
PrimaryDrawerItem item3 = new PrimaryDrawerItem()
|
||||||
|
.withName(R.string.navigation_incident_map)
|
||||||
|
.withIdentifier(mapAvtivityID)
|
||||||
|
.withIcon(GoogleMaterial.Icon.gmd_map);
|
||||||
|
|
||||||
|
PrimaryDrawerItem item4 = new PrimaryDrawerItem()
|
||||||
|
.withName(R.string.navigation_user_stats)
|
||||||
|
.withIdentifier(userstatsAvtivityID)
|
||||||
|
.withIcon(GoogleMaterial.Icon.gmd_speaker_notes);
|
||||||
|
|
||||||
|
PrimaryDrawerItem item5 = new PrimaryDrawerItem()
|
||||||
|
.withName(R.string.navigation_acc_settings)
|
||||||
|
.withIdentifier(settingsAvtivityID)
|
||||||
|
.withIcon(GoogleMaterial.Icon.gmd_settings);
|
||||||
|
|
||||||
|
PrimaryDrawerItem item6 = new PrimaryDrawerItem()
|
||||||
|
.withName(R.string.navigation_subscriptions)
|
||||||
|
.withIdentifier(subscriptionsAvtivityID)
|
||||||
|
.withIcon(GoogleMaterial.Icon.gmd_star);
|
||||||
|
|
||||||
|
PrimaryDrawerItem item7 = new PrimaryDrawerItem()
|
||||||
|
.withName(R.string.navigation_logout)
|
||||||
|
.withIdentifier(logoutAvtivityID)
|
||||||
|
.withIcon(GoogleMaterial.Icon.gmd_remove_circle);
|
||||||
|
|
||||||
|
headerResult = new AccountHeaderBuilder()
|
||||||
|
.withActivity(this)
|
||||||
|
.withHeaderBackground(R.drawable.header2)
|
||||||
|
.addProfiles(
|
||||||
|
new ProfileDrawerItem().withName(user.get("username")).withEmail(user.get("email")).withIcon(getResources().getDrawable(R.drawable.logo_riskahead_header))
|
||||||
|
)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
result = new DrawerBuilder()
|
||||||
|
.withActivity(this)
|
||||||
|
.withAccountHeader(headerResult)
|
||||||
|
.withTranslucentStatusBar(true)
|
||||||
|
.withHasStableIds(true)
|
||||||
|
.withToolbar(mToolbar)
|
||||||
|
.withOnDrawerListener(new Drawer.OnDrawerListener() {
|
||||||
|
@Override
|
||||||
|
public void onDrawerOpened(View drawerView) {
|
||||||
|
getSupportActionBar().setTitle("Navigate to...");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDrawerClosed(View drawerView) {
|
||||||
|
getSupportActionBar().setTitle(getActivityName());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDrawerSlide(View drawerView, float slideOffset) {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.withSavedInstance(savedInstanceState)
|
||||||
|
.withSelectedItem(-1)
|
||||||
|
.addDrawerItems(
|
||||||
|
item1,
|
||||||
|
item2,
|
||||||
|
item3,
|
||||||
|
new DividerDrawerItem(),
|
||||||
|
item4,
|
||||||
|
item5,
|
||||||
|
new DividerDrawerItem(),
|
||||||
|
item6,
|
||||||
|
item7).withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onItemClick(View view, int position, IDrawerItem drawerItem) {
|
||||||
|
Intent intent = null;
|
||||||
|
switch (drawerItem.getIdentifier()) {
|
||||||
|
case 1:
|
||||||
|
intent = new Intent(BaseActivity.this, MainActivity.class);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
intent = new Intent(BaseActivity.this, ReportWFActivity.class);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
intent = new Intent(BaseActivity.this, MapsActivity.class);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
intent = new Intent(BaseActivity.this, ProfileActivity.class);
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
intent = new Intent(BaseActivity.this, SettingsActivity.class);
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
intent = new Intent(BaseActivity.this, SubscriptionsActivity.class);
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
session.removeUser();
|
||||||
|
session.setLogin(false);
|
||||||
|
intent = new Intent(BaseActivity.this, LoginActivity.class);
|
||||||
|
intent.putExtra(EXTRA_MESSAGE, "login");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Log.d("Unknown switch page: ", Integer.toString(position));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
BaseActivity.this.startActivity(intent);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}).build();
|
||||||
|
|
||||||
|
|
||||||
addDrawerItems();
|
|
||||||
setupDrawer();
|
|
||||||
|
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
|
||||||
getSupportActionBar().setHomeButtonEnabled(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void requestNewInterstitial() {
|
private void requestNewInterstitial() {
|
||||||
@@ -168,83 +287,9 @@ public abstract class BaseActivity extends AppCompatActivity {
|
|||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
getMenuInflater().inflate(R.menu.menu_common, menu);
|
getMenuInflater().inflate(R.menu.menu_common, menu);
|
||||||
|
|
||||||
/*
|
|
||||||
MenuItem shareItem = menu.findItem(R.id.menu_item_share);
|
|
||||||
if (shareItem != null) {
|
|
||||||
mShareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(shareItem);
|
|
||||||
}
|
|
||||||
setShareIntent();
|
|
||||||
*/
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupDrawer() {
|
|
||||||
mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.string.drawer_open, R.string.drawer_close) {
|
|
||||||
|
|
||||||
/** Called when a drawer has settled in a completely open state. */
|
|
||||||
public void onDrawerOpened(View drawerView) {
|
|
||||||
super.onDrawerOpened(drawerView);
|
|
||||||
getSupportActionBar().setTitle("Navigate to...");
|
|
||||||
invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Called when a drawer has settled in a completely closed state. */
|
|
||||||
public void onDrawerClosed(View view) {
|
|
||||||
super.onDrawerClosed(view);
|
|
||||||
getSupportActionBar().setTitle(getActivityName());
|
|
||||||
invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
mDrawerToggle.setDrawerIndicatorEnabled(true);
|
|
||||||
mDrawerLayout.setDrawerListener(mDrawerToggle);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void addDrawerItems() {
|
|
||||||
mDrawerList.setAdapter(mCustomDrawerAdapter);
|
|
||||||
|
|
||||||
mDrawerList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onItemClick(AdapterView<?> parent, View view, final int position, long id) {
|
|
||||||
mDrawerLayout.setDrawerListener(new DrawerLayout.SimpleDrawerListener() {
|
|
||||||
@Override
|
|
||||||
public void onDrawerClosed(View drawerView) {
|
|
||||||
super.onDrawerClosed(drawerView);
|
|
||||||
|
|
||||||
switch (position) {
|
|
||||||
case 0:
|
|
||||||
gotoMainActivity();
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
gotoReportActivity();
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
gotoMapActivity();
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
gotoProfileActivity();
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
gotoSettingsActivity();
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
gotoSubscriptionsActivity();
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
logoutUser();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
Log.d("Unknown switch page: ", Integer.toString(position));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
mDrawerLayout.closeDrawer(mDrawerList);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void gotoMainActivity(){
|
public void gotoMainActivity(){
|
||||||
Intent intent;
|
Intent intent;
|
||||||
intent = new Intent(getApplicationContext(), MainActivity.class);
|
intent = new Intent(getApplicationContext(), MainActivity.class);
|
||||||
@@ -267,8 +312,8 @@ public abstract class BaseActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
public void gotoMapActivity(){
|
public void gotoMapActivity(){
|
||||||
Intent intent;
|
Intent intent;
|
||||||
intent = new Intent(getApplicationContext(), MapsActivity.class);
|
intent = new Intent(BaseActivity.this, MapsActivity.class);
|
||||||
startActivity(intent);
|
BaseActivity.this.startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void gotoMapActivity(String position){
|
public void gotoMapActivity(String position){
|
||||||
@@ -303,18 +348,6 @@ public abstract class BaseActivity extends AppCompatActivity {
|
|||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onPostCreate(Bundle savedInstanceState) {
|
|
||||||
super.onPostCreate(savedInstanceState);
|
|
||||||
mDrawerToggle.syncState();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onConfigurationChanged(Configuration newConfig) {
|
|
||||||
super.onConfigurationChanged(newConfig);
|
|
||||||
mDrawerToggle.onConfigurationChanged(newConfig);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
int id = item.getItemId();
|
int id = item.getItemId();
|
||||||
@@ -332,10 +365,6 @@ public abstract class BaseActivity extends AppCompatActivity {
|
|||||||
startActivity(browserIntent);
|
startActivity(browserIntent);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mDrawerToggle.onOptionsItemSelected(item)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,17 +372,6 @@ public abstract class BaseActivity extends AppCompatActivity {
|
|||||||
Toast.makeText(this, statusText, Toast.LENGTH_LONG).show();
|
Toast.makeText(this, statusText, Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setShareIntent() {
|
|
||||||
if (mShareActionProvider != null) {
|
|
||||||
Intent shareIntent = new Intent(Intent.ACTION_SEND);
|
|
||||||
shareIntent.setType("text/plain");
|
|
||||||
shareIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.share_item_title));
|
|
||||||
shareIntent.putExtra(Intent.EXTRA_TEXT, getString(R.string.share_item_text));
|
|
||||||
|
|
||||||
mShareActionProvider.setShareIntent(shareIntent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected abstract int getLayoutResourceId();
|
protected abstract int getLayoutResourceId();
|
||||||
|
|
||||||
protected abstract String getActivityName();
|
protected abstract String getActivityName();
|
||||||
|
|||||||
@@ -1,50 +0,0 @@
|
|||||||
package org.deke.risk.riskahead.helper;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.ArrayAdapter;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import org.deke.risk.riskahead.R;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by Dennis on 10.11.2015.
|
|
||||||
*/
|
|
||||||
public class DrawerItemCustomAdapter extends ArrayAdapter<ObjectDrawerItem> {
|
|
||||||
|
|
||||||
Context mContext;
|
|
||||||
int layoutResourceId;
|
|
||||||
ObjectDrawerItem data[] = null;
|
|
||||||
|
|
||||||
public DrawerItemCustomAdapter(Context mContext, int layoutResourceId, ObjectDrawerItem[] data) {
|
|
||||||
|
|
||||||
super(mContext, layoutResourceId, data);
|
|
||||||
this.layoutResourceId = layoutResourceId;
|
|
||||||
this.mContext = mContext;
|
|
||||||
this.data = data;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public View getView(int position, View convertView, ViewGroup parent) {
|
|
||||||
View listItem = convertView;
|
|
||||||
|
|
||||||
LayoutInflater inflater = ((Activity) mContext).getLayoutInflater();
|
|
||||||
listItem = inflater.inflate(layoutResourceId, parent, false);
|
|
||||||
|
|
||||||
ImageView imageViewIcon = (ImageView) listItem.findViewById(R.id.imageViewIcon);
|
|
||||||
TextView textViewName = (TextView) listItem.findViewById(R.id.textViewName);
|
|
||||||
|
|
||||||
ObjectDrawerItem folder = data[position];
|
|
||||||
|
|
||||||
|
|
||||||
imageViewIcon.setImageResource(folder.icon);
|
|
||||||
textViewName.setText(folder.name);
|
|
||||||
|
|
||||||
return listItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
package org.deke.risk.riskahead.helper;
|
package org.deke.risk.riskahead.helper;
|
||||||
|
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
|
||||||
import com.google.android.gms.maps.model.BitmapDescriptor;
|
import com.google.android.gms.maps.model.BitmapDescriptor;
|
||||||
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
||||||
import com.google.android.gms.maps.model.LatLng;
|
import com.google.android.gms.maps.model.LatLng;
|
||||||
@@ -12,7 +14,7 @@ import org.json.JSONObject;
|
|||||||
/**
|
/**
|
||||||
* Created by Dennis on 12.11.2015.
|
* Created by Dennis on 12.11.2015.
|
||||||
*/
|
*/
|
||||||
public class AppClusterItem implements ClusterItem {
|
public class IncidentReport implements ClusterItem {
|
||||||
|
|
||||||
private LatLng mPosition;
|
private LatLng mPosition;
|
||||||
private Integer mID;
|
private Integer mID;
|
||||||
@@ -52,7 +54,7 @@ public class AppClusterItem implements ClusterItem {
|
|||||||
private BitmapDescriptor icon;
|
private BitmapDescriptor icon;
|
||||||
|
|
||||||
|
|
||||||
public AppClusterItem(JSONObject mIncident, LatLng pos) {
|
public IncidentReport(JSONObject mIncident, LatLng pos) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.mID = mIncident.getInt("uid");
|
this.mID = mIncident.getInt("uid");
|
||||||
@@ -75,7 +77,30 @@ public class AppClusterItem implements ClusterItem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public AppClusterItem(){
|
public IncidentReport(JSONObject mIncident) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
this.mID = mIncident.getInt("uid");
|
||||||
|
this.mTitle = mIncident.getString("text_short");
|
||||||
|
this.mDescription = mIncident.getString("text_long");
|
||||||
|
this.mFidUser = mIncident.getString("fid_user");
|
||||||
|
this.mFidCategory = mIncident.getString("fid_category");
|
||||||
|
this.mHappenedAt = mIncident.getString("happened_at");
|
||||||
|
this.mCreatedAt = mIncident.getString("created_at");
|
||||||
|
this.mUpdatedAt = mIncident.getString("updated_at");
|
||||||
|
this.mRadius = mIncident.getString("radius");
|
||||||
|
this.mCatName = mIncident.getString("cat_name");
|
||||||
|
this.mCatDescription = mIncident.getString("cat_description");
|
||||||
|
this.mColor = mIncident.getString("color");
|
||||||
|
this.mUsername = mIncident.getString("username");
|
||||||
|
this.mScore = mIncident.getInt("votescore");
|
||||||
|
this.mPosition = new LatLng(mIncident.getDouble("latitude"),mIncident.getDouble("longitude"));
|
||||||
|
} catch (JSONException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public IncidentReport(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,6 +142,34 @@ public class AppClusterItem implements ClusterItem {
|
|||||||
|
|
||||||
return mIcon;
|
return mIcon;
|
||||||
}
|
}
|
||||||
|
public int getIconDrawable() {
|
||||||
|
int mIcon;
|
||||||
|
|
||||||
|
switch (Integer.valueOf(this.mFidCategory)) {
|
||||||
|
case 1:
|
||||||
|
mIcon = R.drawable.icon_general;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
mIcon = R.drawable.icon_verbal;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
mIcon = R.drawable.icon_middle_violance;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
mIcon = R.drawable.icon_high_violance;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
mIcon = R.drawable.icon_nature;
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
mIcon = R.drawable.icon_infra_v2;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
mIcon = R.drawable.icon_general;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return mIcon;
|
||||||
|
}
|
||||||
|
|
||||||
public String getSnippet() {
|
public String getSnippet() {
|
||||||
return this.mDescription;
|
return this.mDescription;
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package org.deke.risk.riskahead.helper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by Dennis on 10.11.2015.
|
|
||||||
*/
|
|
||||||
public class ObjectDrawerItem {
|
|
||||||
public int icon;
|
|
||||||
public String name;
|
|
||||||
|
|
||||||
public ObjectDrawerItem(int icon, String name) {
|
|
||||||
this.icon = icon;
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -5,22 +5,19 @@ import android.content.Context;
|
|||||||
import com.google.android.gms.maps.GoogleMap;
|
import com.google.android.gms.maps.GoogleMap;
|
||||||
import com.google.android.gms.maps.model.MarkerOptions;
|
import com.google.android.gms.maps.model.MarkerOptions;
|
||||||
import com.google.maps.android.clustering.ClusterManager;
|
import com.google.maps.android.clustering.ClusterManager;
|
||||||
import com.google.maps.android.clustering.view.ClusterRenderer;
|
|
||||||
import com.google.maps.android.clustering.view.DefaultClusterRenderer;
|
import com.google.maps.android.clustering.view.DefaultClusterRenderer;
|
||||||
|
|
||||||
import org.deke.risk.riskahead.MapsActivity;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Dennis on 12.11.2015.
|
* Created by Dennis on 12.11.2015.
|
||||||
*/
|
*/
|
||||||
public class OwnIconRendered extends DefaultClusterRenderer<AppClusterItem> {
|
public class OwnIconRendered extends DefaultClusterRenderer<IncidentReport> {
|
||||||
|
|
||||||
public OwnIconRendered(Context context, GoogleMap map,ClusterManager<AppClusterItem> clusterManager) {
|
public OwnIconRendered(Context context, GoogleMap map,ClusterManager<IncidentReport> clusterManager) {
|
||||||
super(context, map, clusterManager);
|
super(context, map, clusterManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onBeforeClusterItemRendered(AppClusterItem item, MarkerOptions markerOptions) {
|
protected void onBeforeClusterItemRendered(IncidentReport item, MarkerOptions markerOptions) {
|
||||||
markerOptions.icon(item.getIcon());
|
markerOptions.icon(item.getIcon());
|
||||||
markerOptions.snippet(item.getSnippet());
|
markerOptions.snippet(item.getSnippet());
|
||||||
markerOptions.title(item.getTitle());
|
markerOptions.title(item.getTitle());
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 683 B |
|
Before Width: | Height: | Size: 351 B |
|
Before Width: | Height: | Size: 389 B |
|
Before Width: | Height: | Size: 560 B |
|
Before Width: | Height: | Size: 669 B |
|
Before Width: | Height: | Size: 824 B |
|
Before Width: | Height: | Size: 702 B |
|
Before Width: | Height: | Size: 456 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 465 B |
|
Before Width: | Height: | Size: 336 B |
|
Before Width: | Height: | Size: 297 B |
|
Before Width: | Height: | Size: 417 B |
|
Before Width: | Height: | Size: 485 B |
|
Before Width: | Height: | Size: 613 B |
|
Before Width: | Height: | Size: 492 B |
|
Before Width: | Height: | Size: 330 B |
|
Before Width: | Height: | Size: 188 B |
|
Before Width: | Height: | Size: 793 B |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 860 B |
|
Before Width: | Height: | Size: 468 B |
|
Before Width: | Height: | Size: 449 B |
|
Before Width: | Height: | Size: 648 B |
|
Before Width: | Height: | Size: 823 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 916 B |
|
Before Width: | Height: | Size: 471 B |
|
Before Width: | Height: | Size: 224 B |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 527 B |
|
Before Width: | Height: | Size: 701 B |
|
Before Width: | Height: | Size: 925 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 671 B |
|
Before Width: | Height: | Size: 297 B |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 202 B |
@@ -88,7 +88,7 @@
|
|||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/frag_login_btnGP"
|
android:id="@+id/frag_login_btnGP"
|
||||||
android:name="org.deke.risk.riskahead.fragments.GooglePlusButtonFragment"
|
android:name="org.deke.risk.riskahead.fragment.GooglePlusButtonFragment"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_above="@+id/frag_login_btnTW"
|
android:layout_above="@+id/frag_login_btnTW"
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/frag_login_btnTW"
|
android:id="@+id/frag_login_btnTW"
|
||||||
android:name="org.deke.risk.riskahead.fragments.TwitterButtonFragment"
|
android:name="org.deke.risk.riskahead.fragment.TwitterButtonFragment"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_above="@+id/frag_login_btnFB"
|
android:layout_above="@+id/frag_login_btnFB"
|
||||||
@@ -108,7 +108,7 @@
|
|||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/frag_login_btnFB"
|
android:id="@+id/frag_login_btnFB"
|
||||||
android:name="org.deke.risk.riskahead.fragments.FacebookButtonFragment"
|
android:name="org.deke.risk.riskahead.fragment.FacebookButtonFragment"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
|
|||||||
@@ -1,15 +1,24 @@
|
|||||||
<android.support.v4.widget.DrawerLayout
|
<RelativeLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/drawer_layout"
|
android:id="@+id/main_layout"
|
||||||
android:background="@drawable/layout_bg_gradient"
|
android:background="@drawable/layout_bg_gradient"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".MainActivity">
|
tools:context=".MainActivity">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
layout="@layout/layout_toolbar"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_centerHorizontal="true" />
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/layoutContent"
|
android:id="@+id/layoutContent"
|
||||||
|
android:layout_below="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" >
|
android:layout_height="match_parent" >
|
||||||
|
|
||||||
@@ -29,7 +38,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
android:layout_marginTop="52dp"
|
android:layout_marginTop="52dp"
|
||||||
android:textColor="#aa999999"/>
|
android:textColor="#aa4b4b4b"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/txt_main_incidents"
|
android:id="@+id/txt_main_incidents"
|
||||||
@@ -46,55 +55,46 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
android:layout_marginTop="34dp"
|
android:layout_marginTop="34dp"
|
||||||
android:textColor="#aa999999"/>
|
android:textColor="#aa4b4b4b"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/layoutFooter"
|
android:id="@+id/layoutFooter"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:background="@color/bg_common"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="50dp"
|
android:background="#d5ddff"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true">
|
||||||
android:layout_marginBottom="0dp">
|
|
||||||
|
|
||||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
<Button
|
||||||
android:id="@+id/btn_main_report"
|
android:id="@+id/btn_main_report"
|
||||||
style="@style/wrapping_button"
|
android:layout_weight="1"
|
||||||
android:layout_width="wrap_content"
|
android:background="#651a1111"
|
||||||
|
android:layout_marginRight="1dp"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="20dp"
|
style="?android:attr/borderlessButtonStyle"
|
||||||
bootstrap:bootstrapText="@string/btn_main_report"
|
android:text="Report Incident" />
|
||||||
bootstrap:bootstrapBrand="danger"
|
|
||||||
bootstrap:roundedCorners="true"
|
|
||||||
android:layout_gravity="center_vertical" />
|
|
||||||
|
|
||||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
<Button
|
||||||
android:id="@+id/btn_main_viewmap"
|
android:id="@+id/btn_main_viewmap"
|
||||||
style="@style/wrapping_button"
|
style="?android:attr/borderlessButtonStyle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_weight="1"
|
||||||
|
android:paddingRight="10dp"
|
||||||
|
android:background="#651a1111"
|
||||||
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="20dp"
|
android:text="Show Map" />
|
||||||
bootstrap:bootstrapText="@string/btn_main_viewmap"
|
|
||||||
bootstrap:bootstrapBrand="primary"
|
|
||||||
bootstrap:roundedCorners="true"
|
|
||||||
android:layout_gravity="center_vertical" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<ListView
|
|
||||||
android:id="@+id/navList"
|
|
||||||
android:layout_width="200dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_gravity="start"
|
|
||||||
android:background="#ffffff"/>
|
|
||||||
</android.support.v4.widget.DrawerLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,24 @@
|
|||||||
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout
|
||||||
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/drawer_layout"
|
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/main_layout"
|
||||||
|
android:background="@drawable/layout_bg_gradient"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context="org.deke.risk.riskahead.MapsActivity">
|
tools:context="org.deke.risk.riskahead.MapsActivity">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
layout="@layout/layout_toolbar"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_centerHorizontal="true" />
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/layoutContent"
|
android:id="@+id/layoutContent"
|
||||||
|
android:layout_below="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
@@ -31,11 +42,6 @@
|
|||||||
bootstrap:roundedCorners="true" />
|
bootstrap:roundedCorners="true" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<ListView
|
|
||||||
android:id="@+id/navList"
|
|
||||||
android:layout_width="200dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_gravity="start"
|
|
||||||
android:background="#ffffff" />
|
|
||||||
|
|
||||||
</android.support.v4.widget.DrawerLayout>
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|||||||
@@ -1,14 +1,24 @@
|
|||||||
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout
|
||||||
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/drawer_layout"
|
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/main_layout"
|
||||||
|
android:background="@drawable/layout_bg_gradient"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/layout_bg_gradient"
|
|
||||||
tools:context=".ProfileActivity">
|
tools:context=".ProfileActivity">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
layout="@layout/layout_toolbar"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_centerHorizontal="true" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/layoutMain"
|
android:id="@+id/layoutMain"
|
||||||
|
android:layout_below="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:animateLayoutChanges="true"
|
android:animateLayoutChanges="true"
|
||||||
@@ -43,11 +53,4 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ListView
|
</RelativeLayout>
|
||||||
android:id="@+id/navList"
|
|
||||||
android:layout_width="200dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_gravity="start"
|
|
||||||
android:background="#ffffff" />
|
|
||||||
|
|
||||||
</android.support.v4.widget.DrawerLayout>
|
|
||||||
|
|||||||
@@ -1,109 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<RelativeLayout
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:id="@+id/layoutContent"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:layout_margin="10dp"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:background="@drawable/layout_bg"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="8dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/lbl_profile_stats"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:text="@string/lbl_profile_stats"
|
|
||||||
android:textColor="#000000"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:id="@+id/tableLayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@+id/lbl_profile_stats"
|
|
||||||
android:stretchColumns="1">
|
|
||||||
|
|
||||||
<TableRow>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/lbl_profile_membersince"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:padding="3dip"
|
|
||||||
android:text="@string/lbl_profile_member_since"
|
|
||||||
android:textColor="#007197" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/txt_profile_membersince"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:padding="3dip"
|
|
||||||
android:text="0"
|
|
||||||
android:textColor="#007197" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/lbl_profile_points"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:padding="3dip"
|
|
||||||
android:text="@string/lbl_profile_points"
|
|
||||||
android:textColor="#007197" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/txt_profile_points"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:padding="3dip"
|
|
||||||
android:text="0"
|
|
||||||
android:textColor="#007197" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/lbl_profile_ranking"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:padding="3dip"
|
|
||||||
android:text="@string/lbl_profile_ranking"
|
|
||||||
android:textColor="#007197" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/txt_profile_ranking"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:padding="3dip"
|
|
||||||
android:text="0"
|
|
||||||
android:textColor="#007197" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
<TableRow>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/lbl_profile_numberposts"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:padding="3dip"
|
|
||||||
android:text="@string/lbl_profile_numberposts"
|
|
||||||
android:textColor="#007197" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/txt_profile_numberposts"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:padding="3dip"
|
|
||||||
android:text="0"
|
|
||||||
android:textColor="#007197" />
|
|
||||||
</TableRow>
|
|
||||||
</TableLayout>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<RelativeLayout
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:id="@+id/rl_main_content_2"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:layout_margin="10dp"
|
|
||||||
android:layout_marginBottom="20dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/layout_bg"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="8dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/lbl_profile_top10"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:text="@string/lbl_profile_top10"
|
|
||||||
android:textColor="#000000"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:id="@+id/tableTop10"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@+id/lbl_profile_top10"
|
|
||||||
android:stretchColumns="1">
|
|
||||||
|
|
||||||
<TableRow>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/lbl_ranking"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:padding="3dip"
|
|
||||||
android:text="Ranking"
|
|
||||||
android:textColor="#007197" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/txt_name"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:padding="3dip"
|
|
||||||
android:text="Name"
|
|
||||||
android:textColor="#007197" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/txt_points"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:padding="3dip"
|
|
||||||
android:text="Points"
|
|
||||||
android:textColor="#007197" />
|
|
||||||
</TableRow>
|
|
||||||
|
|
||||||
</TableLayout>
|
|
||||||
</RelativeLayout>
|
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/frag_login_btnGP"
|
android:id="@+id/frag_login_btnGP"
|
||||||
android:name="org.deke.risk.riskahead.fragments.GooglePlusButtonFragment"
|
android:name="org.deke.risk.riskahead.fragment.GooglePlusButtonFragment"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_above="@+id/frag_login_btnTW"
|
android:layout_above="@+id/frag_login_btnTW"
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/frag_login_btnTW"
|
android:id="@+id/frag_login_btnTW"
|
||||||
android:name="org.deke.risk.riskahead.fragments.TwitterButtonFragment"
|
android:name="org.deke.risk.riskahead.fragment.TwitterButtonFragment"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_above="@+id/frag_login_btnFB"
|
android:layout_above="@+id/frag_login_btnFB"
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/frag_login_btnFB"
|
android:id="@+id/frag_login_btnFB"
|
||||||
android:name="org.deke.risk.riskahead.fragments.FacebookButtonFragment"
|
android:name="org.deke.risk.riskahead.fragment.FacebookButtonFragment"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/drawer_layout"
|
android:id="@+id/main_layout"
|
||||||
android:background="@drawable/layout_bg_gradient"
|
android:background="@drawable/layout_bg_gradient"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
@@ -188,14 +189,7 @@
|
|||||||
bootstrap:roundedCorners="true" />
|
bootstrap:roundedCorners="true" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
<ListView
|
|
||||||
android:id="@+id/navList"
|
|
||||||
android:layout_width="200dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_gravity="start"
|
|
||||||
android:background="#ffffff" />
|
|
||||||
|
|
||||||
</android.support.v4.widget.DrawerLayout>
|
|
||||||
|
|||||||
@@ -1,90 +1,95 @@
|
|||||||
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/drawer_layout"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:background="@drawable/layout_bg_gradient"
|
android:id="@+id/main_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/layout_bg_gradient"
|
||||||
|
tools:context=".ReportWFActivity">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
layout="@layout/layout_toolbar"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_centerHorizontal="true" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/layoutMain"
|
android:id="@+id/layoutMain"
|
||||||
android:animateLayoutChanges="true"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_below="@+id/toolbar"
|
||||||
|
android:animateLayoutChanges="true"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<RelativeLayout
|
||||||
android:id="@+id/layoutContent"
|
android:id="@+id/layoutContent"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1">
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/fragment_reportwf"
|
android:id="@+id/fragment_reportwf"
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_weight="1" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/layoutStatus"
|
|
||||||
android:background="#0f4845ff"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:gravity="center_horizontal"
|
android:layout_height="match_parent"
|
||||||
android:animateLayoutChanges="true"
|
android:layout_gravity="center_horizontal" />
|
||||||
android:layout_weight="0">
|
|
||||||
|
|
||||||
<com.beardedhen.androidbootstrap.AwesomeTextView
|
<com.beardedhen.androidbootstrap.AwesomeTextView
|
||||||
android:id="@+id/atvStatus"
|
android:id="@+id/atvStatus"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:padding="5dp"
|
||||||
android:textSize="50dp"
|
android:textSize="50dp"
|
||||||
android:visibility="invisible"
|
|
||||||
bootstrap:bootstrapBrand="success"
|
bootstrap:bootstrapBrand="success"
|
||||||
bootstrap:fontAwesomeIcon="fa_check_circle_o" />
|
bootstrap:fontAwesomeIcon="fa_check_circle_o" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/layoutStatus"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:animateLayoutChanges="true"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/layoutFooter"
|
android:id="@+id/layoutFooter"
|
||||||
android:gravity="center"
|
|
||||||
android:background="@color/bg_common"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_marginBottom="0dp">
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_alignParentLeft="true"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||||
android:id="@+id/btn_reportwf_reportnow"
|
android:id="@+id/btn_reportwf_reportnow"
|
||||||
bootstrap:bootstrapText="Report NOW!"
|
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="40dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:paddingRight="1dp"
|
||||||
bootstrap:bootstrapBrand="danger"
|
bootstrap:bootstrapBrand="danger"
|
||||||
android:layout_weight="1" />
|
bootstrap:bootstrapText="Report NOW!" />
|
||||||
|
|
||||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||||
android:id="@+id/btn_reportwf_next"
|
android:id="@+id/btn_reportwf_next"
|
||||||
bootstrap:bootstrapText="Continue"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_weight="1"
|
||||||
bootstrap:bootstrapBrand="success"
|
bootstrap:bootstrapBrand="success"
|
||||||
android:layout_weight="1" />
|
bootstrap:bootstrapText="Continue" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ListView
|
</RelativeLayout>
|
||||||
android:id="@+id/navList"
|
|
||||||
android:layout_width="200dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_gravity="start"
|
|
||||||
android:background="#ffffff" />
|
|
||||||
|
|
||||||
|
|
||||||
</android.support.v4.widget.DrawerLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:id="@+id/drawer_layout"
|
|
||||||
android:background="#8ae6e6e6"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/layoutContent"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<ListView
|
|
||||||
android:id="@+id/lv_reportlist_list"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<ListView
|
|
||||||
android:id="@+id/navList"
|
|
||||||
android:layout_width="200dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_gravity="start"
|
|
||||||
android:background="#ffffff" />
|
|
||||||
|
|
||||||
</android.support.v4.widget.DrawerLayout>
|
|
||||||
@@ -1,14 +1,24 @@
|
|||||||
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/drawer_layout"
|
android:id="@+id/main_layout"
|
||||||
android:background="@color/bg_common_2"
|
android:background="@drawable/layout_bg_gradient"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".SettingsActivity">
|
tools:context=".SettingsActivity">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
layout="@layout/layout_toolbar"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_centerHorizontal="true" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/layoutMain"
|
android:id="@+id/layoutMain"
|
||||||
|
android:layout_below="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
@@ -22,7 +32,6 @@
|
|||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
android:layout_marginBottom="20dp"
|
android:layout_marginBottom="20dp"
|
||||||
android:padding="8dp"
|
android:padding="8dp"
|
||||||
android:background="@drawable/layout_bg"
|
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -34,6 +43,7 @@
|
|||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/txt_settings_username"
|
android:id="@+id/txt_settings_username"
|
||||||
|
android:text="test"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/lbl_settings_username"
|
android:layout_below="@+id/lbl_settings_username"
|
||||||
@@ -96,42 +106,25 @@
|
|||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_alignParentStart="true" />
|
android:layout_alignParentStart="true" />
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/rl_main_content_2"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:layout_margin="10dp"
|
|
||||||
android:layout_marginBottom="20dp"
|
|
||||||
android:padding="4dp"
|
|
||||||
android:background="@drawable/layout_bg"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/lbl_settings_password"
|
android:id="@+id/lbl_settings_password"
|
||||||
android:text="@string/lbl_settings_password"
|
android:text="@string/lbl_settings_password"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp" />
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_below="@+id/txt_settings_email"
|
||||||
|
android:layout_alignLeft="@+id/txt_settings_email"
|
||||||
|
android:layout_alignStart="@+id/txt_settings_email" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/txt_settings_password"
|
android:id="@+id/txt_settings_password"
|
||||||
android:inputType="textPassword"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@+id/lbl_settings_password" />
|
|
||||||
|
|
||||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
|
||||||
android:id="@+id/btn_settings_req_password"
|
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
bootstrap:bootstrapText="@string/btn_settings_req_password"
|
android:ems="8"
|
||||||
bootstrap:bootstrapBrand="primary"
|
android:layout_below="@+id/lbl_settings_password"
|
||||||
bootstrap:roundedCorners="true"
|
android:layout_alignLeft="@+id/lbl_settings_password"
|
||||||
android:layout_below="@+id/txt_settings_password" />
|
android:layout_alignStart="@+id/lbl_settings_password" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -142,23 +135,26 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_marginBottom="0dp">
|
android:layout_marginBottom="0dp">
|
||||||
|
|
||||||
|
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||||
|
android:id="@+id/btn_settings_req_password"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
bootstrap:bootstrapText="@string/btn_settings_req_password"
|
||||||
|
bootstrap:bootstrapBrand="primary"
|
||||||
|
bootstrap:roundedCorners="true"/>
|
||||||
|
|
||||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||||
android:id="@+id/btn_settings_change"
|
android:id="@+id/btn_settings_change"
|
||||||
bootstrap:bootstrapText="@string/btn_settings_change"
|
bootstrap:bootstrapText="@string/btn_settings_change"
|
||||||
android:minWidth="180dp"
|
android:layout_weight="1"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
bootstrap:bootstrapBrand="primary"
|
bootstrap:bootstrapBrand="primary"
|
||||||
bootstrap:roundedCorners="true"/>
|
bootstrap:roundedCorners="true"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ListView
|
</RelativeLayout>
|
||||||
android:id="@+id/navList"
|
|
||||||
android:layout_width="200dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_gravity="start"
|
|
||||||
android:background="#ffffff" />
|
|
||||||
|
|
||||||
</android.support.v4.widget.DrawerLayout>
|
|
||||||
@@ -1,13 +1,24 @@
|
|||||||
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/drawer_layout"
|
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
||||||
android:background="#8ae6e6e6"
|
android:id="@+id/main_layout"
|
||||||
|
android:background="@drawable/layout_bg_gradient"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".SubscriptionsActivity">
|
tools:context=".SubscriptionsActivity">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
layout="@layout/layout_toolbar"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_centerHorizontal="true" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/layoutMain"
|
android:id="@+id/layoutMain"
|
||||||
|
android:layout_below="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
@@ -106,17 +117,8 @@
|
|||||||
|
|
||||||
</TableLayout>
|
</TableLayout>
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ListView
|
</RelativeLayout>
|
||||||
android:id="@+id/navList"
|
|
||||||
android:layout_width="200dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_gravity="start"
|
|
||||||
android:background="#ffffff" />
|
|
||||||
|
|
||||||
</android.support.v4.widget.DrawerLayout>
|
|
||||||
@@ -1,14 +1,24 @@
|
|||||||
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/drawer_layout"
|
android:id="@+id/main_layout"
|
||||||
android:background="#8ae6e6e6"
|
android:background="@drawable/layout_bg_gradient"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".ViewReportActivity">
|
tools:context=".ViewReportActivity">
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
layout="@layout/layout_toolbar"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_centerHorizontal="true" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/layoutMain"
|
android:id="@+id/layoutMain"
|
||||||
|
android:layout_below="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
@@ -234,11 +244,4 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ListView
|
</RelativeLayout>
|
||||||
android:id="@+id/navList"
|
|
||||||
android:layout_width="200dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_gravity="start"
|
|
||||||
android:background="#ffffff" />
|
|
||||||
|
|
||||||
</android.support.v4.widget.DrawerLayout>
|
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
xmlns:fb="http://schemas.android.com/apk/res-auto"
|
xmlns:fb="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context="org.deke.risk.riskahead.fragments.FacebookButtonFragment">
|
tools:context="org.deke.risk.riskahead.fragment.FacebookButtonFragment">
|
||||||
|
|
||||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||||
android:id="@+id/btn_login_fb"
|
android:id="@+id/btn_login_fb"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context="org.deke.risk.riskahead.fragments.GooglePlusButtonFragment">
|
tools:context="org.deke.risk.riskahead.fragment.GooglePlusButtonFragment">
|
||||||
|
|
||||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||||
android:id="@+id/btn_login_gp"
|
android:id="@+id/btn_login_gp"
|
||||||
|
|||||||
143
app/src/main/res/layout/fragment_profile_stats.xml
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/layoutContent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:background="@drawable/layout_bg_gradient"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_centerInParent="true">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/lbl_main_txt1"
|
||||||
|
android:text="You have currently..."
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:textColor="#aa999999"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_profile_points"
|
||||||
|
android:text="0"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/lbl_main_txt1"
|
||||||
|
android:textSize="30sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/llb_fff"
|
||||||
|
android:text="points"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:textColor="#aa999999"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:layout_alignBottom="@+id/txt_profile_points"
|
||||||
|
android:layout_toRightOf="@+id/txt_profile_points"
|
||||||
|
android:layout_toEndOf="@+id/txt_profile_points" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/lbl_main_txt2"
|
||||||
|
android:text="from a total of..."
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_below="@id/txt_profile_points"
|
||||||
|
android:textColor="#aa999999"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_profile_numberposts"
|
||||||
|
android:text="0"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/lbl_main_txt2"
|
||||||
|
android:textSize="30sp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/llb_ffff"
|
||||||
|
android:text="reported incidents"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:textColor="#aa999999"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:layout_alignBottom="@+id/txt_profile_numberposts"
|
||||||
|
android:layout_toRightOf="@+id/txt_profile_numberposts"
|
||||||
|
android:layout_toEndOf="@+id/txt_profile_numberposts" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/lbl_main_txt3"
|
||||||
|
android:text="and your rank is..."
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_below="@id/txt_profile_numberposts"
|
||||||
|
android:textColor="#aa999999"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_profile_ranking"
|
||||||
|
android:text="0"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="30sp"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_below="@+id/lbl_main_txt3"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/lbl_main_txt4"
|
||||||
|
android:text="You are supporting RiskAhead since"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
|
android:layout_marginTop="50dp"
|
||||||
|
android:layout_above="@+id/txt_profile_membersince"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:textColor="#aa999999"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_profile_membersince"
|
||||||
|
android:text="0"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_above="@+id/lbl_main_txt5"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/lbl_main_txt5"
|
||||||
|
android:text="Thank you!"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:textColor="#aa999999"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
18
app/src/main/res/layout/fragment_reportlist.xml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/layoutContent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:background="@drawable/layout_bg_gradient"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ListView
|
||||||
|
android:id="@+id/lv_reportlist_list"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
@@ -6,6 +6,12 @@
|
|||||||
android:padding="5dp"
|
android:padding="5dp"
|
||||||
android:weightSum="1">
|
android:weightSum="1">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:id="@+id/ic_reportlist_row"/>
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
17
app/src/main/res/layout/fragment_top10list.xml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<LinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/layoutContent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:background="@drawable/layout_bg_gradient"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<ListView
|
||||||
|
android:id="@+id/lv_top10list"
|
||||||
|
android:layout_below="@id/txt_profile_ranking"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
79
app/src/main/res/layout/fragment_top10list_row.xml
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:background="#00000000"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingRight="10dp"
|
||||||
|
android:weightSum="3">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_top10_rank"
|
||||||
|
android:text="#0"
|
||||||
|
android:textColor="@color/md_black_1000"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="30sp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:paddingRight="20dp"
|
||||||
|
android:layout_weight="0"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="3">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#a6000000"
|
||||||
|
android:id="@+id/txt_top10_name"
|
||||||
|
android:text="Member name"
|
||||||
|
android:textSize="16dp"
|
||||||
|
android:typeface="serif" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#b9000000"
|
||||||
|
android:text="Reported Incidents"
|
||||||
|
android:id="@+id/txt_top10_numberOfIncidents"
|
||||||
|
android:typeface="serif" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="#b9000000"
|
||||||
|
android:text="Member since"
|
||||||
|
android:id="@+id/txt_top10_membersince"
|
||||||
|
android:typeface="serif" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/txt_top10_points"
|
||||||
|
android:text="0"
|
||||||
|
android:textColor="@color/md_black_1000"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="30sp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_weight="0"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/llb_fff"
|
||||||
|
android:text="pts"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||||
|
android:textColor="#aa999999"
|
||||||
|
android:textSize="15sp"
|
||||||
|
android:layout_gravity="center" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
xmlns:bootstrap="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context="org.deke.risk.riskahead.fragments.TwitterButtonFragment">
|
tools:context="org.deke.risk.riskahead.fragment.TwitterButtonFragment">
|
||||||
|
|
||||||
<com.beardedhen.androidbootstrap.BootstrapButton
|
<com.beardedhen.androidbootstrap.BootstrapButton
|
||||||
android:id="@+id/btn_login_twitter"
|
android:id="@+id/btn_login_twitter"
|
||||||
|
|||||||
11
app/src/main/res/layout/layout_toolbar.xml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<android.support.v7.widget.Toolbar
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="?attr/actionBarSize"
|
||||||
|
android:background="?attr/colorPrimary"
|
||||||
|
android:theme="@style/MyRiskAheadToolbar"
|
||||||
|
app:popupTheme="@style/Theme.AppCompat.Light.NoActionBar"
|
||||||
|
android:elevation="4dp"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto" />
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="?android:attr/activatedBackgroundIndicator"
|
|
||||||
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
|
||||||
android:padding="10dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/imageViewIcon"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:paddingRight="10dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textViewName"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_toRightOf="@+id/imageViewIcon"
|
|
||||||
android:paddingRight="10dp"
|
|
||||||
android:text="Folder name here."
|
|
||||||
android:textAppearance="?android:attr/textAppearanceListItemSmall"
|
|
||||||
android:textColor="#000000" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
@@ -3,13 +3,8 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<item android:id="@+id/menu_btn_gotostart"
|
<item android:id="@+id/menu_btn_gotostart"
|
||||||
android:title="New Report"
|
android:icon="@android:drawable/ic_menu_revert"
|
||||||
android:icon="@drawable/ic_action_reply_all"
|
app:showAsAction="always"
|
||||||
app:showAsAction="always"/>
|
android:title="New" />
|
||||||
|
|
||||||
<item android:id="@+id/menu_btn_goback"
|
|
||||||
android:title="New Report"
|
|
||||||
android:icon="@drawable/ic_action_reply"
|
|
||||||
app:showAsAction="always"/>
|
|
||||||
|
|
||||||
</menu>
|
</menu>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">RiskAhead</string>
|
<string name="app_name">RiskAhead</string>
|
||||||
<string name="facebook_app_id">658657714234846</string>
|
<string name="facebook_app_id">658657714234846</string>
|
||||||
|
<string name="banner_ad_unit_id">ca-app-pub-3940256099942544/6300978111</string>
|
||||||
|
|
||||||
<string name="btn_start_login">Login</string>
|
<string name="btn_start_login">Login</string>
|
||||||
<string name="btn_start_register">Register</string>
|
<string name="btn_start_register">Register</string>
|
||||||
@@ -77,17 +78,17 @@
|
|||||||
<string name="lbl_profile_top10">Top 10</string>
|
<string name="lbl_profile_top10">Top 10</string>
|
||||||
|
|
||||||
<string name="lbl_settings_password">Confirm Password</string>
|
<string name="lbl_settings_password">Confirm Password</string>
|
||||||
<string name="btn_settings_req_password">{fa_envelope} Request New Password</string>
|
<string name="btn_settings_req_password">{fa_envelope} Reset Password</string>
|
||||||
<string name="lbl_settings_retype_password">Retype Password</string>
|
<string name="lbl_settings_retype_password">Retype Password</string>
|
||||||
|
|
||||||
<string name="btn_maps_confirm_position">{fa_paint_brush} Report this position!</string>
|
<string name="btn_maps_confirm_position">{fa_paint_brush} Report this position!</string>
|
||||||
|
|
||||||
<string name="navigation_start">Start</string>
|
<string name="navigation_start">Home</string>
|
||||||
<string name="navigation_report">Report</string>
|
<string name="navigation_report">Incident Report</string>
|
||||||
<string name="navigation_incident_map">Incident Map</string>
|
<string name="navigation_incident_map">Incident Map</string>
|
||||||
<string name="navigation_user_stats">User Statistics</string>
|
<string name="navigation_user_stats">User Statistics</string>
|
||||||
<string name="navigation_acc_settings">Account Settings</string>
|
<string name="navigation_acc_settings">Account Settings</string>
|
||||||
<string name="navigation_settings">Settings</string>
|
<string name="navigation_subscriptions">Subscriptions</string>
|
||||||
<string name="navigation_logout">Logout</string>
|
<string name="navigation_logout">Logout</string>
|
||||||
|
|
||||||
<string name="share_item_text">I recommend RiskAhead!</string>
|
<string name="share_item_text">I recommend RiskAhead!</string>
|
||||||
@@ -109,5 +110,118 @@
|
|||||||
<string name="alert_accactivation_confirmation">E-Mail was sent to your e-mail address</string>
|
<string name="alert_accactivation_confirmation">E-Mail was sent to your e-mail address</string>
|
||||||
<string name="alert_accregistration_title">Activation E-Mail</string>
|
<string name="alert_accregistration_title">Activation E-Mail</string>
|
||||||
<string name="alert_accregistration_text">An activation link was send to your e-mail address. Please follow the instructions to activate your account. Thank you!</string>
|
<string name="alert_accregistration_text">An activation link was send to your e-mail address. Please follow the instructions to activate your account. Thank you!</string>
|
||||||
|
<string name="alert_internetconnection_title">No Internet Connection</string>
|
||||||
|
<string name="alert_internetconnection_text">You need an active internet connection to use this app. Please turn on your internet connection and login again.</string>
|
||||||
|
<string name="errormsg_couldnotretrieve">Could not retrieve data from server. Please check internet connection.</string>
|
||||||
|
<string name="progress_getdata_text">Please wait...</string>
|
||||||
|
<string name="progress_getdata_title">Retrieve data from server</string>
|
||||||
|
<string name="lbl_mapsinfowindow_author">Author</string>
|
||||||
|
<string name="lbl_mapsinfowindow_score">Score</string>
|
||||||
|
<string name="title_activity_report_wf">Report NEW</string>
|
||||||
|
|
||||||
|
<string name="lbl_spinner_choose">Please choose...</string>
|
||||||
|
<string name="lbl_report_from_date">From date (yyyy-MM-dd)</string>
|
||||||
|
<string name="lbl_report_from_time">From time</string>
|
||||||
|
<string name="lbl_report_to_date">To date (yyyy-MM-dd)</string>
|
||||||
|
<string name="lbl_report_to_time">To time</string>
|
||||||
|
|
||||||
|
<string-array name="cat_situation_main">
|
||||||
|
<item>Allgemeiner Vorfall/Situation</item>
|
||||||
|
<item>Mündliche Gewalt</item>
|
||||||
|
<item>Leichte bis schwere körperliche Gewalt</item>
|
||||||
|
<item>Lebensgefährliche Gewalt</item>
|
||||||
|
<item>Naturkatastrophe</item>
|
||||||
|
<item>Menschliche Katastrophe & Infrastruktur</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="cat_situation_sub_general">
|
||||||
|
<item>Diebstahl, Betrug</item>
|
||||||
|
<item>Drogen in Getränk/Speise, Drogenmissbrauch</item>
|
||||||
|
<item>Demonstration, Unruhen, Straßenblockade</item>
|
||||||
|
<item>Checkpoint, Kontrollen</item>
|
||||||
|
<item>Korruption, Erpressung, Schutzgeld</item>
|
||||||
|
<item>Einflussgebiet Kriminalität, Milizen, Terroristen</item>
|
||||||
|
<item>Sonstiges...</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="cat_situation_sub_verbal">
|
||||||
|
<item>Sexuelle Belästigung</item>
|
||||||
|
<item>Beleidigung, Drohung</item>
|
||||||
|
<item>Vernehmung/Befragung öffentlich</item>
|
||||||
|
<item>Aufhetzung</item>
|
||||||
|
<item>Sonstiges...</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="cat_situation_sub_force">
|
||||||
|
<item>Sexueller Übergriff</item>
|
||||||
|
<item>Angriff auf Person allgemein</item>
|
||||||
|
<item>Schlägerei</item>
|
||||||
|
<item>Festnahme/Gefangennahme </item>
|
||||||
|
<item>Zwangsarbeit</item>
|
||||||
|
<item>Sonstiges...</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="cat_situation_sub_force_serious">
|
||||||
|
<item>Vergewaltigung</item>
|
||||||
|
<item>Folter, Entführung, Geiselnahme</item>
|
||||||
|
<item>Schießerei</item>
|
||||||
|
<item>Explosion, Selbstmordattentat</item>
|
||||||
|
<item>Mord, Tötung, Hinrichtung</item>
|
||||||
|
<item>Leichenzurschaustellung zur Abschreckung</item>
|
||||||
|
<item>Sonstiges...</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="cat_situation_sub_nature">
|
||||||
|
<item>Temperaturextrem</item>
|
||||||
|
<item>Wind, Sturm, Orkan, Tornado</item>
|
||||||
|
<item>Überschwemmung/-flutung</item>
|
||||||
|
<item>Erdbeben, Berghang Einsturz</item>
|
||||||
|
<item>Feuer, Rauch-, Aschewolken, Vulkanausbruch</item>
|
||||||
|
<item>Hungersnot, Tierplage</item>
|
||||||
|
<item>Sonstiges...</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="cat_situation_sub_infrastructure">
|
||||||
|
<item>Smog Stadt</item>
|
||||||
|
<item>Stromausfall, Unfall</item>
|
||||||
|
<item>Zerstörung, Einsturzgefahr Gebäude</item>
|
||||||
|
<item>Brandkatastrophe</item>
|
||||||
|
<item>Chemiekatastrophe, Ölpest</item>
|
||||||
|
<item>Seuche, Krankheit</item>
|
||||||
|
<item>Chaos Bevölkerung</item>
|
||||||
|
<item>Sonstiges...</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="cat_time_main">
|
||||||
|
<item>Jetzt!</item>
|
||||||
|
<item>Regelmäßig</item>
|
||||||
|
<item>Bestimmter Zeitpunkt</item>
|
||||||
|
<item>Bestimmter Zeitraum</item>
|
||||||
|
<item>Weiß ich nicht</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="cat_time_sub_periodical">
|
||||||
|
<item>Vormittags</item>
|
||||||
|
<item>Tagsüber</item>
|
||||||
|
<item>Abends</item>
|
||||||
|
<item>Nachts</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="cat_suspect_main">
|
||||||
|
<item>Straßenkriminelle/Gangs</item>
|
||||||
|
<item>Polizei</item>
|
||||||
|
<item>Volksmenge</item>
|
||||||
|
<item>Miliz, Kartell, Guerilla (Paramilitär)</item>
|
||||||
|
<item>Soldaten (Militär)</item>
|
||||||
|
<item>Terroristen (religiöse oder politische)</item>
|
||||||
|
<item>Sonstige:…</item>
|
||||||
|
<item>Weiß ich nicht</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="cat_suspect_sub_location">
|
||||||
|
<item>Lokale aus dem Land (National)</item>
|
||||||
|
<item>Ausländische</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
<string name="lbl_main_txt1">We have currently ...</string>
|
<string name="lbl_main_txt1">We have currently ...</string>
|
||||||
<string name="lbl_main_txt2">... reported incidents</string>
|
<string name="lbl_main_txt2">... reported incidents</string>
|
||||||
<string name="btn_main_report">{fa_map_marker} Report</string>
|
<string name="btn_main_report">{fa_map_marker} Report</string>
|
||||||
<string name="btn_main_viewmap">{fa_info} View Map</string>
|
<string name="btn_main_viewmap">{fa_map} View Map</string>
|
||||||
|
|
||||||
<string name="input_report_short_hint">Short Description</string>
|
<string name="input_report_short_hint">Short Description</string>
|
||||||
<string name="input_report_long_hint">Long Descpription</string>
|
<string name="input_report_long_hint">Long Descpription</string>
|
||||||
@@ -78,17 +78,17 @@
|
|||||||
<string name="lbl_profile_top10">Top 10</string>
|
<string name="lbl_profile_top10">Top 10</string>
|
||||||
|
|
||||||
<string name="lbl_settings_password">Confirm Password</string>
|
<string name="lbl_settings_password">Confirm Password</string>
|
||||||
<string name="btn_settings_req_password">{fa_envelope} Request New Password</string>
|
<string name="btn_settings_req_password">{fa_envelope} Reset Password</string>
|
||||||
<string name="lbl_settings_retype_password">Retype Password</string>
|
<string name="lbl_settings_retype_password">Retype Password</string>
|
||||||
|
|
||||||
<string name="btn_maps_confirm_position">{fa_paint_brush} Report this position!</string>
|
<string name="btn_maps_confirm_position">{fa_paint_brush} Report this position!</string>
|
||||||
|
|
||||||
<string name="navigation_start">Start</string>
|
<string name="navigation_start">Home</string>
|
||||||
<string name="navigation_report">Report</string>
|
<string name="navigation_report">Incident Report</string>
|
||||||
<string name="navigation_incident_map">Incident Map</string>
|
<string name="navigation_incident_map">Incident Map</string>
|
||||||
<string name="navigation_user_stats">User Statistics</string>
|
<string name="navigation_user_stats">User Statistics</string>
|
||||||
<string name="navigation_acc_settings">Account Settings</string>
|
<string name="navigation_acc_settings">Account Settings</string>
|
||||||
<string name="navigation_settings">Settings</string>
|
<string name="navigation_subscriptions">Subscriptions</string>
|
||||||
<string name="navigation_logout">Logout</string>
|
<string name="navigation_logout">Logout</string>
|
||||||
|
|
||||||
<string name="share_item_text">I recommend RiskAhead!</string>
|
<string name="share_item_text">I recommend RiskAhead!</string>
|
||||||
|
|||||||
@@ -5,16 +5,51 @@
|
|||||||
<item name="android:layout_marginRight">@dimen/micro_padding</item>
|
<item name="android:layout_marginRight">@dimen/micro_padding</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="MyRiskAheadTheme" parent="Theme.AppCompat.Light">
|
<style name="MyRiskAheadTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">
|
||||||
<item name="colorPrimary">@color/bg_common</item>
|
<item name="android:textViewStyle">@style/App_TextViewStyle</item>
|
||||||
<item name="android:textColorPrimary">@color/actionbar_text</item>
|
|
||||||
<item name="colorPrimaryDark">@color/bg_common_2</item>
|
|
||||||
<item name="android:textColor">@color/common_text</item>
|
|
||||||
<item name="android:editTextStyle">@style/App_EditTextStyle</item>
|
<item name="android:editTextStyle">@style/App_EditTextStyle</item>
|
||||||
|
<!-- ...and here we setting appcompat’s color theme attrs -->
|
||||||
|
<item name="colorPrimary">@color/bg_common</item>
|
||||||
|
<item name="colorPrimaryDark">@color/bg_common_2</item>
|
||||||
|
<item name="colorAccent">#02A8F3</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="MyRiskAheadToolbar" parent="Theme.AppCompat.NoActionBar">
|
||||||
|
<!-- android:textColorPrimary is the color of the title text
|
||||||
|
in the Toolbar, in the Theme.AppCompat theme: -->
|
||||||
|
<item name="android:textColorPrimary">@color/actionbar_text</item>
|
||||||
|
<item name="colorPrimary">@color/bg_common</item>
|
||||||
|
<item name="colorPrimaryDark">@color/bg_common_2</item>
|
||||||
|
<!-- android:textColorPrimaryInverse is the color of the title
|
||||||
|
text in the Toolbar, in the Theme.AppCompat.Light theme: -->
|
||||||
|
<!-- <item name="android:textColorPrimaryInverse">@color/abc_primary_text_material_light</item> -->
|
||||||
|
|
||||||
|
<!-- android:actionMenuTextColor is the color of the text of
|
||||||
|
action (menu) items in the Toolbar, at least in the
|
||||||
|
Theme.AppCompat theme.
|
||||||
|
For some reason, they already get the textColorPrimary
|
||||||
|
when running on API 21, but not on older versions of
|
||||||
|
Android, so this is only necessary to support older
|
||||||
|
Android versions.-->
|
||||||
|
<item name="actionMenuTextColor">@color/abc_primary_text_material_light</item>
|
||||||
|
<!-- android:textColorSecondary is the color of the menu
|
||||||
|
overflow icon (three vertical dots) -->
|
||||||
|
<item name="android:textColorSecondary">@color/actionbar_text</item>
|
||||||
|
|
||||||
|
<!-- This would set the toolbar's background color,
|
||||||
|
but setting this also changes the popup menu's background,
|
||||||
|
even if we define popupTheme for our <Toolbar> -->
|
||||||
|
<!-- <item name="android:background">@color/color_primary</item> -->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="App_EditTextStyle" parent="@android:style/Widget.EditText">
|
<style name="App_EditTextStyle" parent="@android:style/Widget.EditText">
|
||||||
<item name="android:textColor">@color/common_text</item>
|
<item name="android:textColor">@color/common_text</item>
|
||||||
|
<item name="android:fontFamily" tools:targetApi="jelly_bean">sans-serif</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="App_TextViewStyle" parent="@android:style/Widget.TextView">
|
||||||
|
<item name="android:textColor">@color/common_text</item>
|
||||||
|
<item name="android:fontFamily" tools:targetApi="jelly_bean">sans-serif</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||