diff --git a/app/src/main/java/com/mozilla/hackathon/kiboko/adapters/TopicsAdapter.java b/app/src/main/java/com/mozilla/hackathon/kiboko/adapters/TopicsAdapter.java
index 54aa5f8..70abc11 100644
--- a/app/src/main/java/com/mozilla/hackathon/kiboko/adapters/TopicsAdapter.java
+++ b/app/src/main/java/com/mozilla/hackathon/kiboko/adapters/TopicsAdapter.java
@@ -92,7 +92,6 @@ public class TopicsAdapter extends BaseAdapter implements Filterable {
holder = (Holder) viewItem.getTag();
final Topic topic = topics.get(position);
- holder.tv.setText(topic.getName());
if(SettingsUtils.isFunModeEnabled(context)){
holder.tv.setText(EmojiUtils.parse(topic.getName()));
diff --git a/app/src/main/java/com/mozilla/hackathon/kiboko/fragments/ScreenSlidePageFragment.java b/app/src/main/java/com/mozilla/hackathon/kiboko/fragments/ScreenSlidePageFragment.java
index 402f199..5caffd9 100644
--- a/app/src/main/java/com/mozilla/hackathon/kiboko/fragments/ScreenSlidePageFragment.java
+++ b/app/src/main/java/com/mozilla/hackathon/kiboko/fragments/ScreenSlidePageFragment.java
@@ -2,6 +2,7 @@ package com.mozilla.hackathon.kiboko.fragments;
/**
* Created by mwadime on 6/9/2016.
*/
+
import android.content.res.TypedArray;
import android.os.Bundle;
import android.support.v4.app.Fragment;
@@ -18,6 +19,7 @@ import com.mozilla.hackathon.kiboko.settings.SettingsUtils;
import com.mozilla.hackathon.kiboko.utilities.Utils;
import com.mozilla.hackathon.kiboko.widgets.NotifyingScrollView;
+import org.sufficientlysecure.htmltextview.EmojiUtils;
import org.sufficientlysecure.htmltextview.HtmlTextView;
import pl.droidsonroids.gif.GifDrawable;
@@ -85,8 +87,12 @@ public class ScreenSlidePageFragment extends Fragment {
.inflate(R.layout.fragment_screen_slide_page, container, false);
// ((NotifyingScrollView) rootView.findViewById(R.id.content)).setOnScrollChangedListener(mOnScrollChangedListener);
- // Set the title view to show the page number.
- ((TextView) rootView.findViewById(R.id.step_title)).setText(mPageTitle);
+ if(SettingsUtils.isFunModeEnabled(getContext())){
+ ((TextView) rootView.findViewById(R.id.step_title)).setText(EmojiUtils.parse(mPageTitle));
+ }else{
+ ((TextView) rootView.findViewById(R.id.step_title)).setText(mPageTitle);
+ }
+
((HtmlTextView) rootView.findViewById(R.id.step_description)).setFunMode(SettingsUtils.isFunModeEnabled(getContext()));
((HtmlTextView) rootView.findViewById(R.id.step_description)).setHtmlFromString(mPageDescription,new HtmlTextView.LocalImageGetter());
diff --git a/app/src/main/java/com/mozilla/hackathon/kiboko/fragments/TopicsFragment.java b/app/src/main/java/com/mozilla/hackathon/kiboko/fragments/TopicsFragment.java
index 479d1b9..208dd75 100644
--- a/app/src/main/java/com/mozilla/hackathon/kiboko/fragments/TopicsFragment.java
+++ b/app/src/main/java/com/mozilla/hackathon/kiboko/fragments/TopicsFragment.java
@@ -19,6 +19,7 @@ import com.mozilla.hackathon.kiboko.R;
import com.mozilla.hackathon.kiboko.adapters.TopicsAdapter;
import com.mozilla.hackathon.kiboko.models.Topic;
import com.mozilla.hackathon.kiboko.services.ChatHeadService;
+import com.mozilla.hackathon.kiboko.settings.SettingsUtils;
import com.mozilla.hackathon.kiboko.utilities.Utils;
import java.util.ArrayList;
import java.util.List;
@@ -27,7 +28,7 @@ public class TopicsFragment extends ListFragment implements CompoundButton.OnChe
public static int OVERLAY_PERMISSION_REQ_CODE_CHATHEAD = 1234;
TopicsAdapter adapter;
private LinearLayout listFooterView;
- private SwitchCompat toggleSwitch = null;
+ private SwitchCompat toggleSwitch, funmodeSwitch = null;
public TopicsFragment() {
}
@@ -72,9 +73,13 @@ public class TopicsFragment extends ListFragment implements CompoundButton.OnChe
// Inflate footer view
listFooterView = (LinearLayout) LayoutInflater.from(this.getActivity()).inflate(R.layout.dashboard_footer_view, null);
toggleSwitch = (SwitchCompat) listFooterView.findViewById(R.id.toggleSwitch);
+ funmodeSwitch = (SwitchCompat) listFooterView.findViewById(R.id.funmodeSwitch);
toggleSwitch.setChecked(App.isServiceRunning());
+
+ funmodeSwitch.setChecked(SettingsUtils.isFunModeEnabled(getContext()));
//attach a listener to check for changes in state
toggleSwitch.setOnCheckedChangeListener(this);
+ funmodeSwitch.setOnCheckedChangeListener(this);
setListAdapter(adapter);
getListView().addFooterView(listFooterView);
}
@@ -97,6 +102,14 @@ public class TopicsFragment extends ListFragment implements CompoundButton.OnChe
}
}
break;
+ case R.id.funmodeSwitch:
+ if(!isChecked){
+ Analytics.add("TopicsFragment::FunMode Switch", "Off");
+ }else{
+ Analytics.add("TopicsFragment::FunMode Switch", "On");
+ }
+ SettingsUtils.setFunMode(getContext(), isChecked);
+ break;
default:
break;
}
diff --git a/app/src/main/res/layout/dashboard_footer_view.xml b/app/src/main/res/layout/dashboard_footer_view.xml
index 907d207..72c41c4 100644
--- a/app/src/main/res/layout/dashboard_footer_view.xml
+++ b/app/src/main/res/layout/dashboard_footer_view.xml
@@ -15,4 +15,15 @@
android:textColor="@color/colorTextPrimary"
android:layout_margin="@dimen/activity_vertical_margin"
/>
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_topics_layout.xml b/app/src/main/res/layout/fragment_topics_layout.xml
index 0afcc96..e44e777 100644
--- a/app/src/main/res/layout/fragment_topics_layout.xml
+++ b/app/src/main/res/layout/fragment_topics_layout.xml
@@ -23,88 +23,4 @@
android:layout_width="match_parent"
android:layout_height="wrap_content" >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 50a46ea..b0130f7 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -50,4 +50,5 @@
Play the Icon Quiz!
Jisort - View Settings
Jisort - View Tutorial
+ Enable FUN MODE