Skip to content

Commit

Permalink
Merge pull request #96 from Zolon-DOL/master
Browse files Browse the repository at this point in the history
Sprint 4
  • Loading branch information
pbhatt17 authored Sep 4, 2020
2 parents 5718952 + 3ac6f60 commit b92b413
Show file tree
Hide file tree
Showing 61 changed files with 32,789 additions and 31,824 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
# Child-Labor-Android

Android version of Child Labor app.

## Analytics
### Screen View Data Model
* Index Screen
* Countries List Screen
* Goods List Screen
* Exploitation Screen
* Country Profile Screen
* Good Profile Screen
* Suggested Actions Screen
* Statistics Screen
* Conventions Screen
* Laws Screen
* Full Report Screen

iOS version is available at https://github.com/USDepartmentofLabor/Child-Labor
14 changes: 8 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
compileSdkVersion 26
// buildToolsVersion "26.0.1"
buildToolsVersion "26.0.2"
compileSdkVersion 29
// buildToolsVersion "26.0.1"
buildToolsVersion "29.0.2"
// new line added fro error Execution failed for task ':app:lint'.
lintOptions {
abortOnError false
}
defaultConfig {
applicationId "gov.dol.childlabor"
minSdkVersion 16
targetSdkVersion 26
targetSdkVersion 29
versionCode 6
versionName "1.8"
}
Expand All @@ -29,8 +29,10 @@ android {
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:design:26.1.0'
// compile 'com.android.support:appcompat-v7:26.1.0'
// compile 'com.android.support:design:26.1.0'
compile 'androidx.appcompat:appcompat:1.0.0'
compile 'com.google.android.material:material:1.0.0'
compile 'com.joanzapata.pdfview:android-pdfview:1.0.4@aar'
compile 'se.emilsjolander:stickylistheaders:2.7.0'
compile 'com.google.android.gms:play-services-analytics:8.1.0'
Expand Down
63,657 changes: 32,305 additions & 31,352 deletions app/src/main/assets/countries_2019.xml

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions app/src/main/assets/goods_2019.xml
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@
<Forced_Child_Labor>No</Forced_Child_Labor>
</Country>
<Country>
<Country_Name>Cote d'Ivoire</Country_Name>
<Country_Name>Côte d'Ivoire</Country_Name>
<Country_Region>Sub-Saharan Africa</Country_Region>
<Child_Labor>Yes</Child_Labor>
<Forced_Labor>Yes</Forced_Labor>
Expand Down Expand Up @@ -920,7 +920,7 @@
<Forced_Child_Labor>No</Forced_Child_Labor>
</Country>
<Country>
<Country_Name>Cote d'Ivoire</Country_Name>
<Country_Name>Côte d'Ivoire</Country_Name>
<Country_Region>Sub-Saharan Africa</Country_Region>
<Child_Labor>Yes</Child_Labor>
<Forced_Labor>Yes</Forced_Labor>
Expand Down Expand Up @@ -2480,6 +2480,13 @@
<Forced_Labor>Yes</Forced_Labor>
<Forced_Child_Labor>No</Forced_Child_Labor>
</Country>
<Country>
<Country_Name>Sierra Leone</Country_Name>
<Country_Region>Sub-Saharan Africa</Country_Region>
<Child_Labor>Yes</Child_Labor>
<Forced_Labor>No</Forced_Labor>
<Forced_Child_Labor>No</Forced_Child_Labor>
</Country>
</Countries>
</Good>
<Good>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/gov/dol/childlabor/AboutActivity.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gov.dol.childlabor;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.webkit.WebView;

public class AboutActivity extends AppCompatActivity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

import android.graphics.Color;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.View;
Expand Down Expand Up @@ -51,7 +50,7 @@ protected void onCreate(Bundle savedInstanceState) {
private void setMultipleTerritoryValues(Hashtable<String, Country.TerritoryStandard> territoryStandards) {
displayTerritories((LinearLayout) findViewById(R.id.minimumWorkLinearLayout), territoryStandards.get("Minimum_Work"));
displayTerritories((LinearLayout) findViewById(R.id.minimumHazardWorkLinearLayout), territoryStandards.get("Minimum_Hazardous_Work"));
// displayTerritories((LinearLayout) findViewById(R.id.compulsoryMilitaryLinearLayout), territoryStandards.get("Minimum_Compulsory_Military"));
displayTerritories((LinearLayout) findViewById(R.id.compulsoryMilitaryLinearLayout), territoryStandards.get("Minimum_Compulsory_Military"));
displayTerritories((LinearLayout) findViewById(R.id.voluntaryMilitaryLinearLayout), territoryStandards.get("Minumum_Voluntary_Military"));
displayTerritories((LinearLayout) findViewById(R.id.nsCompulsoryMilitaryLinearLayout), territoryStandards.get("Minumum_Non_State_Military"));
displayTerritories((LinearLayout) findViewById(R.id.typesHazardousWorkLinearLayout), territoryStandards.get("Types_Hazardous_Work"));
Expand All @@ -66,7 +65,7 @@ private void setMultipleTerritoryValues(Hashtable<String, Country.TerritoryStand
private void setSingleTerritoryValues(Hashtable<String, Country.Standard> standards) {
displayStandard((TextView) findViewById(R.id.minimumWorkTextView), standards.get("Minimum_Work"));
displayStandard((TextView) findViewById(R.id.minimumHazardWorkTextView), standards.get("Minimum_Hazardous_Work"));
// displayStandard((TextView) findViewById(R.id.compulsoryMilitaryTextView), standards.get("Minimum_Compulsory_Military"));
displayStandard((TextView) findViewById(R.id.compulsoryMilitaryTextView), standards.get("Minimum_Compulsory_Military"));
displayStandard((TextView) findViewById(R.id.voluntaryMilitaryTextView), standards.get("Minumum_Voluntary_Military"));
displayStandard((TextView) findViewById(R.id.nsCompulsoryMilitaryTextView), standards.get("Minumum_Non_State_Military"));
displayStandard((TextView) findViewById(R.id.typesHazardousWorkTextView), standards.get("Types_Hazardous_Work"));
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/gov/dol/childlabor/ConventionActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import android.graphics.Color;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.widget.TextView;

public class ConventionActivity extends AppCompatActivity {
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/gov/dol/childlabor/CountryViewActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.AdapterView;
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/gov/dol/childlabor/CustomViewPager.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gov.dol.childlabor;

import android.content.Context;
import android.support.v4.view.ViewPager;
import androidx.viewpager.widget.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/gov/dol/childlabor/FactsheetActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/gov/dol/childlabor/FullReportActivity.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gov.dol.childlabor;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;

Expand Down
5 changes: 2 additions & 3 deletions app/src/main/java/gov/dol/childlabor/GoodViewActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityEvent;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import android.graphics.Color;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.text.Html;
import android.widget.TextView;

Expand Down
15 changes: 4 additions & 11 deletions app/src/main/java/gov/dol/childlabor/MainActivity.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package gov.dol.childlabor;

import android.content.Intent;
import android.content.res.AssetManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
Expand All @@ -16,14 +15,8 @@
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import android.view.View.OnClickListener;
import android.widget.Button;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public class MainActivity extends AppCompatActivity {

Expand Down
12 changes: 7 additions & 5 deletions app/src/main/java/gov/dol/childlabor/MechanismActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

import android.graphics.Color;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

import android.widget.TextView;

public class MechanismActivity extends AppCompatActivity {
Expand Down Expand Up @@ -39,6 +38,9 @@ private void displayValue(TextView view, String value) {
case "No":
view.setTextColor(Color.RED);
break;
case "NA":
view.setTextColor(Color.BLACK);
break;
}
view.setText(value);
}
Expand Down
7 changes: 2 additions & 5 deletions app/src/main/java/gov/dol/childlabor/MenuMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.joanzapata.pdfview.PDFView;


public class MenuMain extends AppCompatActivity {

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/gov/dol/childlabor/MethodologyActivity.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gov.dol.childlabor;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.webkit.WebView;

public class MethodologyActivity extends AppCompatActivity {
Expand Down
8 changes: 3 additions & 5 deletions app/src/main/java/gov/dol/childlabor/MoreInfoActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
import com.joanzapata.pdfview.PDFView;

public class MoreInfoActivity extends AppCompatActivity {
String filename;
Expand Down
Loading

0 comments on commit b92b413

Please sign in to comment.