diff --git a/app/build.gradle b/app/build.gradle
index 91d807c..f1c1c01 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -33,7 +33,7 @@ dependencies {
compile 'com.android.support:support-v4:23.4.0'
-
+ compile 'com.github.bluejamesbond:textjustify-android:2.1.6'
compile 'com.android.support.test.espresso:espresso-core:2.2.2'
compile 'com.android.support.test:runner:0.5'
}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 50a64af..6b8fb1d 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -25,7 +25,7 @@
-
+
@@ -36,8 +36,7 @@
android:name=".circle_of_trust.Trustees"
android:label="@string/title_activity_trustees"
android:parentActivityName=".MainActivity"
- android:windowSoftInputMode="adjustPan|stateAlwaysHidden"
- >
+ android:windowSoftInputMode="adjustPan|stateAlwaysHidden">
@@ -60,10 +59,10 @@
+ android:windowSoftInputMode="adjustPan|stateAlwaysHidden">
@@ -73,18 +72,18 @@
android:label="@string/title_activity_login"
android:parentActivityName=".SplashScreenActivity"
android:theme="@style/MyMaterialTheme"
- android:windowSoftInputMode="adjustPan|stateAlwaysHidden"
- >
+ android:windowSoftInputMode="adjustPan|stateAlwaysHidden">
-
-
+
diff --git a/app/src/main/java/com/peacecorps/pcsa/FormattedSingleTextViewFragment.java b/app/src/main/java/com/peacecorps/pcsa/FormattedSingleTextViewFragment.java
new file mode 100644
index 0000000..0479725
--- /dev/null
+++ b/app/src/main/java/com/peacecorps/pcsa/FormattedSingleTextViewFragment.java
@@ -0,0 +1,80 @@
+package com.peacecorps.pcsa;
+
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentActivity;
+import android.support.v7.app.AppCompatActivity;
+import android.text.Html;
+import android.text.style.RelativeSizeSpan;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.bluejamesbond.text.DocumentView;
+import com.bluejamesbond.text.hyphen.DefaultHyphenator;
+import com.bluejamesbond.text.style.JustifiedSpan;
+import com.bluejamesbond.text.style.TextAlignment;
+import com.bluejamesbond.text.util.ArticleBuilder;
+
+/**
+ * Created by ashu on 5/2/17.
+ */
+
+public class FormattedSingleTextViewFragment extends Fragment {
+ public static final String TAG = FormattedSingleTextViewFragment.class.getSimpleName();
+ public static final String TOOLBAR_KEY = "TOOLBAR";
+ public static final String CONTENT_KEY = "CONTENT";
+ public static final String SUBTITLE_KEY = "SUBTITLE";
+ TextView subTitle;
+ DocumentView content;
+ String toolbarTitle, subtitle, contentString;
+
+ /**
+ * Populates the required data for the layout which appears
+ *
+ * @param subTitle subtitle of the layout
+ * @param contentToShow data to be displayed
+ * @param toolbarString displayed on the toolbar
+ */
+ public static void showSingleTextLayout(FragmentActivity mainActivity, String toolbarString, String subTitle, String contentToShow) {
+ FormattedSingleTextViewFragment singleTextViewFragment = new FormattedSingleTextViewFragment();
+ Bundle bundle = new Bundle();
+ bundle.putString(SingleTextViewFragment.TOOLBAR_KEY, toolbarString);
+ bundle.putString(SingleTextViewFragment.SUBTITLE_KEY, subTitle);
+ bundle.putString(SingleTextViewFragment.CONTENT_KEY, contentToShow);
+ singleTextViewFragment.setArguments(bundle);
+
+ //Swapping Single Textview Fragment into the fragment container
+ MainActivity.swapFragmentIn(mainActivity, singleTextViewFragment, FormattedSingleTextViewFragment.TAG, true);
+ }
+
+ @Nullable
+ @Override
+ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+
+ View rootView = inflater.inflate(R.layout.fragment_formatted_single_textview, container, false);
+ subTitle = (TextView) rootView.findViewById(R.id.layout_subtitle);
+ //content = (DocumentView) rootView.findViewById(R.id.layout_content);
+ JustificationUtil util = new JustificationUtil(getActivity().getApplicationContext());
+ toolbarTitle = getArguments().getString(TOOLBAR_KEY);
+ ((AppCompatActivity) getActivity()).getSupportActionBar().setTitle(toolbarTitle);
+ subtitle = getArguments().getString(SUBTITLE_KEY);
+ subTitle.setText(subtitle);
+ contentString = getArguments().getString(CONTENT_KEY);
+
+ ArticleBuilder articleBuilder = new ArticleBuilder();
+ articleBuilder.append(contentString, true, new RelativeSizeSpan(1f), new JustifiedSpan());
+ content = util.addDocumentView(Html.toHtml(articleBuilder), DocumentView.FORMATTED_TEXT, false,null,
+ getActivity());
+ content.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
+ content.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ content.getDocumentLayoutParams().setHyphenated(true);
+ LinearLayout linearLayout = (LinearLayout) rootView.findViewById(R.id.layout_content);
+ linearLayout.addView(content);
+ return rootView;
+ }
+}
diff --git a/app/src/main/java/com/peacecorps/pcsa/JustificationUtil.java b/app/src/main/java/com/peacecorps/pcsa/JustificationUtil.java
new file mode 100644
index 0000000..d2c0b38
--- /dev/null
+++ b/app/src/main/java/com/peacecorps/pcsa/JustificationUtil.java
@@ -0,0 +1,75 @@
+package com.peacecorps.pcsa;
+
+/**
+ * Created by ashu on 3/3/17.
+ */
+
+import android.app.Activity;
+import android.content.Context;
+import android.graphics.Typeface;
+import android.text.Html;
+
+import com.bluejamesbond.text.DocumentView;
+import com.bluejamesbond.text.hyphen.DefaultHyphenator;
+import com.bluejamesbond.text.style.TextAlignment;
+
+public final class JustificationUtil {
+ private static Context context;
+
+ public JustificationUtil(Context context) {
+ this.context = context;
+ }
+
+ public static DocumentView addDocumentView(CharSequence article, int type, boolean isOtherStaffContent,Context mContext, Activity activity) {
+ final DocumentView documentView;
+ if(mContext!=null){
+ documentView= new DocumentView(mContext, type);
+ }else {
+ documentView = new DocumentView(activity, type);
+ }
+ documentView.getDocumentLayoutParams().setTextColor(context.getResources().getColor(R.color.primary_text_default_material_dark));
+ documentView.getDocumentLayoutParams().setTextTypeface(Typeface.DEFAULT);
+ if (isOtherStaffContent) {
+ documentView.getDocumentLayoutParams().setTextSize(16f);
+ } else {
+ documentView.getDocumentLayoutParams().setTextSize(17f);
+ }
+ documentView.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
+ documentView.getDocumentLayoutParams().setInsetPaddingLeft(10);
+ documentView.getDocumentLayoutParams().setInsetPaddingRight(10);
+ documentView.getDocumentLayoutParams().setAntialias(true);
+ documentView.getDocumentLayoutParams().setInsetPaddingTop(10);
+ documentView.getDocumentLayoutParams().setInsetPaddingBottom(10);
+ documentView.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ documentView.getDocumentLayoutParams().setHyphenated(true);
+ documentView.setText(Html.fromHtml(article.toString()));
+ return documentView;
+ }
+
+// public static DocumentView addDocumentViewC(CharSequence article, int type, boolean isOtherStaffContent, Context activity) {
+// final DocumentView documentView = new DocumentView(activity, type);
+// documentView.getDocumentLayoutParams().setTextColor(context.getResources().getColor(R.color.primary_text_default_material_dark));
+// documentView.getDocumentLayoutParams().setTextTypeface(Typeface.DEFAULT);
+// if (isOtherStaffContent) {
+// documentView.getDocumentLayoutParams().setTextSize(16f);
+// } else {
+// documentView.getDocumentLayoutParams().setTextSize(17f);
+// }
+// documentView.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
+// documentView.getDocumentLayoutParams().setInsetPaddingLeft(10);
+// documentView.getDocumentLayoutParams().setInsetPaddingRight(10);
+// documentView.getDocumentLayoutParams().setAntialias(true);
+// documentView.getDocumentLayoutParams().setInsetPaddingTop(10);
+// documentView.getDocumentLayoutParams().setInsetPaddingBottom(10);
+// documentView.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+// getInstance(DefaultHyphenator.HyphenPattern.PT));
+// documentView.getDocumentLayoutParams().setHyphenated(true);
+// documentView.setText(Html.fromHtml(article.toString()));
+// return documentView;
+// }
+
+// public static DocumentView addDocumentView(CharSequence article, int type,boolean isOtherStaffContent,Activity activity) {
+// return addDocumentView(article, type, false,activity);
+// }
+}
diff --git a/app/src/main/java/com/peacecorps/pcsa/SignupActivity.java b/app/src/main/java/com/peacecorps/pcsa/SignupActivity.java
index 920aa8a..f00cc2a 100644
--- a/app/src/main/java/com/peacecorps/pcsa/SignupActivity.java
+++ b/app/src/main/java/com/peacecorps/pcsa/SignupActivity.java
@@ -51,8 +51,8 @@ protected void onCreate(Bundle savedInstanceState) {
String[] countries = getResources().getStringArray(R.array.countryArray);
ArrayAdapter adapter =
- new ArrayAdapter(this, R.layout.textview, countries);
- adapter.setDropDownViewResource(R.layout.textview);
+ new ArrayAdapter(this, R.layout.textview_plain, countries);
+ adapter.setDropDownViewResource(R.layout.textview_plain);
country.setAdapter(adapter);
country.setOnItemSelectedListener(this);
loginButton.setOnClickListener(new View.OnClickListener() {
diff --git a/app/src/main/java/com/peacecorps/pcsa/SingleTextViewFragment.java b/app/src/main/java/com/peacecorps/pcsa/SingleTextViewFragment.java
index 8b443a4..198d359 100644
--- a/app/src/main/java/com/peacecorps/pcsa/SingleTextViewFragment.java
+++ b/app/src/main/java/com/peacecorps/pcsa/SingleTextViewFragment.java
@@ -1,20 +1,22 @@
package com.peacecorps.pcsa;
-import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v7.app.AppCompatActivity;
import android.text.Html;
-import android.text.method.ScrollingMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
+import com.bluejamesbond.text.DocumentView;
+import com.bluejamesbond.text.hyphen.DefaultHyphenator;
+
/**
* This class has to be instantiated for all layouts which have a single text view
+ *
* @author rohan
* @since 2016-07-18
*/
@@ -24,42 +26,47 @@ public class SingleTextViewFragment extends Fragment {
public static final String TOOLBAR_KEY = "TOOLBAR";
public static final String CONTENT_KEY = "CONTENT";
public static final String SUBTITLE_KEY = "SUBTITLE";
- TextView subTitle, content;
+ TextView subTitle;
+ DocumentView content;
String toolbarTitle, subtitle, contentString;
+ /**
+ * Populates the required data for the layout which appears
+ *
+ * @param subTitle subtitle of the layout
+ * @param contentToShow data to be displayed
+ * @param toolbarString displayed on the toolbar
+ */
+ public static void showSingleTextLayout(FragmentActivity mainActivity, String toolbarString, String subTitle, String contentToShow) {
+ SingleTextViewFragment singleTextViewFragment = new SingleTextViewFragment();
+ Bundle bundle = new Bundle();
+ bundle.putString(SingleTextViewFragment.TOOLBAR_KEY, toolbarString);
+ bundle.putString(SingleTextViewFragment.SUBTITLE_KEY, subTitle);
+ bundle.putString(SingleTextViewFragment.CONTENT_KEY, contentToShow);
+ singleTextViewFragment.setArguments(bundle);
+
+ //Swapping Single Textview Fragment into the fragment container
+ MainActivity.swapFragmentIn(mainActivity, singleTextViewFragment, SingleTextViewFragment.TAG, true);
+ }
+
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_single_textview, container, false);
- subTitle = (TextView)rootView.findViewById(R.id.layout_subtitle);
- content = (TextView)rootView.findViewById(R.id.layout_content);
+ subTitle = (TextView) rootView.findViewById(R.id.layout_subtitle);
+ content = (DocumentView) rootView.findViewById(R.id.layout_content);
toolbarTitle = getArguments().getString(TOOLBAR_KEY);
- ((AppCompatActivity)getActivity()).getSupportActionBar().setTitle(toolbarTitle);
+ ((AppCompatActivity) getActivity()).getSupportActionBar().setTitle(toolbarTitle);
subtitle = getArguments().getString(SUBTITLE_KEY);
subTitle.setText(subtitle);
contentString = getArguments().getString(CONTENT_KEY);
content.setText(Html.fromHtml(contentString));
- content.setMovementMethod(new ScrollingMovementMethod());
- return rootView;
- }
-
- /**
- * Populates the required data for the layout which appears
- * @param subTitle subtitle of the layout
- * @param contentToShow data to be displayed
- * @param toolbarString displayed on the toolbar
- */
- public static void showSingleTextLayout(FragmentActivity mainActivity, String toolbarString, String subTitle, String contentToShow)
- {
- SingleTextViewFragment singleTextViewFragment = new SingleTextViewFragment();
- Bundle bundle = new Bundle();
- bundle.putString(SingleTextViewFragment.TOOLBAR_KEY,toolbarString);
- bundle.putString(SingleTextViewFragment.SUBTITLE_KEY,subTitle);
- bundle.putString(SingleTextViewFragment.CONTENT_KEY,contentToShow);
- singleTextViewFragment.setArguments(bundle);
- //Swapping Single Textview Fragment into the fragment container
- MainActivity.swapFragmentIn(mainActivity,singleTextViewFragment,SingleTextViewFragment.TAG,true);
+ content.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ content.getDocumentLayoutParams().setHyphenated(true);
+ //content.setMovementMethod(new ScrollingMovementMethod());
+ return rootView;
}
}
diff --git a/app/src/main/java/com/peacecorps/pcsa/get_help_now/ContactOtherStaff.java b/app/src/main/java/com/peacecorps/pcsa/get_help_now/ContactOtherStaff.java
index fe8dc0a..a77184b 100644
--- a/app/src/main/java/com/peacecorps/pcsa/get_help_now/ContactOtherStaff.java
+++ b/app/src/main/java/com/peacecorps/pcsa/get_help_now/ContactOtherStaff.java
@@ -72,7 +72,11 @@ public void onClick(View v) {
otherStaffContent = new OtherStaffContent();
args = new Bundle();
args.putString(OtherStaffContent.CONTACT_NAME, getResources().getString(R.string.contact_pcsaves));
- args.putString(OtherStaffContent.CONTACT_DESC, getResources().getString(R.string.reporting_desc_pcsaves));
+ args.putString(OtherStaffContent.CONTACT_DESC_PART1, getResources().getString(R.string.reporting_desc_pcsaves_part1));
+ args.putString(OtherStaffContent.CONTACT_DESC_PART2, getResources().getString(R.string.reporting_desc_pcsaves_part2));
+ args.putString(OtherStaffContent.CONTACT_DESC_PART3, "");
+ args.putString(OtherStaffContent.URL1, getResources().getString(R.string.reporting_desc_pcsaves_url));
+ args.putString(OtherStaffContent.URL2, "");
args.putString(OtherStaffContent.CONTACT_NUMBER, getResources().getString(R.string.reporting_contact_pcsaves));
otherStaffContent.setArguments(args);
MainActivity.swapFragmentIn(getActivity(),otherStaffContent,OtherStaffContent.TAG,true);
@@ -82,7 +86,11 @@ public void onClick(View v) {
otherStaffContent = new OtherStaffContent();
args = new Bundle();
args.putString(OtherStaffContent.CONTACT_NAME, getResources().getString(R.string.contact_ova));
- args.putString(OtherStaffContent.CONTACT_DESC, getResources().getString(R.string.reporting_desc_ova));
+ args.putString(OtherStaffContent.CONTACT_DESC_PART1, getResources().getString(R.string.reporting_desc_ova_part1));
+ args.putString(OtherStaffContent.CONTACT_DESC_PART2, getResources().getString(R.string.reporting_desc_ova_part2));
+ args.putString(OtherStaffContent.CONTACT_DESC_PART3, "");
+ args.putString(OtherStaffContent.URL1, getResources().getString(R.string.reporting_desc_ova_url));
+ args.putString(OtherStaffContent.URL2, "");
args.putString(OtherStaffContent.CONTACT_NUMBER, getResources().getString(R.string.reporting_contact_ova));
otherStaffContent.setArguments(args);
MainActivity.swapFragmentIn(getActivity(),otherStaffContent,OtherStaffContent.TAG,true);
@@ -92,7 +100,11 @@ public void onClick(View v) {
otherStaffContent = new OtherStaffContent();
args = new Bundle();
args.putString(OtherStaffContent.CONTACT_NAME, getResources().getString(R.string.contact_oig));
- args.putString(OtherStaffContent.CONTACT_DESC, getResources().getString(R.string.reporting_desc_oig));
+ args.putString(OtherStaffContent.CONTACT_DESC_PART1, getResources().getString(R.string.reporting_desc_oig_part1));
+ args.putString(OtherStaffContent.CONTACT_DESC_PART2, getResources().getString(R.string.reporting_desc_oig_part2));
+ args.putString(OtherStaffContent.CONTACT_DESC_PART3, getResources().getString(R.string.reporting_desc_oig_part3));
+ args.putString(OtherStaffContent.URL1, getResources().getString(R.string.reporting_desc_oig_url1));
+ args.putString(OtherStaffContent.URL2, getResources().getString(R.string.reporting_desc_oig_url2));
args.putString(OtherStaffContent.CONTACT_NUMBER, getResources().getString(R.string.reporting_contact_oig));
otherStaffContent.setArguments(args);
MainActivity.swapFragmentIn(getActivity(),otherStaffContent,OtherStaffContent.TAG,true);
@@ -102,7 +114,11 @@ public void onClick(View v) {
otherStaffContent = new OtherStaffContent();
args = new Bundle();
args.putString(OtherStaffContent.CONTACT_NAME, getResources().getString(R.string.contact_ocrd));
- args.putString(OtherStaffContent.CONTACT_DESC, getResources().getString(R.string.reporting_desc_ocrd));
+ args.putString(OtherStaffContent.CONTACT_DESC_PART1, getResources().getString(R.string.reporting_desc_ocrd_part1));
+ args.putString(OtherStaffContent.CONTACT_DESC_PART2, getResources().getString(R.string.reporting_desc_ocrd_part2));
+ args.putString(OtherStaffContent.CONTACT_DESC_PART3, "");
+ args.putString(OtherStaffContent.URL1, getResources().getString(R.string.reporting_desc_ocrd_url));
+ args.putString(OtherStaffContent.URL2, "");
args.putString(OtherStaffContent.CONTACT_NUMBER, getResources().getString(R.string.reporting_contact_ocrd));
otherStaffContent.setArguments(args);
MainActivity.swapFragmentIn(getActivity(),otherStaffContent,OtherStaffContent.TAG,true);
diff --git a/app/src/main/java/com/peacecorps/pcsa/get_help_now/OtherStaffContent.java b/app/src/main/java/com/peacecorps/pcsa/get_help_now/OtherStaffContent.java
index abecd79..940d0c7 100644
--- a/app/src/main/java/com/peacecorps/pcsa/get_help_now/OtherStaffContent.java
+++ b/app/src/main/java/com/peacecorps/pcsa/get_help_now/OtherStaffContent.java
@@ -1,18 +1,30 @@
package com.peacecorps.pcsa.get_help_now;
import android.content.Intent;
+import android.graphics.Typeface;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
+import android.text.Html;
+import android.text.style.RelativeSizeSpan;
import android.view.LayoutInflater;
+import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.Button;
+import android.widget.LinearLayout;
import android.widget.TextView;
+import android.widget.Toast;
+import com.bluejamesbond.text.DocumentView;
+import com.bluejamesbond.text.hyphen.DefaultHyphenator;
+import com.bluejamesbond.text.style.JustifiedSpan;
+import com.bluejamesbond.text.style.TextAlignment;
+import com.bluejamesbond.text.util.ArticleBuilder;
+import com.peacecorps.pcsa.JustificationUtil;
import com.peacecorps.pcsa.R;
/**
@@ -26,60 +38,127 @@ public class OtherStaffContent extends Fragment implements AdapterView.OnItemCli
public static final String CONTACT_NUMBER = "contactNumber";
public static final String CONTACT_NAME = "contactName";
- public static final String CONTACT_DESC = "contatDesc";
- public static final String TAG = OtherStaffContent.class.getSimpleName() ;
+ public static final String CONTACT_DESC_PART1 = "contatDescPart1";
+ public static final String CONTACT_DESC_PART2 = "contatDescPart2";
+ public static final String CONTACT_DESC_PART3 = "contatDescPart3";
+ public static final String URL1 = "url1";
+ public static final String URL2 = "url2";
+ public static final String TAG = OtherStaffContent.class.getSimpleName();
static String contactNumber;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
- View rootView = inflater.inflate(R.layout.fragment_reporting_other_staff_content,container,false);
-
+ View rootView = inflater.inflate(R.layout.fragment_reporting_other_staff_content, container, false);
+ final Bundle details = getArguments();
+ JustificationUtil util = new JustificationUtil(getActivity().getApplicationContext());
TextView contactName = (TextView) rootView.findViewById(R.id.reporting_contact_other_content);
- TextView contactDescription = (TextView) rootView.findViewById(R.id.reporting_contact_description);
+
+ ArticleBuilder articleBuilder = new ArticleBuilder();
+ articleBuilder.append(details.getString(CONTACT_DESC_PART1), true, new RelativeSizeSpan(1f), new JustifiedSpan());
+ DocumentView contactDescription = util.addDocumentView(Html.toHtml(articleBuilder),
+ DocumentView.FORMATTED_TEXT, true, null,getActivity());
+ contactDescription.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
+ contactDescription.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ contactDescription.getDocumentLayoutParams().setHyphenated(true);
+ LinearLayout linearLayout = (LinearLayout) rootView.findViewById(R.id.reporting_contact_description);
+ linearLayout.addView(contactDescription);
+
+ ArticleBuilder articleBuilder1 = new ArticleBuilder();
+ articleBuilder1.append(details.getString(CONTACT_DESC_PART2), true, new RelativeSizeSpan(1f), new JustifiedSpan());
+ DocumentView contactDescription1 = util.addDocumentView(Html.toHtml(articleBuilder1),
+ DocumentView.FORMATTED_TEXT, true,null, getActivity());
+ contactDescription1.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
+ contactDescription1.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ contactDescription1.getDocumentLayoutParams().setHyphenated(true);
+ contactDescription1.getViewportView().isClickable();
+ linearLayout.addView(contactDescription1);
+ contactDescription1.getViewportView().setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (details.getString(CONTACT_DESC_PART2).substring(0, 1).equals("e")) {
+ Intent intent = new Intent(Intent.ACTION_SEND);
+ intent.setType("text/html");
+ intent.putExtra(Intent.EXTRA_EMAIL, details.getString(URL1));
+ startActivity(Intent.createChooser(intent, "Send Email"));
+ } else {
+ Intent i = new Intent(Intent.ACTION_VIEW);
+ i.setData(Uri.parse("http://" + details.getString(URL1)));
+ startActivity(i);
+ }
+ }
+ });
+
+ //if(!details.getString(CONTACT_DESC_PART3).isEmpty()){
+ ArticleBuilder articleBuilder2 = new ArticleBuilder();
+ articleBuilder2.append(details.getString(CONTACT_DESC_PART3), true, new RelativeSizeSpan(1f), new JustifiedSpan());
+ DocumentView contactDescription2 = util.addDocumentView(Html.toHtml(articleBuilder2),
+ DocumentView.FORMATTED_TEXT, true,null, getActivity());
+ contactDescription2.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
+ contactDescription2.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ contactDescription2.getDocumentLayoutParams().setHyphenated(true);
+ linearLayout.addView(contactDescription2);
+ contactDescription2.getViewportView().setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ if (details.getString(CONTACT_DESC_PART3).substring(0, 1).equals("e")) {
+ Intent intent = new Intent(Intent.ACTION_SEND);
+ intent.setType("text/html");
+ intent.putExtra(Intent.EXTRA_EMAIL, details.getString(URL2));
+ startActivity(Intent.createChooser(intent, "Send Email"));
+ } else {
+ Intent i = new Intent(Intent.ACTION_VIEW);
+ i.setData(Uri.parse("http://" + details.getString(URL2)));
+ startActivity(i);
+ }
+ }
+ });
+ // }
+
Button contactNow = (Button) rootView.findViewById(R.id.contact_now);
- final Bundle details = getArguments();
contactNumber = details.getString(CONTACT_NUMBER);
contactName.setText(details.getString(CONTACT_NAME));
- contactDescription.setText(details.getString(CONTACT_DESC));
+
contactNow.setText("Contact Now");
contactNow.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- ContactOptionsDialogBox contactOptionsDialogBox = ContactOptionsDialogBox.newInstance(getString(R.string.contact)+" "+details.getString(CONTACT_NAME)+" "+getString(R.string.via),
- getActivity(),OtherStaffContent.this);
+ ContactOptionsDialogBox contactOptionsDialogBox = ContactOptionsDialogBox.
+ newInstance(getString(R.string.contact) + " " + details.getString(CONTACT_NAME) + " " + getString(R.string.via),
+ getActivity(), OtherStaffContent.this);
contactOptionsDialogBox.show(getActivity().getSupportFragmentManager(), getString(R.string.dialog_tag));
}
});
- ((AppCompatActivity)getActivity()).getSupportActionBar().setTitle(R.string.reporting_get_help);
+ ((AppCompatActivity) getActivity()).getSupportActionBar().setTitle(R.string.reporting_get_help);
return rootView;
}
/**
* Interface definition for a callback to be invoked when an item in this AdapterView has been clicked.
*
- * @param parent The AdapterView where the click happened.
- * @param view The view within the AdapterView that was clicked (this will be a view provided by the adapter)
+ * @param parent The AdapterView where the click happened.
+ * @param view The view within the AdapterView that was clicked (this will be a view provided by the adapter)
* @param position The position of the view in the adapter.
- * @param id The row id of the item that was clicked.
+ * @param id The row id of the item that was clicked.
*/
@Override
public void onItemClick(AdapterView> parent, View view, int position, long id) {
//For Voice Call
- if(position == 1)
- {
+ if (position == 1) {
Intent callingIntent = new Intent(Intent.ACTION_CALL);
callingIntent.setData(Uri.parse("tel:" + contactNumber));
startActivity(callingIntent);
}
//For Message
- else if(position == 2)
- {
+ else if (position == 2) {
Intent smsIntent = new Intent(Intent.ACTION_VIEW);
- smsIntent.setData(Uri.parse("sms:"+contactNumber));
+ smsIntent.setData(Uri.parse("sms:" + contactNumber));
startActivity(smsIntent);
}
}
diff --git a/app/src/main/java/com/peacecorps/pcsa/policies_glossary/GlossaryAdapter.java b/app/src/main/java/com/peacecorps/pcsa/policies_glossary/GlossaryAdapter.java
index 9422348..bbb93bf 100644
--- a/app/src/main/java/com/peacecorps/pcsa/policies_glossary/GlossaryAdapter.java
+++ b/app/src/main/java/com/peacecorps/pcsa/policies_glossary/GlossaryAdapter.java
@@ -3,7 +3,6 @@
import android.content.Context;
import android.graphics.Typeface;
import android.text.Html;
-import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -11,6 +10,8 @@
import android.widget.ExpandableListView;
import android.widget.TextView;
+import com.bluejamesbond.text.DocumentView;
+import com.bluejamesbond.text.hyphen.DefaultHyphenator;
import com.peacecorps.pcsa.R;
import java.util.ArrayList;
@@ -39,8 +40,8 @@ public class GlossaryAdapter extends BaseExpandableListAdapter {
* Counstructor of GlossaryAdapter class called upon to set different variables of the calling object.
*
* @param context
- * @param listDataHeader sets the title of expandable list .
- * @param listChildData sets the child data in format of header title, child title
+ * @param listDataHeader sets the title of expandable list .
+ * @param listChildData sets the child data in format of header title, child title
* @param expandableListView a view that shows items in a vertically scrolling two-level list
*/
public GlossaryAdapter(Context context, List listDataHeader,
@@ -51,6 +52,115 @@ public GlossaryAdapter(Context context, List listDataHeader,
this.listView = expandableListView;
}
+ /*
+ * Preparing the list data
+ *
+ * @param context
+ * @param listDataHeader
+ * @param listChildData
+ */
+ public static void prepareListData(Context context, List listDataHeader, HashMap> listDataChild) {
+ listDataChild.clear();
+ listDataHeader.clear();
+ for (int i = 0; i < 23; i++)
+ listDataHeader.add("");
+ Collections.copy(listDataHeader, Arrays.asList(context.getResources().getStringArray(R.array.dataheaders)));
+ // adding child data
+ List assault = new ArrayList();
+ assault.add(context.getString(R.string.asexual_assault));
+
+ List assailant = new ArrayList();
+ assailant.add(context.getString(R.string.assailant_info));
+
+ List burglary = new ArrayList();
+ burglary.add(context.getString(R.string.burglary_info));
+
+ List intervention = new ArrayList();
+ intervention.add(context.getString(R.string.intervention_info));
+
+ List phenomenon = new ArrayList();
+ phenomenon.add(context.getString(R.string.phenomenon_info));
+
+ List cyber = new ArrayList();
+ cyber.add(context.getString(R.string.cyber_info));
+
+ List danger = new ArrayList();
+ danger.add(context.getString(R.string.danger_info));
+
+ List mitigate = new ArrayList();
+ mitigate.add(context.getString(R.string.mitigation_info));
+
+ List pii = new ArrayList();
+ pii.add(context.getString(R.string.pii_info));
+
+ List rape = new ArrayList();
+ rape.add(context.getString(R.string.rape_info));
+
+ List risk = new ArrayList();
+ risk.add(context.getString(R.string.risk_info));
+
+ List rob = new ArrayList();
+ rob.add(context.getString(R.string.robbery_info));
+
+ List safe = new ArrayList();
+ safe.add(context.getString(R.string.safety_info));
+
+ List security = new ArrayList();
+ security.add(context.getString(R.string.security_info));
+
+ List sexual_assault = new ArrayList();
+
+ sexual_assault.add(context.getString(R.string.sexual_assault_info1));
+
+ List exploit = new ArrayList();
+ exploit.add(context.getString(R.string.exploitation_info));
+
+ List harass = new ArrayList();
+ harass.add(context.getString(R.string.harassment_info));
+
+ List misconduct = new ArrayList();
+ misconduct.add(context.getString(R.string.misconduct_info));
+
+ List threat = new ArrayList();
+ threat.add(context.getString(R.string.threat_info));
+
+ List predator = new ArrayList();
+ predator.add(context.getString(R.string.predator_info));
+
+ List stalk = new ArrayList();
+ stalk.add(context.getString(R.string.stalking_info));
+
+ List theft = new ArrayList();
+ theft.add(context.getString(R.string.theft_info));
+
+ List vulnerability = new ArrayList();
+ vulnerability.add(context.getString(R.string.vulnerability_info));
+
+ listDataChild.put(listDataHeader.get(0), assault);
+ listDataChild.put(listDataHeader.get(1), assailant);
+ listDataChild.put(listDataHeader.get(2), burglary);
+ listDataChild.put(listDataHeader.get(3), intervention);
+ listDataChild.put(listDataHeader.get(4), phenomenon);
+ listDataChild.put(listDataHeader.get(5), cyber);
+ listDataChild.put(listDataHeader.get(6), danger);
+ listDataChild.put(listDataHeader.get(7), mitigate);
+ listDataChild.put(listDataHeader.get(8), pii);
+ listDataChild.put(listDataHeader.get(9), rape);
+ listDataChild.put(listDataHeader.get(10), risk);
+ listDataChild.put(listDataHeader.get(11), rob);
+ listDataChild.put(listDataHeader.get(12), safe);
+ listDataChild.put(listDataHeader.get(13), security);
+ listDataChild.put(listDataHeader.get(14), sexual_assault);
+ listDataChild.put(listDataHeader.get(15), exploit);
+ listDataChild.put(listDataHeader.get(16), harass);
+ listDataChild.put(listDataHeader.get(17), misconduct);
+ listDataChild.put(listDataHeader.get(18), predator);
+ listDataChild.put(listDataHeader.get(19), threat);
+ listDataChild.put(listDataHeader.get(20), stalk);
+ listDataChild.put(listDataHeader.get(21), theft);
+ listDataChild.put(listDataHeader.get(22), vulnerability);
+ }
+
@Override
public Object getChild(int groupPosition, int childPosition) {
return this.dataChild.get(this.dataHeader.get(groupPosition))
@@ -74,9 +184,9 @@ public long getChildId(int groupPosition, int childPosition) {
*
* @param groupPosition contains the selected group numeric id.
* @param childPosition contains the selected child numeric id.
- * @param isLastChild bool to determine wheather the child is last one or not.
- * @param convertView to Inflate the child rows
- * @param parent if non-null, this is the parent view that the fragment's UI should be attached to
+ * @param isLastChild bool to determine wheather the child is last one or not.
+ * @param convertView to Inflate the child rows
+ * @param parent if non-null, this is the parent view that the fragment's UI should be attached to
* @return the inflated child rows.
*/
@Override
@@ -91,10 +201,13 @@ public View getChildView(int groupPosition, final int childPosition,
convertView = inflater.inflate(R.layout.fragment_glossary_meaning, null);
}
- TextView txtListChild = (TextView) convertView
+ DocumentView txtListChild = (DocumentView) convertView
.findViewById(R.id.word_meaning);
-
+ txtListChild.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ txtListChild.getDocumentLayoutParams().setHyphenated(true);
txtListChild.setText(Html.fromHtml(childText));
+
return convertView;
}
@@ -138,9 +251,9 @@ public long getGroupId(int groupPosition) {
* To inflate parent rows view
*
* @param groupPosition contains the selected group numeric id.
- * @param isExpanded bool to check if the parent is expended or not.
- * @param convertView to Inflate the parent rows
- * @param parent if non-null, this is the parent view that the fragment's UI should be attached to
+ * @param isExpanded bool to check if the parent is expended or not.
+ * @param convertView to Inflate the parent rows
+ * @param parent if non-null, this is the parent view that the fragment's UI should be attached to
* @return the inflated parent rows.
*/
@Override
@@ -184,134 +297,22 @@ public boolean isChildSelectable(int groupPosition, int childPosition) {
*
* @param textEntered take input from the edit text present in {@link GlossaryFragment}
*/
- public void filter(String textEntered)
- {
+ public void filter(String textEntered) {
prepareListData(_context, dataHeader, dataChild);
Iterator listIt = dataHeader.iterator();
- while (listIt.hasNext())
- {
+ while (listIt.hasNext()) {
String next = (String) listIt.next();
- if(next.length() < textEntered.length() || !next.toUpperCase().startsWith(textEntered.toUpperCase())){
+ if (next.length() < textEntered.length() || !next.toUpperCase().startsWith(textEntered.toUpperCase())) {
listIt.remove();
}
}
- for(Iterator>> it = dataChild.entrySet().iterator(); it.hasNext(); ) {
+ for (Iterator>> it = dataChild.entrySet().iterator(); it.hasNext(); ) {
Map.Entry> entry = it.next();
- if(!dataHeader.contains(entry.getKey())) {
+ if (!dataHeader.contains(entry.getKey())) {
it.remove();
}
}
notifyDataSetChanged();
}
-
- /*
- * Preparing the list data
- *
- * @param context
- * @param listDataHeader
- * @param listChildData
- */
- public static void prepareListData(Context context,List listDataHeader,HashMap> listDataChild)
- {
- listDataChild.clear();
- listDataHeader.clear();
- for(int i =0; i<23;i++)
- listDataHeader.add("");
- Collections.copy(listDataHeader,Arrays.asList(context.getResources().getStringArray(R.array.dataheaders)));
- // adding child data
- List assault = new ArrayList();
- assault.add(context.getString(R.string.asexual_assault));
-
- List assailant = new ArrayList();
- assailant.add(context.getString(R.string.assailant_info));
-
- List burglary = new ArrayList();
- burglary.add(context.getString(R.string.burglary_info));
-
- List intervention = new ArrayList();
- intervention.add(context.getString(R.string.intervention_info));
-
- List phenomenon = new ArrayList();
- phenomenon.add(context.getString(R.string.phenomenon_info));
-
- List cyber = new ArrayList();
- cyber.add(context.getString(R.string.cyber_info));
-
- List danger = new ArrayList();
- danger.add(context.getString(R.string.danger_info));
-
- List mitigate = new ArrayList();
- mitigate.add(context.getString(R.string.mitigation_info));
-
- List pii = new ArrayList();
- pii.add(context.getString(R.string.pii_info));
-
- List rape = new ArrayList();
- rape.add(context.getString(R.string.rape_info));
-
- List risk = new ArrayList();
- risk.add(context.getString(R.string.risk_info));
-
- List rob = new ArrayList();
- rob.add(context.getString(R.string.robbery_info));
-
- List safe = new ArrayList();
- safe.add(context.getString(R.string.safety_info));
-
- List security = new ArrayList();
- security.add(context.getString(R.string.security_info));
-
- List sexual_assault = new ArrayList();
-
- sexual_assault.add(context.getString(R.string.sexual_assault_info1));
-
- List exploit = new ArrayList();
- exploit.add(context.getString(R.string.exploitation_info));
-
- List harass = new ArrayList();
- harass.add(context.getString(R.string.harassment_info));
-
- List misconduct = new ArrayList();
- misconduct.add(context.getString(R.string.misconduct_info));
-
- List threat = new ArrayList();
- threat.add(context.getString(R.string.threat_info));
-
- List predator = new ArrayList();
- predator.add(context.getString(R.string.predator_info));
-
- List stalk = new ArrayList();
- stalk.add(context.getString(R.string.stalking_info));
-
- List theft = new ArrayList();
- theft.add(context.getString(R.string.theft_info));
-
- List vulnerability = new ArrayList();
- vulnerability.add(context.getString(R.string.vulnerability_info));
-
- listDataChild.put(listDataHeader.get(0), assault);
- listDataChild.put(listDataHeader.get(1), assailant);
- listDataChild.put(listDataHeader.get(2), burglary);
- listDataChild.put(listDataHeader.get(3), intervention);
- listDataChild.put(listDataHeader.get(4), phenomenon);
- listDataChild.put(listDataHeader.get(5), cyber);
- listDataChild.put(listDataHeader.get(6), danger);
- listDataChild.put(listDataHeader.get(7), mitigate);
- listDataChild.put(listDataHeader.get(8), pii);
- listDataChild.put(listDataHeader.get(9), rape);
- listDataChild.put(listDataHeader.get(10), risk);
- listDataChild.put(listDataHeader.get(11), rob);
- listDataChild.put(listDataHeader.get(12), safe);
- listDataChild.put(listDataHeader.get(13), security);
- listDataChild.put(listDataHeader.get(14), sexual_assault);
- listDataChild.put(listDataHeader.get(15), exploit);
- listDataChild.put(listDataHeader.get(16), harass);
- listDataChild.put(listDataHeader.get(17), misconduct);
- listDataChild.put(listDataHeader.get(18), predator);
- listDataChild.put(listDataHeader.get(19), threat);
- listDataChild.put(listDataHeader.get(20), stalk);
- listDataChild.put(listDataHeader.get(21), theft);
- listDataChild.put(listDataHeader.get(22), vulnerability);
- }
}
diff --git a/app/src/main/java/com/peacecorps/pcsa/policies_glossary/PoliciesFragment.java b/app/src/main/java/com/peacecorps/pcsa/policies_glossary/PoliciesFragment.java
index 0f8f49c..1f0d239 100644
--- a/app/src/main/java/com/peacecorps/pcsa/policies_glossary/PoliciesFragment.java
+++ b/app/src/main/java/com/peacecorps/pcsa/policies_glossary/PoliciesFragment.java
@@ -9,6 +9,7 @@
import android.view.ViewGroup;
import android.widget.Button;
+import com.peacecorps.pcsa.FormattedSingleTextViewFragment;
import com.peacecorps.pcsa.MainActivity;
import com.peacecorps.pcsa.R;
import com.peacecorps.pcsa.SingleTextViewFragment;
@@ -46,7 +47,7 @@ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
@Override
public void onClick(View v) {
//Swapping SingleTextViewFragment into the container
- SingleTextViewFragment.showSingleTextLayout(getActivity(),getString(R.string.policies_title),getString(R.string.subtitle_policies)
+ FormattedSingleTextViewFragment.showSingleTextLayout(getActivity(), getString(R.string.policies_title), getString(R.string.subtitle_policies)
,getString(R.string.policies_all));
}
});
diff --git a/app/src/main/java/com/peacecorps/pcsa/safety_tools/FormattedSafetyPlanBasicsContentFragment.java b/app/src/main/java/com/peacecorps/pcsa/safety_tools/FormattedSafetyPlanBasicsContentFragment.java
new file mode 100644
index 0000000..93d503e
--- /dev/null
+++ b/app/src/main/java/com/peacecorps/pcsa/safety_tools/FormattedSafetyPlanBasicsContentFragment.java
@@ -0,0 +1,90 @@
+package com.peacecorps.pcsa.safety_tools;
+
+import android.graphics.Typeface;
+import android.graphics.drawable.ColorDrawable;
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v4.app.DialogFragment;
+import android.support.v4.app.FragmentActivity;
+import android.support.v4.app.FragmentManager;
+import android.text.Html;
+import android.text.style.RelativeSizeSpan;
+import android.util.TypedValue;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.bluejamesbond.text.DocumentView;
+import com.bluejamesbond.text.hyphen.DefaultHyphenator;
+import com.bluejamesbond.text.style.JustifiedSpan;
+import com.bluejamesbond.text.style.TextAlignment;
+import com.bluejamesbond.text.util.ArticleBuilder;
+import com.peacecorps.pcsa.JustificationUtil;
+import com.peacecorps.pcsa.R;
+
+/**
+ * One Fragment which acts like a placeholder for every different screens of Safety Plan Basics
+ * Created by ashu on 5/2/17.
+ */
+
+public class FormattedSafetyPlanBasicsContentFragment extends DialogFragment {
+ public static final String TITLE_KEY = "title";
+ public static final String CONTENT_KEY = "content";
+ TextView titleToDisplay;
+ DocumentView contenttoDisplay;
+ LinearLayout parentView;
+
+ /**
+ * Populates the required data for the dialog box which appears
+ *
+ * @param title title of the dialog box
+ * @param contentToShow data to be displayed
+ */
+ public static void showDialog(FragmentActivity context, String title, String contentToShow) {
+ FragmentManager fm = context.getSupportFragmentManager();
+ FormattedSafetyPlanBasicsContentFragment safetyPlanBasicsContentFragment = new FormattedSafetyPlanBasicsContentFragment();
+ Bundle bundle = new Bundle();
+ bundle.putString(TITLE_KEY, title);
+ bundle.putString(CONTENT_KEY, contentToShow);
+ safetyPlanBasicsContentFragment.setArguments(bundle);
+ safetyPlanBasicsContentFragment.show(fm, "Sample Fragment");
+ }
+
+ @Nullable
+ @Override
+ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ View rootView = inflater.inflate(R.layout.fragment_formatted_safety_plan_basics_content, container, false);
+ JustificationUtil util = new JustificationUtil(getActivity().getApplicationContext());
+ parentView = (LinearLayout) rootView.findViewById(R.id.myView);
+ getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
+ titleToDisplay = (TextView) rootView.findViewById(R.id.safety_plan_basics_title);
+ String title = getArguments().getString(TITLE_KEY);
+ String content = getArguments().getString(CONTENT_KEY);
+ ArticleBuilder articleBuilder = new ArticleBuilder();
+ articleBuilder.append(content, true, new RelativeSizeSpan(1f), new JustifiedSpan());
+ contenttoDisplay = util.addDocumentView(Html.toHtml(articleBuilder), DocumentView.FORMATTED_TEXT, false, null,getActivity());
+ contenttoDisplay.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
+ contenttoDisplay.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ contenttoDisplay.getDocumentLayoutParams().setHyphenated(true);
+ LinearLayout linearLayout = (LinearLayout) rootView.findViewById(R.id.safety_plan_basics_content);
+ linearLayout.addView(contenttoDisplay);
+
+ //contenttoDisplay.setMovementMethod(new ScrollingMovementMethod());
+ if (title != null) {
+ titleToDisplay.setText(Html.fromHtml(title));
+ titleToDisplay.setTypeface(null, Typeface.BOLD);
+ titleToDisplay.setTextSize(TypedValue.COMPLEX_UNIT_SP, 17);
+ titleToDisplay.setGravity(Gravity.CENTER);
+ getDialog().setTitle(title);
+ } else {
+ titleToDisplay.setVisibility(View.GONE);
+ contenttoDisplay.setLayoutParams
+ (new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
+ }
+ return rootView;
+ }
+}
diff --git a/app/src/main/java/com/peacecorps/pcsa/safety_tools/SafetyPlanBasicsContentFragment.java b/app/src/main/java/com/peacecorps/pcsa/safety_tools/SafetyPlanBasicsContentFragment.java
index ae6fb0e..78be054 100644
--- a/app/src/main/java/com/peacecorps/pcsa/safety_tools/SafetyPlanBasicsContentFragment.java
+++ b/app/src/main/java/com/peacecorps/pcsa/safety_tools/SafetyPlanBasicsContentFragment.java
@@ -1,6 +1,5 @@
package com.peacecorps.pcsa.safety_tools;
-import android.graphics.Color;
import android.graphics.Typeface;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
@@ -9,7 +8,6 @@
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.text.Html;
-import android.text.method.ScrollingMovementMethod;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.LayoutInflater;
@@ -18,6 +16,8 @@
import android.widget.LinearLayout;
import android.widget.TextView;
+import com.bluejamesbond.text.DocumentView;
+import com.bluejamesbond.text.hyphen.DefaultHyphenator;
import com.peacecorps.pcsa.R;
/*
@@ -28,10 +28,28 @@
*/
public class SafetyPlanBasicsContentFragment extends DialogFragment {
- TextView contenttoDisplay,titleToDisplay;
public static final String TITLE_KEY = "title";
public static final String CONTENT_KEY = "content";
+ TextView titleToDisplay;
+ DocumentView contenttoDisplay;
LinearLayout parentView;
+
+ /**
+ * Populates the required data for the dialog box which appears
+ *
+ * @param title title of the dialog box
+ * @param contentToShow data to be displayed
+ */
+ public static void showDialog(FragmentActivity context, String title, String contentToShow) {
+ FragmentManager fm = context.getSupportFragmentManager();
+ SafetyPlanBasicsContentFragment safetyPlanBasicsContentFragment = new SafetyPlanBasicsContentFragment();
+ Bundle bundle = new Bundle();
+ bundle.putString(TITLE_KEY, title);
+ bundle.putString(CONTENT_KEY, contentToShow);
+ safetyPlanBasicsContentFragment.setArguments(bundle);
+ safetyPlanBasicsContentFragment.show(fm, "Sample Fragment");
+ }
+
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
@@ -39,40 +57,27 @@ public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
View rootView = inflater.inflate(R.layout.fragment_safety_plan_basics_content, container, false);
parentView = (LinearLayout) rootView.findViewById(R.id.myView);
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
- contenttoDisplay = (TextView) rootView.findViewById(R.id.safety_plan_basics_content);
+ contenttoDisplay = (DocumentView) rootView.findViewById(R.id.justified_textView);
titleToDisplay = (TextView) rootView.findViewById(R.id.safety_plan_basics_title);
String title = getArguments().getString(TITLE_KEY);
String content = getArguments().getString(CONTENT_KEY);
contenttoDisplay.setText(Html.fromHtml(content));
- contenttoDisplay.setMovementMethod(new ScrollingMovementMethod());
- if(title != null) {
+ contenttoDisplay.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ contenttoDisplay.getDocumentLayoutParams().setHyphenated(true);
+
+ //contenttoDisplay.setMovementMethod(new ScrollingMovementMethod());
+ if (title != null) {
titleToDisplay.setText(Html.fromHtml(title));
- titleToDisplay.setTypeface(null,Typeface.BOLD);
- titleToDisplay.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18);
+ titleToDisplay.setTypeface(null, Typeface.BOLD);
+ titleToDisplay.setTextSize(TypedValue.COMPLEX_UNIT_SP, 17);
titleToDisplay.setGravity(Gravity.CENTER);
getDialog().setTitle(title);
- }
- else
- {
+ } else {
titleToDisplay.setVisibility(View.GONE);
- contenttoDisplay.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
+ contenttoDisplay.setLayoutParams
+ (new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
}
return rootView;
}
-
- /**
- * Populates the required data for the dialog box which appears
- * @param title title of the dialog box
- * @param contentToShow data to be displayed
- */
- public static void showDialog(FragmentActivity context, String title, String contentToShow)
- {
- FragmentManager fm = context.getSupportFragmentManager();
- SafetyPlanBasicsContentFragment safetyPlanBasicsContentFragment = new SafetyPlanBasicsContentFragment();
- Bundle bundle = new Bundle();
- bundle.putString(TITLE_KEY,title);
- bundle.putString(CONTENT_KEY,contentToShow);
- safetyPlanBasicsContentFragment.setArguments(bundle);
- safetyPlanBasicsContentFragment.show(fm,"Sample Fragment");
- }
}
diff --git a/app/src/main/java/com/peacecorps/pcsa/safety_tools/ScreenSlideCustomPagerAdapter.java b/app/src/main/java/com/peacecorps/pcsa/safety_tools/ScreenSlideCustomPagerAdapter.java
index 6823710..498bc7b 100644
--- a/app/src/main/java/com/peacecorps/pcsa/safety_tools/ScreenSlideCustomPagerAdapter.java
+++ b/app/src/main/java/com/peacecorps/pcsa/safety_tools/ScreenSlideCustomPagerAdapter.java
@@ -1,18 +1,27 @@
package com.peacecorps.pcsa.safety_tools;
import android.content.Context;
+import android.graphics.Typeface;
import android.support.v4.view.PagerAdapter;
import android.text.Html;
+import android.text.style.RelativeSizeSpan;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.TextView;
+import android.widget.LinearLayout;
+import com.bluejamesbond.text.DocumentView;
+import com.bluejamesbond.text.hyphen.DefaultHyphenator;
+import com.bluejamesbond.text.style.JustifiedSpan;
+import com.bluejamesbond.text.style.TextAlignment;
+import com.bluejamesbond.text.util.ArticleBuilder;
+import com.peacecorps.pcsa.JustificationUtil;
import com.peacecorps.pcsa.R;
/**
* A simple pager adapter that represents 5 ScreenSlidePageFragment objects, in
* sequence.
+ *
* @author rohan
* @since 08-07-2016.
*/
@@ -20,16 +29,16 @@ public class ScreenSlideCustomPagerAdapter extends PagerAdapter {
Context mContext;
LayoutInflater mLayoutInflater;
- private int[] steps;
int no_of_pages;
+ private int[] steps;
- public ScreenSlideCustomPagerAdapter(Context context,int[] steps,int no_of_pages)
- {
+ public ScreenSlideCustomPagerAdapter(Context context, int[] steps, int no_of_pages) {
mContext = context;
mLayoutInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
this.steps = steps;
this.no_of_pages = no_of_pages;
}
+
@Override
public int getCount() {
return no_of_pages;
@@ -42,9 +51,21 @@ public boolean isViewFromObject(View view, Object object) {
@Override
public Object instantiateItem(ViewGroup container, int position) {
- View itemView = mLayoutInflater.inflate(R.layout.fragment_viewpager, container,false);
- TextView textView = (TextView) itemView.findViewById(R.id.text_to_show);
- textView.setText(Html.fromHtml(mContext.getString(steps[position])));
+ View itemView = mLayoutInflater.inflate(R.layout.fragment_viewpager, container, false);
+
+ JustificationUtil util = new JustificationUtil(mContext.getApplicationContext());
+ ArticleBuilder articleBuilder = new ArticleBuilder();
+ articleBuilder.append(mContext.getString(steps[position]),
+ true, new RelativeSizeSpan(1f), new JustifiedSpan());
+ DocumentView textView = util.addDocumentView(Html.toHtml(articleBuilder),
+ DocumentView.FORMATTED_TEXT, false, mContext,null);
+ textView.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
+ textView.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ textView.getDocumentLayoutParams().setHyphenated(true);
+ LinearLayout cAssault = (LinearLayout) itemView.findViewById(R.id.text_to_show);
+ cAssault.addView(textView);
+
container.addView(itemView);
return itemView;
}
@@ -53,4 +74,5 @@ public Object instantiateItem(ViewGroup container, int position) {
public void destroyItem(ViewGroup container, int position, Object object) {
container.removeView((View) object);
}
+
}
\ No newline at end of file
diff --git a/app/src/main/java/com/peacecorps/pcsa/safety_tools/TacticsFragment.java b/app/src/main/java/com/peacecorps/pcsa/safety_tools/TacticsFragment.java
index 592e738..f5839e4 100644
--- a/app/src/main/java/com/peacecorps/pcsa/safety_tools/TacticsFragment.java
+++ b/app/src/main/java/com/peacecorps/pcsa/safety_tools/TacticsFragment.java
@@ -5,12 +5,12 @@
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.text.Html;
-import android.text.method.ScrollingMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.TextView;
+import com.bluejamesbond.text.DocumentView;
+import com.bluejamesbond.text.hyphen.DefaultHyphenator;
import com.peacecorps.pcsa.R;
/*
@@ -21,21 +21,30 @@
*/
public class TacticsFragment extends Fragment {
- private TextView characteristicsAssault,tacticsAssault;
public final static String TAG = TacticsFragment.class.getSimpleName();
+ private DocumentView characteristicsAssault;
+ private DocumentView tacticsAssault;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
- View rootView = inflater.inflate(R.layout.fragment_tactics,container,false);
- characteristicsAssault = (TextView) rootView.findViewById(R.id.tactics_characteristics_assault);
- tacticsAssault = (TextView) rootView.findViewById(R.id.tactics_tactics_assault);
- characteristicsAssault.setMovementMethod(new ScrollingMovementMethod());
- tacticsAssault.setMovementMethod(new ScrollingMovementMethod());
+ View rootView = inflater.inflate(R.layout.fragment_tactics, container, false);
+ characteristicsAssault = (DocumentView) rootView.findViewById(R.id.tactics_characteristics_assault);
+ tacticsAssault = (DocumentView) rootView.findViewById(R.id.tactics_tactics_assault);
+ //characteristicsAssault.setMovementMethod(new ScrollingMovementMethod());
+ //tacticsAssault.setMovementMethod(new ScrollingMovementMethod());
characteristicsAssault.setText(Html.fromHtml(getActivity().getString(R.string.tactics_1)));
tacticsAssault.setText(Html.fromHtml(getActivity().getString(R.string.tactics_2)));
- ((AppCompatActivity)getActivity()).getSupportActionBar().setTitle(R.string.tactics_title);
+
+ characteristicsAssault.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ characteristicsAssault.getDocumentLayoutParams().setHyphenated(true);
+ tacticsAssault.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ tacticsAssault.getDocumentLayoutParams().setHyphenated(true);
+
+ ((AppCompatActivity) getActivity()).getSupportActionBar().setTitle(R.string.tactics_title);
return rootView;
}
}
diff --git a/app/src/main/java/com/peacecorps/pcsa/sexual_assault_awareness/HarassmentFragment.java b/app/src/main/java/com/peacecorps/pcsa/sexual_assault_awareness/HarassmentFragment.java
index 605c314..6d394d1 100644
--- a/app/src/main/java/com/peacecorps/pcsa/sexual_assault_awareness/HarassmentFragment.java
+++ b/app/src/main/java/com/peacecorps/pcsa/sexual_assault_awareness/HarassmentFragment.java
@@ -1,17 +1,25 @@
package com.peacecorps.pcsa.sexual_assault_awareness;
+import android.graphics.Typeface;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.text.Html;
-import android.view.Gravity;
+import android.text.style.RelativeSizeSpan;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
+import android.widget.LinearLayout;
import android.widget.TextView;
+import com.bluejamesbond.text.DocumentView;
+import com.bluejamesbond.text.hyphen.DefaultHyphenator;
+import com.bluejamesbond.text.style.JustifiedSpan;
+import com.bluejamesbond.text.style.TextAlignment;
+import com.bluejamesbond.text.util.ArticleBuilder;
+import com.peacecorps.pcsa.JustificationUtil;
import com.peacecorps.pcsa.R;
import com.peacecorps.pcsa.SingleTextViewFragment;
@@ -20,30 +28,46 @@
* @author rohan
* @since 2016-07-24
*/
-public class HarassmentFragment extends Fragment{
+public class HarassmentFragment extends Fragment {
- TextView wasContent,subtitle;
- Button knowButton;
public static final String TAG = HarassmentFragment.class.getSimpleName();
+ DocumentView wasContent;
+ TextView subtitle;
+ Button knowButton;
+
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
- View rootView = inflater.inflate(R.layout.fragment_was,container,false);
- wasContent = (TextView)rootView.findViewById(R.id.wasContent);
- subtitle = (TextView)rootView.findViewById(R.id.subtitle);
+ View rootView = inflater.inflate(R.layout.fragment_was, container, false);
+ JustificationUtil util = new JustificationUtil(getActivity().getApplicationContext());
+ //wasContent = (DocumentView) rootView.findViewById(R.id.wasContent);
+ subtitle = (TextView) rootView.findViewById(R.id.subtitle);
subtitle.setText(getString(R.string.harassment_subtitle));
knowButton = (Button) rootView.findViewById(R.id.knowButton);
knowButton.setText(getString(R.string.harassment_subtitle));
- ((AppCompatActivity)getActivity()).getSupportActionBar().setTitle(R.string.harassment);
- wasContent.setText(Html.fromHtml(getString(R.string.harassment_content)));
- wasContent.setGravity(Gravity.CENTER);
+ ((AppCompatActivity) getActivity()).getSupportActionBar().setTitle(R.string.harassment);
+// wasContent.setText(Html.fromHtml(getString(R.string.harassment_content)));
+// wasContent.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+// getInstance(DefaultHyphenator.HyphenPattern.PT));
+// wasContent.getDocumentLayoutParams().setHyphenated(true);
+ //wasContent.setGravity(Gravity.CENTER);
+ ArticleBuilder articleBuilder = new ArticleBuilder();
+ articleBuilder.append(getString(R.string.harassment_content), true, new RelativeSizeSpan(1f), new JustifiedSpan());
+ wasContent = util.addDocumentView(Html.toHtml(articleBuilder), DocumentView.PLAIN_TEXT, false,
+ null,getActivity());
+ wasContent.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
+ wasContent.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ wasContent.getDocumentLayoutParams().setHyphenated(true);
+ LinearLayout linearLayout = (LinearLayout) rootView.findViewById(R.id.was_content);
+ linearLayout.addView(wasContent);
knowButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//Swapping Sexual Harassment info into the fragment container
- SingleTextViewFragment.showSingleTextLayout(getActivity(),getString(R.string.harassment),
- getString(R.string.harassment_subtitle),getString(R.string.harassment_more));
+ SingleTextViewFragment.showSingleTextLayout(getActivity(), getString(R.string.harassment),
+ getString(R.string.harassment_subtitle), getString(R.string.harassment_more));
}
});
return rootView;
diff --git a/app/src/main/java/com/peacecorps/pcsa/sexual_assault_awareness/HelpingFragment.java b/app/src/main/java/com/peacecorps/pcsa/sexual_assault_awareness/HelpingFragment.java
index c9c5751..4f50ee7 100644
--- a/app/src/main/java/com/peacecorps/pcsa/sexual_assault_awareness/HelpingFragment.java
+++ b/app/src/main/java/com/peacecorps/pcsa/sexual_assault_awareness/HelpingFragment.java
@@ -1,15 +1,24 @@
package com.peacecorps.pcsa.sexual_assault_awareness;
+import android.graphics.Typeface;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.text.Html;
+import android.text.style.RelativeSizeSpan;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
+import android.widget.LinearLayout;
import android.widget.TextView;
+import com.bluejamesbond.text.DocumentView;
+import com.bluejamesbond.text.hyphen.DefaultHyphenator;
+import com.bluejamesbond.text.style.JustifiedSpan;
+import com.bluejamesbond.text.style.TextAlignment;
+import com.bluejamesbond.text.util.ArticleBuilder;
+import com.peacecorps.pcsa.JustificationUtil;
import com.peacecorps.pcsa.R;
/*
@@ -20,27 +29,79 @@
public class HelpingFragment extends Fragment {
public static final String TAG = HelpingFragment.class.getSimpleName();
+
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
- View rootView = inflater.inflate(R.layout.fragment_reporting_steps,container,false);
- ((AppCompatActivity)getActivity()).getSupportActionBar().setTitle(R.string.helping_others);
- TextView subtitle = (TextView)rootView.findViewById(R.id.reporting_title_steps);
+ View rootView = inflater.inflate(R.layout.fragment_reporting_steps, container, false);
+ ((AppCompatActivity) getActivity()).getSupportActionBar().setTitle(R.string.helping_others);
+ TextView subtitle = (TextView) rootView.findViewById(R.id.reporting_title_steps);
subtitle.setText(getString(R.string.helping_subtitle));
- TextView reporting_step1 = (TextView) rootView.findViewById(R.id.reporting_step1);
- TextView reporting_step2 = (TextView) rootView.findViewById(R.id.reporting_step2);
- TextView reporting_step3 = (TextView) rootView.findViewById(R.id.reporting_step3);
- TextView reporting_step4 = (TextView) rootView.findViewById(R.id.reporting_step4);
- TextView reporting_step5 = (TextView) rootView.findViewById(R.id.reporting_step5);
- TextView reporting_step6 = (TextView) rootView.findViewById(R.id.reporting_step6);
-
- reporting_step1.setText(Html.fromHtml(getResources().getString(R.string.helping1)));
- reporting_step2.setText(Html.fromHtml(getResources().getString(R.string.helping2)));
- reporting_step3.setText(Html.fromHtml(getResources().getString(R.string.helping3)));
- reporting_step4.setText(Html.fromHtml(getResources().getString(R.string.helping4)));
- reporting_step5.setText(Html.fromHtml(getResources().getString(R.string.helping5)));
- reporting_step6.setVisibility(View.GONE);
+
+ JustificationUtil util = new JustificationUtil(getActivity().getApplicationContext());
+ ArticleBuilder articleBuilder1 = new ArticleBuilder();
+ articleBuilder1.append(getResources().getString(R.string.helping1),
+ true, new RelativeSizeSpan(1f), new JustifiedSpan());
+ DocumentView reporting_step1 = util.addDocumentView(Html.toHtml(articleBuilder1),
+ DocumentView.FORMATTED_TEXT, false,null, getActivity());
+ reporting_step1.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
+ reporting_step1.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ reporting_step1.getDocumentLayoutParams().setHyphenated(true);
+ LinearLayout linearLayout1 = (LinearLayout) rootView.findViewById(R.id.reporting_step1);
+ linearLayout1.addView(reporting_step1);
+
+ ArticleBuilder articleBuilder2 = new ArticleBuilder();
+ articleBuilder2.append(getResources().getString(R.string.helping2),
+ true, new RelativeSizeSpan(1f), new JustifiedSpan());
+ DocumentView reporting_step2 = util.addDocumentView(Html.toHtml(articleBuilder2), DocumentView.FORMATTED_TEXT, false,
+ null,getActivity());
+ reporting_step2.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
+ reporting_step2.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ reporting_step2.getDocumentLayoutParams().setHyphenated(true);
+ LinearLayout linearLayout2 = (LinearLayout) rootView.findViewById(R.id.reporting_step2);
+ linearLayout2.addView(reporting_step2);
+
+ ArticleBuilder articleBuilder3 = new ArticleBuilder();
+ articleBuilder3.append(getResources().getString(R.string.helping3),
+ true, new RelativeSizeSpan(1f), new JustifiedSpan());
+ DocumentView reporting_step3 = util.addDocumentView(Html.toHtml(articleBuilder3), DocumentView.FORMATTED_TEXT, false,
+ null,getActivity());
+ reporting_step3.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
+ reporting_step3.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ reporting_step3.getDocumentLayoutParams().setHyphenated(true);
+ LinearLayout linearLayout3 = (LinearLayout) rootView.findViewById(R.id.reporting_step3);
+ linearLayout3.addView(reporting_step3);
+
+ ArticleBuilder articleBuilder4 = new ArticleBuilder();
+ articleBuilder4.append(getResources().getString(R.string.helping4),
+ true, new RelativeSizeSpan(1f), new JustifiedSpan());
+ DocumentView reporting_step4 = util.addDocumentView(Html.toHtml(articleBuilder4), DocumentView.FORMATTED_TEXT, false,
+ null,getActivity());
+ reporting_step4.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
+ reporting_step4.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ reporting_step4.getDocumentLayoutParams().setHyphenated(true);
+ LinearLayout linearLayout4 = (LinearLayout) rootView.findViewById(R.id.reporting_step4);
+ linearLayout4.addView(reporting_step4);
+
+ ArticleBuilder articleBuilder5 = new ArticleBuilder();
+ articleBuilder5.append(getResources().getString(R.string.helping5),
+ true, new RelativeSizeSpan(1f), new JustifiedSpan());
+ DocumentView reporting_step5 = util.addDocumentView(Html.toHtml(articleBuilder5), DocumentView.FORMATTED_TEXT, false,
+ null,getActivity());
+ reporting_step5.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
+ reporting_step5.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ reporting_step5.getDocumentLayoutParams().setHyphenated(true);
+ LinearLayout linearLayout5 = (LinearLayout) rootView.findViewById(R.id.reporting_step5);
+ linearLayout5.addView(reporting_step5);
+
+ LinearLayout linearLayout6 = (LinearLayout) rootView.findViewById(R.id.reporting_step6);
+ linearLayout6.setVisibility(View.GONE);
return rootView;
}
}
diff --git a/app/src/main/java/com/peacecorps/pcsa/sexual_assault_awareness/MainFragment.java b/app/src/main/java/com/peacecorps/pcsa/sexual_assault_awareness/MainFragment.java
index 54a8e85..e6cceb4 100644
--- a/app/src/main/java/com/peacecorps/pcsa/sexual_assault_awareness/MainFragment.java
+++ b/app/src/main/java/com/peacecorps/pcsa/sexual_assault_awareness/MainFragment.java
@@ -10,6 +10,7 @@
import android.widget.Button;
import android.widget.TextView;
+import com.peacecorps.pcsa.FormattedSingleTextViewFragment;
import com.peacecorps.pcsa.MainActivity;
import com.peacecorps.pcsa.R;
import com.peacecorps.pcsa.SingleTextViewFragment;
@@ -55,7 +56,7 @@ public void onClick(View v) {
impactButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- SingleTextViewFragment.showSingleTextLayout(getActivity(),getString(R.string.impact),
+ FormattedSingleTextViewFragment.showSingleTextLayout(getActivity(), getString(R.string.impact),
getString(R.string.impact_subtitle),getString(R.string.impact_sexual_assault));
}
});
diff --git a/app/src/main/java/com/peacecorps/pcsa/sexual_assault_awareness/WasFragment.java b/app/src/main/java/com/peacecorps/pcsa/sexual_assault_awareness/WasFragment.java
index 0a04f6b..f992e5f 100644
--- a/app/src/main/java/com/peacecorps/pcsa/sexual_assault_awareness/WasFragment.java
+++ b/app/src/main/java/com/peacecorps/pcsa/sexual_assault_awareness/WasFragment.java
@@ -1,17 +1,25 @@
package com.peacecorps.pcsa.sexual_assault_awareness;
+import android.graphics.Typeface;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.text.Html;
-import android.view.Gravity;
+import android.text.style.RelativeSizeSpan;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
+import android.widget.LinearLayout;
import android.widget.TextView;
+import com.bluejamesbond.text.DocumentView;
+import com.bluejamesbond.text.hyphen.DefaultHyphenator;
+import com.bluejamesbond.text.style.JustifiedSpan;
+import com.bluejamesbond.text.style.TextAlignment;
+import com.bluejamesbond.text.util.ArticleBuilder;
+import com.peacecorps.pcsa.JustificationUtil;
import com.peacecorps.pcsa.R;
import com.peacecorps.pcsa.SingleTextViewFragment;
@@ -22,27 +30,41 @@
*/
public class WasFragment extends Fragment {
- TextView wasContent,subtitle;
- Button knowButton;
public static final String TAG = WasFragment.class.getSimpleName();
+ TextView subtitle;
+ DocumentView wasContent;
+ Button knowButton;
+
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
- View rootView = inflater.inflate(R.layout.fragment_was,container,false);
- wasContent = (TextView)rootView.findViewById(R.id.wasContent);
- subtitle = (TextView)rootView.findViewById(R.id.subtitle);
+ View rootView = inflater.inflate(R.layout.fragment_was, container, false);
+ //wasContent = (DocumentView) rootView.findViewById(R.id.wasContent);
+ subtitle = (TextView) rootView.findViewById(R.id.subtitle);
subtitle.setText(getString(R.string.was_assault));
knowButton = (Button) rootView.findViewById(R.id.knowButton);
knowButton.setText(getString(R.string.sexual_assault));
- ((AppCompatActivity)getActivity()).getSupportActionBar().setTitle(R.string.harassment);
- wasContent.setText(Html.fromHtml(getString(R.string.was_content)));
+ ((AppCompatActivity) getActivity()).getSupportActionBar().setTitle(R.string.harassment);
+
+ ArticleBuilder articleBuilder = new ArticleBuilder();
+ articleBuilder.append(getString(R.string.was_content), true, new RelativeSizeSpan(1f), new JustifiedSpan());
+ JustificationUtil util = new JustificationUtil(getActivity().getApplicationContext());
+ wasContent = util.addDocumentView(Html.toHtml(articleBuilder), DocumentView.FORMATTED_TEXT, false,null,
+ getActivity());
+ wasContent.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
+ wasContent.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ wasContent.getDocumentLayoutParams().setHyphenated(true);
+ LinearLayout linearLayout = (LinearLayout) rootView.findViewById(R.id.was_content);
+ linearLayout.addView(wasContent);
+
knowButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//Swapping Sexual Assault info into the fragment container
- SingleTextViewFragment.showSingleTextLayout(getActivity(),getString(R.string.was_assault),
- getString(R.string.sexual_assault),getString(R.string.sexual_assault_info));
+ SingleTextViewFragment.showSingleTextLayout(getActivity(), getString(R.string.was_assault),
+ getString(R.string.sexual_assault), getString(R.string.sexual_assault_info));
}
});
return rootView;
diff --git a/app/src/main/java/com/peacecorps/pcsa/support_services/AvailableFragment.java b/app/src/main/java/com/peacecorps/pcsa/support_services/AvailableFragment.java
index 10cb900..6f394fa 100644
--- a/app/src/main/java/com/peacecorps/pcsa/support_services/AvailableFragment.java
+++ b/app/src/main/java/com/peacecorps/pcsa/support_services/AvailableFragment.java
@@ -4,18 +4,19 @@
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
-import android.text.method.ScrollingMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
-import android.widget.TextView;
+import com.bluejamesbond.text.DocumentView;
+import com.bluejamesbond.text.hyphen.DefaultHyphenator;
import com.peacecorps.pcsa.MainActivity;
import com.peacecorps.pcsa.R;
/**
* Available Services after a Sexual Assault
+ *
* @author Buddhiprabha Erabadda
* @since 07-08-2015
*/
@@ -26,25 +27,32 @@ public class AvailableFragment extends Fragment {
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
- View rootView = inflater.inflate(R.layout.fragment_reporting_types,container,false);
- ((AppCompatActivity)getActivity()).getSupportActionBar().setTitle(R.string.available_services_custom);
+ View rootView = inflater.inflate(R.layout.fragment_reporting_types, container, false);
+ ((AppCompatActivity) getActivity()).getSupportActionBar().setTitle(R.string.available_services_custom);
- TextView descBoth = (TextView) rootView.findViewById(R.id.reporting_both);
- TextView descStandard = (TextView) rootView.findViewById(R.id.reporting_standard);
+ DocumentView descBoth = (DocumentView) rootView.findViewById(R.id.reporting_both);
+ DocumentView descStandard = (DocumentView) rootView.findViewById(R.id.reporting_standard);
final Button faq = (Button) rootView.findViewById(R.id.reporting_faq);
- descBoth.setMovementMethod(new ScrollingMovementMethod());
- descStandard.setMovementMethod(new ScrollingMovementMethod());
+ //descBoth.setMovementMethod(new ScrollingMovementMethod());
+ //descStandard.setMovementMethod(new ScrollingMovementMethod());
- descBoth.setText(R.string.reporting_desc_standard);
- descStandard.setText(R.string.reporting_desc_restricted);
+ descBoth.setText(getActivity().getString(R.string.reporting_desc_standard));
+ descStandard.setText(getActivity().getString(R.string.reporting_desc_restricted));
+
+ descBoth.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ descBoth.getDocumentLayoutParams().setHyphenated(true);
+ descStandard.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ descStandard.getDocumentLayoutParams().setHyphenated(true);
faq.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- ((AppCompatActivity)getActivity()).getSupportActionBar().setTitle(R.string.title_activity_faq);
+ ((AppCompatActivity) getActivity()).getSupportActionBar().setTitle(R.string.title_activity_faq);
Fragment faqFragment = new FAQFragment();
- MainActivity.swapFragmentIn(getActivity(),faqFragment, FAQFragment.TAG,true);
+ MainActivity.swapFragmentIn(getActivity(), faqFragment, FAQFragment.TAG, true);
}
});
diff --git a/app/src/main/java/com/peacecorps/pcsa/support_services/ConfidentialityFragment.java b/app/src/main/java/com/peacecorps/pcsa/support_services/ConfidentialityFragment.java
index 80f49d6..31a5562 100644
--- a/app/src/main/java/com/peacecorps/pcsa/support_services/ConfidentialityFragment.java
+++ b/app/src/main/java/com/peacecorps/pcsa/support_services/ConfidentialityFragment.java
@@ -10,6 +10,7 @@
import android.widget.Button;
import com.peacecorps.pcsa.R;
+import com.peacecorps.pcsa.safety_tools.FormattedSafetyPlanBasicsContentFragment;
import com.peacecorps.pcsa.safety_tools.SafetyPlanBasicsContentFragment;
/*
@@ -49,7 +50,9 @@ public void onClick(View v) {
assaultedButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- SafetyPlanBasicsContentFragment.showDialog(getActivity(),getString(R.string.assaulted_title),getString(R.string.confidentiality_assault));
+ FormattedSafetyPlanBasicsContentFragment.showDialog(getActivity(),
+ getString(R.string.assaulted_title),
+ getString(R.string.confidentiality_assault));
}
});
diff --git a/app/src/main/java/com/peacecorps/pcsa/support_services/FAQArrayAdapter.java b/app/src/main/java/com/peacecorps/pcsa/support_services/FAQArrayAdapter.java
index fbee077..115ff19 100644
--- a/app/src/main/java/com/peacecorps/pcsa/support_services/FAQArrayAdapter.java
+++ b/app/src/main/java/com/peacecorps/pcsa/support_services/FAQArrayAdapter.java
@@ -8,6 +8,8 @@
import android.widget.LinearLayout;
import android.widget.TextView;
+import com.bluejamesbond.text.DocumentView;
+import com.bluejamesbond.text.hyphen.DefaultHyphenator;
import com.peacecorps.pcsa.R;
@@ -38,31 +40,32 @@ public View getView(final int position, View convertView, ViewGroup parent) {
View faq = inflater.inflate(R.layout.faq_layout, parent, false);
final TextView faqTitle = (TextView) faq.findViewById(R.id.faqtitle);
- final TextView faqDesc = (TextView) faq.findViewById(R.id.faqdescription);
+ final DocumentView faqDesc = (DocumentView) faq.findViewById(R.id.faqdescription);
final LinearLayout faq_title_and_image = (LinearLayout) faq.findViewById(R.id.faq_title_and_image);
final TextView viewMoreArrow = (TextView) faq.findViewById(R.id.arrow);
faqTitle.setText(String.valueOf(faqTitles[position]));
faqDesc.setText(String.valueOf(faqDescptions[position]));
- faq_title_and_image.setOnClickListener(new View.OnClickListener(){
+ faqDesc.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ faqDesc.getDocumentLayoutParams().setHyphenated(true);
+
+ faq_title_and_image.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- if (faqDesc.getVisibility() == View.INVISIBLE) {
+ if (faqDesc.getVisibility() == View.GONE) {
faqDesc.setVisibility(View.VISIBLE);
- faqDesc.setMaxLines(Integer.MAX_VALUE);
faq_title_and_image.setBackgroundResource(R.drawable.bg_textview_faq_rounded_upper);
viewMoreArrow.setRotation(180);
} else {
- faqDesc.setVisibility(View.INVISIBLE);
- faqDesc.setMaxLines(0);
+ faqDesc.setVisibility(View.GONE);
faq_title_and_image.setBackgroundResource(R.drawable.bg_textview_rounded_rectangle);
viewMoreArrow.setRotation(90);
}
}
});
-
return faq;
}
}
diff --git a/app/src/main/java/com/peacecorps/pcsa/support_services/StepsFragment.java b/app/src/main/java/com/peacecorps/pcsa/support_services/StepsFragment.java
index 02b0132..af1d48c 100644
--- a/app/src/main/java/com/peacecorps/pcsa/support_services/StepsFragment.java
+++ b/app/src/main/java/com/peacecorps/pcsa/support_services/StepsFragment.java
@@ -1,15 +1,23 @@
package com.peacecorps.pcsa.support_services;
+import android.graphics.Typeface;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.text.Html;
+import android.text.style.RelativeSizeSpan;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.TextView;
+import android.widget.LinearLayout;
+import com.bluejamesbond.text.DocumentView;
+import com.bluejamesbond.text.hyphen.DefaultHyphenator;
+import com.bluejamesbond.text.style.JustifiedSpan;
+import com.bluejamesbond.text.style.TextAlignment;
+import com.bluejamesbond.text.util.ArticleBuilder;
+import com.peacecorps.pcsa.JustificationUtil;
import com.peacecorps.pcsa.R;
/**
@@ -21,25 +29,86 @@
public class StepsFragment extends Fragment {
public final static String TAG = StepsFragment.class.getSimpleName();
-
+
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
- View rootView = inflater.inflate(R.layout.fragment_reporting_steps,container,false);
- ((AppCompatActivity)getActivity()).getSupportActionBar().setTitle(R.string.after_assault);
- TextView reporting_step1 = (TextView) rootView.findViewById(R.id.reporting_step1);
- TextView reporting_step2 = (TextView) rootView.findViewById(R.id.reporting_step2);
- TextView reporting_step3 = (TextView) rootView.findViewById(R.id.reporting_step3);
- TextView reporting_step4 = (TextView) rootView.findViewById(R.id.reporting_step4);
- TextView reporting_step5 = (TextView) rootView.findViewById(R.id.reporting_step5);
- TextView reporting_step6 = (TextView) rootView.findViewById(R.id.reporting_step6);
-
- reporting_step1.setText(Html.fromHtml(getResources().getString(R.string.reporting_step1)));
- reporting_step2.setText(Html.fromHtml(getResources().getString(R.string.reporting_step2)));
- reporting_step3.setText(Html.fromHtml(getResources().getString(R.string.reporting_step3)));
- reporting_step4.setText(Html.fromHtml(getResources().getString(R.string.reporting_step4)));
- reporting_step5.setText(Html.fromHtml(getResources().getString(R.string.reporting_step5)));
- reporting_step6.setText(Html.fromHtml(getResources().getString(R.string.reporting_step6)));
+ View rootView = inflater.inflate(R.layout.fragment_reporting_steps, container, false);
+ ((AppCompatActivity) getActivity()).getSupportActionBar().setTitle(R.string.after_assault);
+
+ JustificationUtil util = new JustificationUtil(getActivity().getApplicationContext());
+ ArticleBuilder articleBuilder1 = new ArticleBuilder();
+ articleBuilder1.append(getResources().getString(R.string.reporting_step1),
+ true, new RelativeSizeSpan(1f), new JustifiedSpan());
+ DocumentView reporting_step1 = util.addDocumentView(Html.toHtml(articleBuilder1),
+ DocumentView.FORMATTED_TEXT, false,null, getActivity());
+ reporting_step1.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
+ reporting_step1.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ reporting_step1.getDocumentLayoutParams().setHyphenated(true);
+ LinearLayout linearLayout1 = (LinearLayout) rootView.findViewById(R.id.reporting_step1);
+ linearLayout1.addView(reporting_step1);
+
+ ArticleBuilder articleBuilder2 = new ArticleBuilder();
+ articleBuilder2.append(getResources().getString(R.string.reporting_step2),
+ true, new RelativeSizeSpan(1f), new JustifiedSpan());
+ DocumentView reporting_step2 = util.addDocumentView(Html.toHtml(articleBuilder2),
+ DocumentView.FORMATTED_TEXT, false, null,getActivity());
+ reporting_step2.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
+ reporting_step2.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ reporting_step2.getDocumentLayoutParams().setHyphenated(true);
+ LinearLayout linearLayout2 = (LinearLayout) rootView.findViewById(R.id.reporting_step2);
+ linearLayout2.addView(reporting_step2);
+
+ ArticleBuilder articleBuilder3 = new ArticleBuilder();
+ articleBuilder3.append(getResources().getString(R.string.reporting_step3),
+ true, new RelativeSizeSpan(1f), new JustifiedSpan());
+ DocumentView reporting_step3 = util.addDocumentView(Html.toHtml(articleBuilder3),
+ DocumentView.FORMATTED_TEXT, false, null,getActivity());
+ reporting_step3.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
+ reporting_step3.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ reporting_step3.getDocumentLayoutParams().setHyphenated(true);
+ LinearLayout linearLayout3 = (LinearLayout) rootView.findViewById(R.id.reporting_step3);
+ linearLayout3.addView(reporting_step3);
+
+ ArticleBuilder articleBuilder4 = new ArticleBuilder();
+ articleBuilder4.append(getResources().getString(R.string.reporting_step4),
+ true, new RelativeSizeSpan(1f), new JustifiedSpan());
+ DocumentView reporting_step4 = util.addDocumentView(Html.toHtml(articleBuilder4),
+ DocumentView.FORMATTED_TEXT, false,null, getActivity());
+ reporting_step4.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
+ reporting_step4.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ reporting_step4.getDocumentLayoutParams().setHyphenated(true);
+ LinearLayout linearLayout4 = (LinearLayout) rootView.findViewById(R.id.reporting_step4);
+ linearLayout4.addView(reporting_step4);
+
+ ArticleBuilder articleBuilder5 = new ArticleBuilder();
+ articleBuilder5.append(getResources().getString(R.string.reporting_step5),
+ true, new RelativeSizeSpan(1f), new JustifiedSpan());
+ DocumentView reporting_step5 = util.addDocumentView(Html.toHtml(articleBuilder5),
+ DocumentView.FORMATTED_TEXT, false, null,getActivity());
+ reporting_step5.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
+ reporting_step5.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ reporting_step5.getDocumentLayoutParams().setHyphenated(true);
+ LinearLayout linearLayout5 = (LinearLayout) rootView.findViewById(R.id.reporting_step5);
+ linearLayout5.addView(reporting_step5);
+
+ ArticleBuilder articleBuilder6 = new ArticleBuilder();
+ articleBuilder6.append(getResources().getString(R.string.reporting_step6),
+ true, new RelativeSizeSpan(1f), new JustifiedSpan());
+ DocumentView reporting_step6 = util.addDocumentView(Html.toHtml(articleBuilder6),
+ DocumentView.FORMATTED_TEXT, false, null,getActivity());
+ reporting_step6.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
+ reporting_step6.getDocumentLayoutParams().setHyphenator(DefaultHyphenator.
+ getInstance(DefaultHyphenator.HyphenPattern.PT));
+ reporting_step6.getDocumentLayoutParams().setHyphenated(true);
+ LinearLayout linearLayout6 = (LinearLayout) rootView.findViewById(R.id.reporting_step6);
+ linearLayout6.addView(reporting_step6);
+
return rootView;
}
}
diff --git a/app/src/main/java/com/peacecorps/pcsa/support_services/SupportServicesFragment.java b/app/src/main/java/com/peacecorps/pcsa/support_services/SupportServicesFragment.java
index 93e91f8..7bf1f8d 100644
--- a/app/src/main/java/com/peacecorps/pcsa/support_services/SupportServicesFragment.java
+++ b/app/src/main/java/com/peacecorps/pcsa/support_services/SupportServicesFragment.java
@@ -11,6 +11,7 @@
import android.view.ViewGroup;
import android.widget.Button;
+import com.peacecorps.pcsa.FormattedSingleTextViewFragment;
import com.peacecorps.pcsa.MainActivity;
import com.peacecorps.pcsa.R;
import com.peacecorps.pcsa.SingleTextViewFragment;
@@ -50,14 +51,18 @@ public void onClick(View v) {
showDialog(null,getString(R.string.some_info));
}
});
-
+
benefitsButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- SingleTextViewFragment.showSingleTextLayout(getActivity(),getString(R.string.benefits),getString(R.string.benefits_subtitle),getString(R.string.benefits_info));
+ SingleTextViewFragment
+ .showSingleTextLayout(getActivity(),
+ getString(R.string.benefits),
+ getString(R.string.benefits_subtitle),
+ getString(R.string.benefits_info));
}
});
-
+
servicesButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -66,11 +71,15 @@ public void onClick(View v) {
MainActivity.swapFragmentIn(getActivity(),availableFragment,AvailableFragment.TAG,true);
}
});
-
+
commitmentButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- SingleTextViewFragment.showSingleTextLayout(getActivity(),getString(R.string.commitment),getString(R.string.commitment_subtitle),getString(R.string.commitment_info));
+ FormattedSingleTextViewFragment
+ .showSingleTextLayout(getActivity(),
+ getString(R.string.commitment),
+ getString(R.string.commitment_subtitle),
+ getString(R.string.commitment_info));
}
});
diff --git a/app/src/main/res/layout/faq_layout.xml b/app/src/main/res/layout/faq_layout.xml
index 3f736a9..a2a0e45 100644
--- a/app/src/main/res/layout/faq_layout.xml
+++ b/app/src/main/res/layout/faq_layout.xml
@@ -32,14 +32,15 @@
android:textStyle="bold|italic"/>
-
+ ext:documentView_insetPadding="@dimen/faq_padding" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_bystander.xml b/app/src/main/res/layout/fragment_bystander.xml
index d9ed323..4a619e4 100644
--- a/app/src/main/res/layout/fragment_bystander.xml
+++ b/app/src/main/res/layout/fragment_bystander.xml
@@ -2,50 +2,65 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:background="@color/background_app"
+ android:paddingBottom="@dimen/activity_horizontal_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
- android:paddingBottom="@dimen/activity_horizontal_margin"
- android:background="@color/background_app"
tools:context="com.peacecorps.pcsa.safety_tools.BystanderInterventionFragment">
+
+
+
+
+
+
+
+
-
-
-
-
+
-
-
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_formatted_safety_plan_basics_content.xml b/app/src/main/res/layout/fragment_formatted_safety_plan_basics_content.xml
new file mode 100644
index 0000000..325453a
--- /dev/null
+++ b/app/src/main/res/layout/fragment_formatted_safety_plan_basics_content.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_formatted_single_textview.xml b/app/src/main/res/layout/fragment_formatted_single_textview.xml
new file mode 100644
index 0000000..e1fa3ac
--- /dev/null
+++ b/app/src/main/res/layout/fragment_formatted_single_textview.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_glossary_meaning.xml b/app/src/main/res/layout/fragment_glossary_meaning.xml
index 7e52e79..e3b26c5 100644
--- a/app/src/main/res/layout/fragment_glossary_meaning.xml
+++ b/app/src/main/res/layout/fragment_glossary_meaning.xml
@@ -7,13 +7,15 @@
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingBottom="@dimen/activity_horizontal_margin">
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_radar.xml b/app/src/main/res/layout/fragment_radar.xml
index eece8fc..399dcb7 100644
--- a/app/src/main/res/layout/fragment_radar.xml
+++ b/app/src/main/res/layout/fragment_radar.xml
@@ -40,7 +40,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
- layout="@layout/textview"/>
+ layout="@layout/textview_plain" />
-
+ android:layout_marginTop="@dimen/activity_vertical_margin"
+ android:orientation="vertical"
+ android:background="@drawable/bg_textview_rounded_rectangle"
+ android:fadeScrollbars="false"
+ android:scrollbars="vertical"
+ android:id="@+id/reporting_contact_description"
+ android:layout_gravity="center_horizontal" />
diff --git a/app/src/main/res/layout/fragment_reporting_steps.xml b/app/src/main/res/layout/fragment_reporting_steps.xml
index 87b7ae2..cd6b248 100644
--- a/app/src/main/res/layout/fragment_reporting_steps.xml
+++ b/app/src/main/res/layout/fragment_reporting_steps.xml
@@ -31,24 +31,53 @@
android:orientation="vertical"
android:layout_marginTop="@dimen/activity_vertical_margin">
-
-
-
+
-
+
-
+
-
+
-
+
+
diff --git a/app/src/main/res/layout/fragment_reporting_types.xml b/app/src/main/res/layout/fragment_reporting_types.xml
index 78dde05..207ce29 100644
--- a/app/src/main/res/layout/fragment_reporting_types.xml
+++ b/app/src/main/res/layout/fragment_reporting_types.xml
@@ -51,30 +51,34 @@
android:fadeScrollbars="false"
android:paddingLeft="@dimen/reporting_types_paddingLeft">
-
+ android:scrollbarStyle="insideInset"
+ ext:documentView_antialias="true" />
-
+ android:scrollbarStyle="insideInset"
+ ext:documentView_antialias="true" />
diff --git a/app/src/main/res/layout/fragment_resources.xml b/app/src/main/res/layout/fragment_resources.xml
index 0f2fd96..1f24f44 100644
--- a/app/src/main/res/layout/fragment_resources.xml
+++ b/app/src/main/res/layout/fragment_resources.xml
@@ -20,8 +20,6 @@
android:textSize="@dimen/sub_title_font"
android:text="@string/further_resources"/>
-
-
+ android:text="@string/resources_all" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_safety_plan_basics_content.xml b/app/src/main/res/layout/fragment_safety_plan_basics_content.xml
index 236806e..5020559 100644
--- a/app/src/main/res/layout/fragment_safety_plan_basics_content.xml
+++ b/app/src/main/res/layout/fragment_safety_plan_basics_content.xml
@@ -1,14 +1,29 @@
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
-
-
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_single_textview.xml b/app/src/main/res/layout/fragment_single_textview.xml
index 8c58a17..02ef6ca 100644
--- a/app/src/main/res/layout/fragment_single_textview.xml
+++ b/app/src/main/res/layout/fragment_single_textview.xml
@@ -32,15 +32,18 @@
android:layout_marginTop="@dimen/contacting_post_staff_marginTop_15"
android:background="@drawable/bg_textview_rounded_rectangle">
-
+ android:scrollbarStyle="insideInset"
+ ext:documentView_antialias="true" />
+
diff --git a/app/src/main/res/layout/fragment_tactics.xml b/app/src/main/res/layout/fragment_tactics.xml
index 0ebeaaf..fb55b18 100644
--- a/app/src/main/res/layout/fragment_tactics.xml
+++ b/app/src/main/res/layout/fragment_tactics.xml
@@ -3,71 +3,77 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:background="@color/background_app"
android:orientation="vertical"
+ android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
- android:paddingBottom="@dimen/activity_vertical_margin"
- android:background="@color/background_app"
tools:context="com.peacecorps.pcsa.safety_tools.TacticsFragment">
+ android:textStyle="bold" />
+ android:layout_marginTop="@dimen/abc_action_bar_icon_vertical_padding_material"
+ android:layout_weight="@integer/intro4_linear_layout_weight"
+ android:fadeScrollbars="false">
+ android:paddingBottom="@dimen/activity_vertical_margin">
-
+ android:background="@drawable/bg_textview_rounded_rectangle"
+ android:scrollbars="vertical">
+
+
+
+ android:layout_marginRight="@dimen/activity_horizontal_margin"
+ android:background="@drawable/bg_textview_rounded_rectangle"
+ android:scrollbars="vertical">
-
-
+
+
diff --git a/app/src/main/res/layout/fragment_viewpager.xml b/app/src/main/res/layout/fragment_viewpager.xml
index 083fd8a..af79fc2 100644
--- a/app/src/main/res/layout/fragment_viewpager.xml
+++ b/app/src/main/res/layout/fragment_viewpager.xml
@@ -1,7 +1,11 @@
+ android:layout_height="match_parent"
+ android:background="@drawable/bg_textview_rounded_rectangle">
-
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_was.xml b/app/src/main/res/layout/fragment_was.xml
index f2848d3..65d5b5b 100644
--- a/app/src/main/res/layout/fragment_was.xml
+++ b/app/src/main/res/layout/fragment_was.xml
@@ -43,31 +43,24 @@
+ android:layout_height="match_parent"
+ android:layout_marginTop="@dimen/contacting_post_staff_marginTop_15"
+ android:background="@drawable/bg_textview_rounded_rectangle"
+ android:fadeScrollbars="false"
+ android:scrollbarStyle="insideInset"
+ android:scrollbars="vertical"
+ android:id="@+id/was_content"
+ android:orientation="vertical" />
-
-
-
+ android:layout_weight="1">
-
\ No newline at end of file
+
diff --git a/app/src/main/res/layout/textview.xml b/app/src/main/res/layout/textview.xml
index b358ba9..f931374 100644
--- a/app/src/main/res/layout/textview.xml
+++ b/app/src/main/res/layout/textview.xml
@@ -1,16 +1,23 @@
-
-
-
+
+
+
+ ext:documentView_antialias="true"
+ android:id="@+id/justified_textView"
+ ext:documentView_textSize="@dimen/text_medium"
+ ext:documentView_textAlignment="justified" />
+
diff --git a/app/src/main/res/layout/textview_plain.xml b/app/src/main/res/layout/textview_plain.xml
new file mode 100644
index 0000000..b73ed10
--- /dev/null
+++ b/app/src/main/res/layout/textview_plain.xml
@@ -0,0 +1,14 @@
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index ee94477..a591403 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -49,6 +49,7 @@
32sp
+ 17sp28sp200dp12sp
diff --git a/app/src/main/res/values/information.xml b/app/src/main/res/values/information.xml
index 0bd6ae6..1570985 100644
--- a/app/src/main/res/values/information.xml
+++ b/app/src/main/res/values/information.xml
@@ -77,36 +77,50 @@
-
+
The PC SAVES Helpline provides anonymous confidential crisis intervention, support and information to Peace Corps Volunteers
and trainees who have been affected by sexual assault via a variety of different platforms. All options are staffed by
trained professionals not affiliated with Peace Corps, available 24/7. No personally identifying information will be
- collected.\n\n
- Online Chat: pcsaveshelpline.org
+ collected.<br/> <br/>
+
+ Online Chat: pcsaveshelpline.org]]>
+ pcsaveshelpline.org+1 408 844 4357
-
+
CVictim Advocates are available for Volunteers who are victims of crimes. They can provide information regarding available response services,
- address questions/concerns, and ensure their voices are heard and considered in all decisions affecting service and care.\n\n
- e-mail: victimadvocate@peacecorps.gov
+ address questions/concerns, and ensure their voices are heard and considered in all decisions affecting service and care.<br/> <br/>
+
+
+ e-mail: victimadvocate@peacecorps.gov]]>
+ victimadvocate@peacecorps.gov202 409 2701
-
+
OIG is a resource for those who have been harmed by misconduct or criminal wrongdoing by a fellow Volunteer or Peace Corps Staff.
They are independent from Peace Corps with law enforcement officers who have the unique authorities to help seek a fair resolution and,
- in appropriate cases, to seek prosecution in the United States or host country.\n\n
- e-mail: victimadvocate@peacecorps.gov\n\n
- Learn more: peacecorps.gov/OIG
+ in appropriate cases, to seek prosecution in the United States or host country.<br/> <br/>
+
+
+ e-mail: victimadvocate@peacecorps.gov]]> <br/> <br/>
+
+ Learn more: peacecorps.gov/OIG]]>
+
+ victimadvocate@peacecorps.gov
+ peacecorps.gov/OIG202 692 2915
-
-
+
+
Resource to provide leadership and guidance on all civil rights, equal employment opportunity and diversity matters; and to address
- issues of discrimination and harassment, including sexual harassment, in the recruitment/service of Volunteers/Trainees.\n\n
- email: ocrd@peacecorps.gov
+ issues of discrimination and harassment, including sexual harassment, in the recruitment/service of Volunteers/Trainees. <br/> <br/>
+
+
+ email: ocrd@peacecorps.gov]]>
+ ocrd@peacecorps.govServices available for both Standard and Restricted reports are as follows:\n\n
·Medical Care related to injury, pregnancy, or sexually transmitted infections\n\n
·A sexual assault forensic exam (SAFE) to preserve evidence \n\n
@@ -293,106 +307,106 @@
<b>CONCERNS</b><br/><br/>
- \t\t\tHave you anticipated where and in which ways you might come into contact with the perpetrator and perpetrator’s friends/family?<br/><br/>
- \t\t\tIf you were to come into contact with the perpetrator and perpetrator’s family/friends, what specific things could you do that might help you feel safe in that situation?<br/><br/>
- \t\t\tHave you thought about making a plan in case of emergencies of who you could call, where you could go, and how you could get there? How can Peace Corps assist you in developing this plan?
+ Have you anticipated where and in which ways you might come into contact with the perpetrator and perpetrator’s friends/family?<br/><br/>
+ If you were to come into contact with the perpetrator and perpetrator’s family/friends, what specific things could you do that might help you feel safe in that situation?<br/><br/>
+ Have you thought about making a plan in case of emergencies of who you could call, where you could go, and how you could get there? How can Peace Corps assist you in developing this plan?
<b>ACTIONS</b><br/><br/>
- <b>•</b>\t\t\tKnow where to go for help<br/><br/>
- <b>•</b>\t\t\tHave a way to alert neighbors/counterparts if there’s a problem<br/><br/>
- <b>•</b>\t\t\tHelp develop a phone list of people to call in an emergency<br/><br/>
- <b>•</b>\t\t\tEnsure you have readily accessible emergency contact numbers for local authorities and PC<br/><br/>
- <b>•</b>\t\t\tIf requested, establish contacts between PC and counterpart, neighbors, local police and community leaders so they know how to contact PC<br/><br/>
- <b>•</b>\t\t\tHave your important documents ready in case of an emergency
+ <b>•</b> Know where to go for help<br/><br/>
+ <b>•</b> Have a way to alert neighbors/counterparts if there’s a problem<br/><br/>
+ <b>•</b> Help develop a phone list of people to call in an emergency<br/><br/>
+ <b>•</b> Ensure you have readily accessible emergency contact numbers for local authorities and PC<br/><br/>
+ <b>•</b> If requested, establish contacts between PC and counterpart, neighbors, local police and community leaders so they know how to contact PC<br/><br/>
+ <b>•</b> Have your important documents ready in case of an emergency
<b>CONCERNS</b><br/><br/>
- \t\t\tDo you suspect the perpetrator or the perpetrator’s family/friends know where you live? If so, do you believe the perpetrator may have access to your housing?<br/><br/>
- \t\t\tDo you feel safe inside your home? What can Peace Corps do to help you feel safe inside your home (e.g., working locks on door/windows, etc.)?<br/><br/>
- \t\t\tIf you live with a host family or on a family compound, does anyone know about the incident? If not, would they be supportive if they were to learn of the incident?<br/><br/>
- \t\t\tIf the perpetrator or the perpetrator’s family/friends were to show up at your home are there people you can turn to for assistance?<br/><br/>
- \t\t\tIn the unlikely event of a non-medical emergency, are there local friends, community members, or other Volunteers nearby who you can stay with or contact for assistance? If not, can Peace Corps help you identify individuals and establish those contacts? <br/><br/>
- \t\t\tHow could you contact these individuals?<br/><br/>
- \t\t\tCan you think of other resources or things you can do to feel safer where you live? What can Peace Corps do to assist you with this?
+ Do you suspect the perpetrator or the perpetrator’s family/friends know where you live? If so, do you believe the perpetrator may have access to your housing?<br/><br/>
+ Do you feel safe inside your home? What can Peace Corps do to help you feel safe inside your home (e.g., working locks on door/windows, etc.)?<br/><br/>
+ If you live with a host family or on a family compound, does anyone know about the incident? If not, would they be supportive if they were to learn of the incident?<br/><br/>
+ If the perpetrator or the perpetrator’s family/friends were to show up at your home are there people you can turn to for assistance?<br/><br/>
+ In the unlikely event of a non-medical emergency, are there local friends, community members, or other Volunteers nearby who you can stay with or contact for assistance? If not, can Peace Corps help you identify individuals and establish those contacts? <br/><br/>
+ How could you contact these individuals?<br/><br/>
+ Can you think of other resources or things you can do to feel safer where you live? What can Peace Corps do to assist you with this?
<b>ACTIONS</b><br/><br/>
- <b>•</b>\t\t\tKnow where to go for help<br/><br/>
- <b>•</b>\t\t\tAsk staff to conduct a safety inspection of your home, if necessary<br/><br/>
- <b>•</b>\t\t\tEnsure needed security upgrades are completed<br/><br/>
- <b>•</b>\t\t\tHelp develop a phone list of people to call in an emergency<br/><br/>
- <b>•</b>\t\t\tEnsure that you have readily accessible emergency contact numbers for local authorities and PC<br/><br/>
- <b>•</b>\t\t\tHave a way to alert neighbors/counterparts if there’s a problem<br/><br/>
- <b>•</b>\t\t\tTake steps to enhance privacy (use locks, keep curtains closed, etc)
+ <b>•</b> Know where to go for help<br/><br/>
+ <b>•</b> Ask staff to conduct a safety inspection of your home, if necessary<br/><br/>
+ <b>•</b> Ensure needed security upgrades are completed<br/><br/>
+ <b>•</b> Help develop a phone list of people to call in an emergency<br/><br/>
+ <b>•</b> Ensure that you have readily accessible emergency contact numbers for local authorities and PC<br/><br/>
+ <b>•</b> Have a way to alert neighbors/counterparts if there’s a problem<br/><br/>
+ <b>•</b> Take steps to enhance privacy (use locks, keep curtains closed, etc)
<b>CONCERNS</b><br/><br/>
- \t\t\tDoes the perpetrator know your cell phone number? Your email address? Have you thought about what you would do if the perpetrator or perpetrator’s friends/family attempts to contact you or posts things about you online? What can Peace Corps do to help you?<br/><br/>
- \t\t\tDoes the perpetrator know any of your passwords? If so, have you considered changing your passwords?<br/><br/>
- \t\t\tDo you have any social media accounts (e.g., Facebook, Google, Twitter, Linked In, blogs)? Are you “friends” with the perpetrator or perpetrator’s friends/family? If so, do you know how to block the perpetrator or perpetrator’s family or friends?<br/><br/>
- \t\t\tAre you concerned that the perpetrator or perpetrator’s family/friends will contact you on the Internet? If they do, have you thought about what you will do?
+ Does the perpetrator know your cell phone number? Your email address? Have you thought about what you would do if the perpetrator or perpetrator’s friends/family attempts to contact you or posts things about you online? What can Peace Corps do to help you?<br/><br/>
+ Does the perpetrator know any of your passwords? If so, have you considered changing your passwords?<br/><br/>
+ Do you have any social media accounts (e.g., Facebook, Google, Twitter, Linked In, blogs)? Are you “friends” with the perpetrator or perpetrator’s friends/family? If so, do you know how to block the perpetrator or perpetrator’s family or friends?<br/><br/>
+ Are you concerned that the perpetrator or perpetrator’s family/friends will contact you on the Internet? If they do, have you thought about what you will do?
<b>ACTIONS</b><br/><br/>
- <b>•</b>\t\t\tChange your SIM card or cellphone<br/><br/>
- <b>•</b>\t\t\tEnsure you have readily accessible emergency contact numbers for local authorities and PC<br/><br/>
- <b>•</b>\t\t\tChange user names and/or passwords for mail and other social media<br/><br/>
- <b>•</b>\t\t\tTry to avoid using location services or posting information that may divulge your location<br/><br/>
- <b>•</b>\t\t\tNotify Peace Corps as soon as possible of safety and security concerns or if the offender attempts to contact you.<br/><br/>
- <b>•</b>\t\t\tProgram your phone with important emergency numbers<br/><br/>
- <b>•</b>\t\t\tKeep phone charged and have enough minutes in case of an emergency.
+ <b>•</b> Change your SIM card or cellphone<br/><br/>
+ <b>•</b> Ensure you have readily accessible emergency contact numbers for local authorities and PC<br/><br/>
+ <b>•</b> Change user names and/or passwords for mail and other social media<br/><br/>
+ <b>•</b> Try to avoid using location services or posting information that may divulge your location<br/><br/>
+ <b>•</b> Notify Peace Corps as soon as possible of safety and security concerns or if the offender attempts to contact you.<br/><br/>
+ <b>•</b> Program your phone with important emergency numbers<br/><br/>
+ <b>•</b> Keep phone charged and have enough minutes in case of an emergency.
<b>CONCERNS</b><br/><br/>
- \t\t\tDoes the perpetrator or perpetrator’s family/friends know where you work?<br/><br/>
- \t\t\tDoes anyone else at work know about the incident?<br/><br/>
- \t\t\tIf your counterpart/supervisor learns about the incident, do you think it would make you more or less safe?<br/><br/>
- \t\t\tIf you work with the perpetrator, are there steps you can take to avoid interacting with the perpetrator?<br/><br/>
- \t\t\tIf the perpetrator shows up at your work are there people you can turn to for support?<br/><br/>
- \t\t\tIs there anything that the Peace Corps can do to help you feel safe at work?<br/><br/>
+ Does the perpetrator or perpetrator’s family/friends know where you work?<br/><br/>
+ Does anyone else at work know about the incident?<br/><br/>
+ If your counterpart/supervisor learns about the incident, do you think it would make you more or less safe?<br/><br/>
+ If you work with the perpetrator, are there steps you can take to avoid interacting with the perpetrator?<br/><br/>
+ If the perpetrator shows up at your work are there people you can turn to for support?<br/><br/>
+ Is there anything that the Peace Corps can do to help you feel safe at work?<br/><br/>
<b>ACTIONS</b><br/><br/>
- <b>•</b>\t\t\tMake sure PC has established contact with your counterpart so they know how to contact PC<br/><br/>
- <b>•</b>\t\t\tIdentify an emergency point of contact in the workplace<br/><br/>
- <b>•</b>\t\t\tImmediately notify PC if the offender comes to your work<br/><br/>
- <b>•</b>\t\t\tIf working in isolated areas seek accompaniment by a coworker or community member if possible<br/><br/>
- <b>•</b>\t\t\tAvoid staying late or alone in the office or workplace<br/><br/>
+ <b>•</b> Make sure PC has established contact with your counterpart so they know how to contact PC<br/><br/>
+ <b>•</b> Identify an emergency point of contact in the workplace<br/><br/>
+ <b>•</b> Immediately notify PC if the offender comes to your work<br/><br/>
+ <b>•</b> If working in isolated areas seek accompaniment by a coworker or community member if possible<br/><br/>
+ <b>•</b> Avoid staying late or alone in the office or workplace<br/><br/>
<b>CONCERNS</b><br/><br/>
- \t\t\tDo you anticipate that you will see the perpetrator when you are out in public? If yes, where?<br/><br/>
- \t\t\tDo you see the perpetrator’s family/friends when you are out in public? If yes, where?<br/><br/>
- \t\t\tIf needed, is there someone you trust who can accompany you to the places you need to go?<br/><br/>
- \t\t\tIf you were approached by the perpetrator or perpetrator’s friends/family in a public place, do you know where you could go to be safe?<br/><br/>
- \t\t\tDo you have any concerns about rumors related to the incident that are mentioned by community members or other Volunteers? How might you respond to these? How might these rumors impact you? How can Peace Corps assist you in dealing with rumors?<br/><br/>
- \t\t\tAre there specific things you or Peace Corps can do that might help you feel safer in your community?
+ Do you anticipate that you will see the perpetrator when you are out in public? If yes, where?<br/><br/>
+ Do you see the perpetrator’s family/friends when you are out in public? If yes, where?<br/><br/>
+ If needed, is there someone you trust who can accompany you to the places you need to go?<br/><br/>
+ If you were approached by the perpetrator or perpetrator’s friends/family in a public place, do you know where you could go to be safe?<br/><br/>
+ Do you have any concerns about rumors related to the incident that are mentioned by community members or other Volunteers? How might you respond to these? How might these rumors impact you? How can Peace Corps assist you in dealing with rumors?<br/><br/>
+ Are there specific things you or Peace Corps can do that might help you feel safer in your community?
<b>ACTIONS</b><br/><br/>
- <b>•</b>\t\t\tEstablish regular check-in plan with PCMO and other PC staff<br/><br/>
- <b>•</b>\t\t\tFind out what support services are available to you, including Volunteer Support Network and PCVLs<br/><br/>
- <b>•</b>\t\t\tTrust your instincts; don’t worry about appearing to over-react (over-reacting is okay)<br/><br/>
- <b>•</b>\t\t\tBe aware of unhealthy coping mechanisms such as self-medicating, isolating oneself, hurting oneself, etc. and seek help from PC<br/><br/>
- <b>•</b>\t\t\tAsk Peace Corps for help before stress becomes overwhelming.
+ <b>•</b> Establish regular check-in plan with PCMO and other PC staff<br/><br/>
+ <b>•</b> Find out what support services are available to you, including Volunteer Support Network and PCVLs<br/><br/>
+ <b>•</b> Trust your instincts; don’t worry about appearing to over-react (over-reacting is okay)<br/><br/>
+ <b>•</b> Be aware of unhealthy coping mechanisms such as self-medicating, isolating oneself, hurting oneself, etc. and seek help from PC<br/><br/>
+ <b>•</b> Ask Peace Corps for help before stress becomes overwhelming.
<b>CONCERNS</b><br/><br/>
- \t\t\tDo you have any safety concerns with any modes of transportation related to the incident?<br/><br/>
- \t\t\tDoes the perpetrator know your transportation routes? If yes, can you change the routes you take to work, home, shopping?<br/><br/>
- \t\t\tDoes the perpetrator or the perpetrator’s friends/family use the same transportation you do? If so, are there other ways you could get where you need to go? Is their opportunity for carpooling with someone else?<br/><br/>
- \t\t\tAre there specific things you can think of doing or that Peace Corps might do that might help you feel safer in transport?
+ Do you have any safety concerns with any modes of transportation related to the incident?<br/><br/>
+ Does the perpetrator know your transportation routes? If yes, can you change the routes you take to work, home, shopping?<br/><br/>
+ Does the perpetrator or the perpetrator’s friends/family use the same transportation you do? If so, are there other ways you could get where you need to go? Is their opportunity for carpooling with someone else?<br/><br/>
+ Are there specific things you can think of doing or that Peace Corps might do that might help you feel safer in transport?
<b>ACTIONS</b><br/><br/>
- <b>•</b>\t\t\tAssist with identifying a safe taxi/moto-taxi or bus services<br/><br/>
- <b>•</b>\t\t\tEnsure that the Volunteer has readily accessible emergency contact numbers for local authorities and PC<br/><br/>
- <b>•</b>\t\t\tNotify Peace Corps as soon as possible of safety and security concerns<br/><br/>
- <b>•</b>\t\t\tTrust your instincts; don’t worry about appearing to over-react <br/><br/>
- <b>•</b>\t\t\tModify daily routines, change times and routes to frequent locations if possible<br/><br/>
- <b>•</b>\t\t\tKeep personal belongings secure at all times
+ <b>•</b> Assist with identifying a safe taxi/moto-taxi or bus services<br/><br/>
+ <b>•</b> Ensure that the Volunteer has readily accessible emergency contact numbers for local authorities and PC<br/><br/>
+ <b>•</b> Notify Peace Corps as soon as possible of safety and security concerns<br/><br/>
+ <b>•</b> Trust your instincts; don’t worry about appearing to over-react <br/><br/>
+ <b>•</b> Modify daily routines, change times and routes to frequent locations if possible<br/><br/>
+ <b>•</b> Keep personal belongings secure at all times
@@ -414,34 +428,34 @@
- •\t\t\t Staff will treat you with dignity and respect. No one deserves to be the victim of a sexual assault.
+ • Staff will treat you with dignity and respect. No one deserves to be the victim of a sexual assault.
Peace Corps will believe you if you report a rape or other sexual assault. No one at Peace Corps will blame you or think
the assault was your fault.<br/><br/>
-•\t\t\t Staff will take appropriate steps to provide for your ongoing safety. Every effort will be made to keep you at your site as long
+• Staff will take appropriate steps to provide for your ongoing safety. Every effort will be made to keep you at your site as long
as it is safe for you to continue service. BUT – your safety must always come first.<br/><br/>
-•\t\t\t Staff will provide you with the support you need to aid in your recovery. This means that Peace Corps will provide both
+• Staff will provide you with the support you need to aid in your recovery. This means that Peace Corps will provide both
medical care and emotional support following the event. Each case is handled based on the needs of the Volunteer
and we do not automatically medevac or separate sexual assault victims from service. Although we may recommend medevac so
that you can get the medical and psychological help you need, the decision to medevac is jointly determined by the Volunteer,
the PCMO and the Counseling and Outreach Unit in Washington.<br/><br/>
-•\t\t\t Staff will help you to understand the relevant legal processes and your legal options. Peace Corps understands there may be
+• Staff will help you to understand the relevant legal processes and your legal options. Peace Corps understands there may be
significant cultural, language and legal challenges and as a result will help you navigate the local system. If you are
interested in reporting to the police, we will stand beside you at every step of the process.The decision to report to the police is
yours and yours alone – we will respect whatever decision you make.<br/><br/>
-•\t\t\t Staff will keep you informed of the progress of your case, should you choose to pursue prosecution. Peace Corps will ensure that you
+• Staff will keep you informed of the progress of your case, should you choose to pursue prosecution. Peace Corps will ensure that you
receive timely updates regarding your case whether or not you continue your service. A Victim Advocate will be available to answer
any questions or concerns you have regarding the status of your case.<br/><br/>
-•\t\t\t Staff will work closely with you to make decisions regarding your continued service. No decisions about your site and service will be
+• Staff will work closely with you to make decisions regarding your continued service. No decisions about your site and service will be
made without your input and collaboration.<br/><br/>
-•\t\t\t Staff will respect your privacy and will not, without your consent, disclose your identity or share the details of the incident with
+• Staff will respect your privacy and will not, without your consent, disclose your identity or share the details of the incident with
anyone who does not have a legitimate need to know. Only those people who will be directly involved in your medical, emotional
and security support will know your identity. <br/><br/>
- \t\tThe Peace Corps Director has made it clear that all staff are expected to uphold these commitments, both in actions and words.
+ The Peace Corps Director has made it clear that all staff are expected to uphold these commitments, both in actions and words.
If you are sexually assaulted and you feel that Peace Corps staff members are not living up to the agency’s commitment, you can:<br/><br/>
<b>Contact the agency’s Office of Victim Advocacy, which is independent from staff at post.<br/>
<br/>Contact the Office of the Inspector General, or OIG, which provides independent oversight of agency programs and operations
through regular audits, evaluations and investigations.</b> <br/><br/>
-•\t\t\t If you feel that a sexual assault was not handled according to the agency’s Commitment to Sexual Assault Victims you can
+• If you feel that a sexual assault was not handled according to the agency’s Commitment to Sexual Assault Victims you can
confidentially report to the OIG via an online web form located on Peace Corps’ website, or by phone, or email.
@@ -482,7 +496,7 @@
Peace Corps staff are held to high expectations with regards to confidentiality. All Peace Corps staff and the independent Peace Corps Sexual Assault Hotline responders are trained to safeguard personal information.
If you believe your information is being mishandled, please call the Office of Inspector General (OIG ).
-
+
If you become the victim of a crime, choose who you trust with your sensitive information. Volunteer communications with other Volunteers may not be held to the same rules of privacy that apply to Peace Corps staff or Hotline responders.<br/>
As one Volunteer shared:<br/><br/>
@@ -582,23 +596,23 @@ assist you with your legal options. Peace Corps will be with you every step of t
<b>Physical/Physiological:</b><br/>
- •\t\t\tPhysical injury from the assault itself <br/>
- •\t\t\tPregnancy<br/>
- •\t\t\tSexually Transmitted Infections <br/>
- •\t\t\tSelf-medicating (i.e., alcohol/drug abuse) <br/>
- •\t\t\tSleep disorders<br/>
- •\t\t\tEating disorders <br/>
- •\t\t\tPhysical triggers (sights, smells, sounds, touching) that may produce a physical or psychological reaction <br/>
- •\t\t\tSelf-mutilation (self-inflicted cuts but not to commit suicide) <br/><br/>
+ • Physical injury from the assault itself <br/>
+ • Pregnancy<br/>
+ • Sexually Transmitted Infections <br/>
+ • Self-medicating (i.e., alcohol/drug abuse) <br/>
+ • Sleep disorders<br/>
+ • Eating disorders <br/>
+ • Physical triggers (sights, smells, sounds, touching) that may produce a physical or psychological reaction <br/>
+ • Self-mutilation (self-inflicted cuts but not to commit suicide) <br/><br/>
<b>Psychological/ Emotional:</b><br/>
- •\t\t\tDepression <br/>
- •\t\t\tAnger <br/>
- •\t\t\tFear <br/>
- •\t\t\tAnxiety <br/>
- •\t\t\tGuilt <br/>
- •\t\t\tShock<br/>
- •\t\t\tShame/ Embarrassment <br/><br/>
+ • Depression <br/>
+ • Anger <br/>
+ • Fear <br/>
+ • Anxiety <br/>
+ • Guilt <br/>
+ • Shock<br/>
+ • Shame/ Embarrassment <br/><br/>
It is important to recognize that all of the reactions are NORMAL. They are NORMAL reactions to an ABNORMAL situation.
They are symptoms of a traumatic experience that your body and mind are trying to deal with - like running a fever to fight off infection. While the symptoms are normal, it’s okay to seek help.
@@ -621,39 +635,39 @@ assist you with your legal options. Peace Corps will be with you every step of t
<b>Believe.</b><br/><br/>
- •\t\t\t If a survivor chooses to share their story with you, do not to question
+ • If a survivor chooses to share their story with you, do not to question
their story, judge it, or ask for details about it.<br/>
- •\t\t\t Show them and tell them that you believe them, and that they are believed. <br/>
+ • Show them and tell them that you believe them, and that they are believed. <br/>
<b>Respect.</b><br/><br/>
- •\t\t\t Listen patiently and allow them to share their story on their own terms.
+ • Listen patiently and allow them to share their story on their own terms.
You may be the first and only person your friend tells.<br/>
- •\t\t\t Encourage them to take their time, or reassure them that you are there to listen when they are ready. <br/>
- •\t\t\t You can also respect their privacy by not sharing with others. <br/>
+ • Encourage them to take their time, or reassure them that you are there to listen when they are ready. <br/>
+ • You can also respect their privacy by not sharing with others. <br/>
<b>No pressure.</b><br/><br/>
- •\t\t\tIt is important to not ask/tell a survivor to report their assault to family, loved ones, the police,
+ • It is important to not ask/tell a survivor to report their assault to family, loved ones, the police,
or the authorities or seek certain help. <br/>
- •\t\t\tAllow a survivor to seek help and heal at their own pace. Instead, offer to support them, accompany them
+ • tAllow a survivor to seek help and heal at their own pace. Instead, offer to support them, accompany them
, or help them seek information at a pace that they want and are comfortable with. <br/>
<b>Connect and share.</b><br/><br/>
- •\t\t\tA survivor may want additional support and information. You can provide an enormous amount
+ • A survivor may want additional support and information. You can provide an enormous amount
of support by expressing concern and offering to look into resources for them. This could be
medical treatment at a hospital, a sexual assault hotline, local advocacy services, counseling, or a local support group. <br/>
- •\t\t\tIt could also be as simple as providing a phone number or going with them to an appointment<br/>
+ • It could also be as simple as providing a phone number or going with them to an appointment<br/>
<b>Repeat.</b><br/><br/>
- •\t\t\tOffer to be there for your friend whenever they need you. Encourage them to come
+ • Offer to be there for your friend whenever they need you. Encourage them to come
back to you for further support when appropriate. Remind them that you will be there to listen when they do. <br/>
- •\t\t\tThis will help your friend know that you are a safe source of support and that they
+ • This will help your friend know that you are a safe source of support and that they
can rely on when they need it. <br/>
- •\t\t\tCreating this culture of openness with a friend can be comforting to a
+ • Creating this culture of openness with a friend can be comforting to a
survivor who may need space to begin healing on their own terms.<br/> <b>MS 243 Responding to Sexual Assault</b><br/><br/>