DT @05.01.2016: Bugfixes and Icons added

This commit is contained in:
Dennis Thießen
2016-01-05 22:25:24 +01:00
parent 405ff4bc91
commit 0266439b2b
134 changed files with 99 additions and 36 deletions

BIN
app/app-release.apk Normal file

Binary file not shown.

View File

@@ -19,8 +19,8 @@ android {
applicationId "org.deke.risk.riskahead"
minSdkVersion 15
targetSdkVersion 22
versionCode 2
versionName "1.1"
versionCode 3
versionName "1.2"
}
buildTypes {
release {

View File

@@ -103,6 +103,8 @@ public class ReportWF_3_Fragment extends Fragment {
if (stringId != 0) {
suspectSubCategory.setVisibility(View.VISIBLE);
setSubSpinnerValues(stringId);
}else{
suspectSubCategory.setVisibility(View.INVISIBLE);
}
if (position != ETC){

View File

@@ -12,6 +12,10 @@ import org.deke.risk.riskahead.R;
import org.json.JSONException;
import org.json.JSONObject;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* Created by Dennis on 12.11.2015.
*/
@@ -131,61 +135,118 @@ public class IncidentReport implements ClusterItem {
}
public BitmapDescriptor getIcon() {
BitmapDescriptor mIcon;
switch (Integer.valueOf(this.fidIncidentCategory)) {
case 1:
mIcon = BitmapDescriptorFactory.fromResource(R.drawable.icon_general);
break;
case 2:
mIcon = BitmapDescriptorFactory.fromResource(R.drawable.icon_verbal);
break;
case 3:
mIcon = BitmapDescriptorFactory.fromResource(R.drawable.icon_middle_violance);
break;
case 4:
mIcon = BitmapDescriptorFactory.fromResource(R.drawable.icon_high_violance);
break;
case 5:
mIcon = BitmapDescriptorFactory.fromResource(R.drawable.icon_nature);
break;
case 6:
mIcon = BitmapDescriptorFactory.fromResource(R.drawable.icon_infra_v2);
break;
default:
mIcon = BitmapDescriptorFactory.fromResource(R.drawable.icon_general);
break;
}
return mIcon;
return BitmapDescriptorFactory.fromResource(getIconDrawable());
}
public int getIconDrawable() {
int mIcon;
switch (Integer.valueOf(this.fidIncidentCategory)) {
Date tmpFromDate = null;
Date today = new Date();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
try {
tmpFromDate = simpleDateFormat.parse(this.fromDate);
} catch (ParseException e) {
e.printStackTrace();
}
switch (this.fidIncidentCategory) {
case 1:
mIcon = R.drawable.icon_general;
if(tmpFromDate != null && tmpFromDate.after(today)){
if(fidVictimCategory == 1){
mIcon = R.drawable.icon_general_w_f;
}else{
mIcon = R.drawable.icon_general_f;
}
}else{
if(fidVictimCategory == 1){
mIcon = R.drawable.icon_general_w;
}else{
mIcon = R.drawable.icon_general;
}
}
break;
case 2:
mIcon = R.drawable.icon_verbal;
if(tmpFromDate != null && tmpFromDate.after(today)){
if(fidVictimCategory == 1){
mIcon = R.drawable.icon_verbal_w_f;
}else{
mIcon = R.drawable.icon_verbal_f;
}
}else{
if(fidVictimCategory == 1){
mIcon = R.drawable.icon_verbal_w;
}else{
mIcon = R.drawable.icon_verbal;
}
}
break;
case 3:
mIcon = R.drawable.icon_middle_violance;
if(tmpFromDate != null && tmpFromDate.after(today)){
if(fidVictimCategory == 1){
mIcon = R.drawable.icon_middle_violance_w_f;
}else{
mIcon = R.drawable.icon_middle_violance_f;
}
}else{
if(fidVictimCategory == 1){
mIcon = R.drawable.icon_middle_violance_w;
}else{
mIcon = R.drawable.icon_middle_violance;
}
}
break;
case 4:
mIcon = R.drawable.icon_high_violance;
if(tmpFromDate != null && tmpFromDate.after(today)){
if(fidVictimCategory == 1){
mIcon = R.drawable.icon_high_violance_w_f;
}else{
mIcon = R.drawable.icon_high_violance_f;
}
}else{
if(fidVictimCategory == 1){
mIcon = R.drawable.icon_high_violance_w;
}else{
mIcon = R.drawable.icon_high_violance;
}
}
break;
case 5:
mIcon = R.drawable.icon_nature;
if(tmpFromDate != null && tmpFromDate.after(today)){
if(fidVictimCategory == 1){
mIcon = R.drawable.icon_nature_w_f;
}else{
mIcon = R.drawable.icon_nature_f;
}
}else{
if(fidVictimCategory == 1){
mIcon = R.drawable.icon_nature_w;
}else{
mIcon = R.drawable.icon_nature;
}
}
break;
case 6:
mIcon = R.drawable.icon_infra_v2;
if(tmpFromDate != null && tmpFromDate.after(today)){
if(fidVictimCategory == 1){
mIcon = R.drawable.icon_infra_v2_w_f;
}else{
mIcon = R.drawable.icon_infra_v2_f;
}
}else{
if(fidVictimCategory == 1){
mIcon = R.drawable.icon_infra_v2_w;
}else{
mIcon = R.drawable.icon_infra_v2;
}
}
break;
default:
mIcon = R.drawable.icon_general;
break;
}
return mIcon;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 907 B

After

Width:  |  Height:  |  Size: 897 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 857 B

After

Width:  |  Height:  |  Size: 849 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 983 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1016 B

After

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 929 B

After

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 910 B

After

Width:  |  Height:  |  Size: 901 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 897 B

After

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Some files were not shown because too many files have changed in this diff Show More