Skip to content

Commit

Permalink
Merge pull request #111 from Zolon-DOL/master
Browse files Browse the repository at this point in the history
Post App release bug fixes
  • Loading branch information
pbhatt17 authored Nov 12, 2021
2 parents 15e0655 + 0355c94 commit 50cb727
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 40 deletions.
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Binary file modified app/src/main/assets/Morocco.pdf
Binary file not shown.
Binary file modified app/src/main/assets/Uganda.pdf
Binary file not shown.
15 changes: 6 additions & 9 deletions app/src/main/assets/countries_2020.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12865,8 +12865,8 @@
<Country_Statistics>
<Children_Work_Statistics>
<Age_Range>5-14</Age_Range>
<Total_Percentage_of_Working_Children>Unavailable</Total_Percentage_of_Working_Children>
<Total_Working_Population />
<Total_Percentage_of_Working_Children>0.13</Total_Percentage_of_Working_Children>
<Total_Working_Population>927591</Total_Working_Population>
<Agriculture>0.792</Agriculture>
<Industry>0.05</Industry>
<Services>0.158</Services>
Expand Down Expand Up @@ -18720,8 +18720,8 @@
<Country_Statistics>
<Children_Work_Statistics>
<Age_Range>5-14</Age_Range>
<Total_Percentage_of_Working_Children>Unavailable</Total_Percentage_of_Working_Children>
<Total_Working_Population />
<Total_Percentage_of_Working_Children>0.432</Total_Percentage_of_Working_Children>
<Total_Working_Population>1965690</Total_Working_Population>
<Agriculture>0.677</Agriculture>
<Industry>0.014</Industry>
<Services>0.309</Services>
Expand Down Expand Up @@ -20090,8 +20090,8 @@
<Country_Statistics>
<Children_Work_Statistics>
<Age_Range>5-14</Age_Range>
<Total_Percentage_of_Working_Children>Unavailable</Total_Percentage_of_Working_Children>
<Total_Working_Population />
<Total_Percentage_of_Working_Children>0.040</Total_Percentage_of_Working_Children>
<Total_Working_Population>866293</Total_Working_Population>
<Agriculture>0.303</Agriculture>
<Industry>0.161</Industry>
<Services>0.536</Services>
Expand Down Expand Up @@ -21354,9 +21354,6 @@
<Action>
<Name>Ensure that all children age 15 and under are protected by law, including children who are self-employed, work for artisan and handicraft businesses with fewer than five employees, or work on private farms or in residences. </Name>
</Action>
<Action>
<Name>Ensure that the hazardous occupations and activities prohibited for children are comprehensive and includes domestic work, in which physical and emotional abuse is known to occur.</Name>
</Action>
<Action>
<Name>Criminalize the use, procuring, and offering of children for the production and trafficking of drugs.</Name>
</Action>
Expand Down
19 changes: 19 additions & 0 deletions app/src/main/java/gov/dol/childlabor/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
Expand All @@ -16,14 +17,32 @@

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.view.AccessibilityDelegateCompat;
import androidx.core.view.ViewCompat;
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;

public class MainActivity extends AppCompatActivity {
TextView toolbarTextView;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
toolbar.setTitle("");
toolbarTextView = toolbar.findViewById(R.id.toolbar_title);
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.P){
toolbarTextView.setAccessibilityHeading(true);
}else{
ViewCompat.setAccessibilityDelegate(toolbarTextView, new AccessibilityDelegateCompat() {
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
super.onInitializeAccessibilityNodeInfo(host, info);
info.setHeading(true); // false to mark a view as not a heading
}
});
}

setSupportActionBar(toolbar);

String[] items = {"Countries/Areas", "Goods", "Exploitation Types"};
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/java/gov/dol/childlabor/StatisticsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ private void setStatisticTextMultiworking(TextView view, String percent, String

if (percent != null && !percent.isEmpty()) {
try {
percent = new DecimalFormat("#.#").format(Float.parseFloat(percent) * 100) + "%";
percent = new DecimalFormat("#.0").format(Float.parseFloat(percent) * 100) + "%";
} catch (Exception ex) {
}

Expand Down Expand Up @@ -955,7 +955,7 @@ private void setStatisticTextMulti(TextView view, String percent) {
return;
}
try {
percent = new DecimalFormat("#.#").format(Float.parseFloat(percent) * 100) + "%";
percent = new DecimalFormat("#.0").format(Float.parseFloat(percent) * 100) + "%";
} catch (Exception nfe) {
}

Expand All @@ -973,7 +973,7 @@ private void setStatisticTextMulti(TextView view, String percent, String ageRang

if (percent != null && !percent.isEmpty()) {
try {
percent = new DecimalFormat("#.#").format(Float.parseFloat(percent) * 100) + "%";
percent = new DecimalFormat("#.0").format(Float.parseFloat(percent) * 100) + "%";
} catch (Exception nfe) {
}
}
Expand All @@ -995,7 +995,7 @@ private void setStatisticText(int textViewId, String percent) {
return;
}
try {
percent = new DecimalFormat("#.#").format(Float.parseFloat(percent) * 100) + "%";
percent = new DecimalFormat("#.0").format(Float.parseFloat(percent) * 100) + "%";
} catch (Exception nfe) {
}
TextView view = (TextView) findViewById(textViewId);
Expand All @@ -1013,7 +1013,7 @@ private void setStatisticText(int textViewId, String percent, String ageRange) {

if (percent != null && !percent.isEmpty()) {
try {
percent = new DecimalFormat("#.#").format(Float.parseFloat(percent) * 100) + "%";
percent = new DecimalFormat("#.0").format(Float.parseFloat(percent) * 100) + "%";
} catch (Exception nfe) {
}
}
Expand All @@ -1038,7 +1038,7 @@ private void setStatisticText(int textViewId, String percent, String ageRange, S

if (percent != null && !percent.isEmpty()) {
try {
percent = new DecimalFormat("#.#").format(Float.parseFloat(percent) * 100) + "%";
percent = new DecimalFormat("#.0").format(Float.parseFloat(percent) * 100) + "%";
} catch (Exception ex) {
}

Expand Down
Binary file modified app/src/main/res/drawable-xhdpi/bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 23 additions & 23 deletions app/src/main/res/layout-land/content_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,12 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:paddingTop="0dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context=".MainActivity"
tools:showIn="@layout/activity_main">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:background="#FFF"
android:orientation="vertical">

<ListView
android:id="@+id/listView"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<ImageView
android:id="@+id/imageView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:src="@drawable/bg" />

</LinearLayout>

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -53,4 +31,26 @@
android:src="@drawable/dol"
android:tint="#FFFFFF" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:background="#FFF"
android:orientation="vertical">

<ImageView
android:id="@+id/imageView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitXY"
android:src="@drawable/bg" />

<ListView
android:id="@+id/listView"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

</LinearLayout>

</RelativeLayout>
9 changes: 9 additions & 0 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
android:layout_width="match_parent" android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary" app:popupTheme="@style/AppTheme.PopupOverlay">

<TextView
android:id="@+id/toolbar_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textStyle="bold"
android:textSize="20sp"
android:textColor="@color/white_opaque"
android:text="@string/app_name"/>

<Button
android:id="@+id/menubutton"
style="@android:style/Widget.Holo.Light.Button.Small"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/content_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:scaleType="fitXY"
android:src="@drawable/bg" />

</LinearLayout>
Expand Down

0 comments on commit 50cb727

Please sign in to comment.