diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index c52a2fb..8d5306f 100755 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -17,7 +17,6 @@ android:theme="@style/AppTheme"> diff --git a/app/src/main/assets/Morocco.pdf b/app/src/main/assets/Morocco.pdf index 6a06ac7..9a90e4b 100644 Binary files a/app/src/main/assets/Morocco.pdf and b/app/src/main/assets/Morocco.pdf differ diff --git a/app/src/main/assets/Uganda.pdf b/app/src/main/assets/Uganda.pdf index 8604373..e182d29 100644 Binary files a/app/src/main/assets/Uganda.pdf and b/app/src/main/assets/Uganda.pdf differ diff --git a/app/src/main/assets/countries_2020.xml b/app/src/main/assets/countries_2020.xml index 9bea611..72cf444 100644 --- a/app/src/main/assets/countries_2020.xml +++ b/app/src/main/assets/countries_2020.xml @@ -12865,8 +12865,8 @@ 5-14 - Unavailable - + 0.13 + 927591 0.792 0.05 0.158 @@ -18720,8 +18720,8 @@ 5-14 - Unavailable - + 0.432 + 1965690 0.677 0.014 0.309 @@ -20090,8 +20090,8 @@ 5-14 - Unavailable - + 0.040 + 866293 0.303 0.161 0.536 @@ -21354,9 +21354,6 @@ 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. - - 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. - Criminalize the use, procuring, and offering of children for the production and trafficking of drugs. diff --git a/app/src/main/java/gov/dol/childlabor/MainActivity.java b/app/src/main/java/gov/dol/childlabor/MainActivity.java index 36e0e4c..8a1411f 100755 --- a/app/src/main/java/gov/dol/childlabor/MainActivity.java +++ b/app/src/main/java/gov/dol/childlabor/MainActivity.java @@ -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; @@ -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"}; diff --git a/app/src/main/java/gov/dol/childlabor/StatisticsActivity.java b/app/src/main/java/gov/dol/childlabor/StatisticsActivity.java index 9ba61e8..e721b20 100755 --- a/app/src/main/java/gov/dol/childlabor/StatisticsActivity.java +++ b/app/src/main/java/gov/dol/childlabor/StatisticsActivity.java @@ -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) { } @@ -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) { } @@ -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) { } } @@ -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); @@ -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) { } } @@ -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) { } diff --git a/app/src/main/res/drawable-xhdpi/bg.png b/app/src/main/res/drawable-xhdpi/bg.png index 1f6cb3e..8d20f3c 100644 Binary files a/app/src/main/res/drawable-xhdpi/bg.png and b/app/src/main/res/drawable-xhdpi/bg.png differ diff --git a/app/src/main/res/layout-land/content_main.xml b/app/src/main/res/layout-land/content_main.xml index a144e88..51245fc 100755 --- a/app/src/main/res/layout-land/content_main.xml +++ b/app/src/main/res/layout-land/content_main.xml @@ -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"> - - - - - - - - + + + + + + + + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 038e5fd..e5b0b0c 100755 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -13,6 +13,15 @@ android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" app:popupTheme="@style/AppTheme.PopupOverlay"> + +