diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-10-26 14:43:43 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-10-26 14:43:43 +0200 |
commit | 4d966ce3ba862ccb3d45b66d3c5e24db157dca5c (patch) | |
tree | 56205bb2dcbe8173b66380bec84936db8d5215a7 /src | |
parent | 86d9cc5eba96c51d5c2866b46afdb1d134563d0b (diff) | |
parent | fd1dbd411e61ad12e79fab7d700782dd76135232 (diff) |
Merge changes
Diffstat (limited to 'src')
-rw-r--r-- | src/de/blinkt/openvpn/FaqFragment.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/de/blinkt/openvpn/FaqFragment.java b/src/de/blinkt/openvpn/FaqFragment.java index c4d1913d..79029757 100644 --- a/src/de/blinkt/openvpn/FaqFragment.java +++ b/src/de/blinkt/openvpn/FaqFragment.java @@ -3,7 +3,6 @@ package de.blinkt.openvpn; import android.app.Fragment; import android.os.Bundle; import android.text.Html; -import android.text.Spanned; import android.text.method.LinkMovementMethod; import android.view.LayoutInflater; import android.view.View; @@ -23,14 +22,9 @@ public class FaqFragment extends Fragment { Bundle savedInstanceState) { View v= inflater.inflate(R.layout.faq, container, false); - TextView bImages = (TextView) v.findViewById(R.id.brokenimages); - bImages.setText(Html.fromHtml(getActivity().getString(R.string.broken_images_faq))); - bImages.setMovementMethod(LinkMovementMethod.getInstance()); - - TextView quickstart = (TextView) v.findViewById(R.id.faq_howto); - Spanned htmltext = Html.fromHtml(getActivity().getString(R.string.faq_howto)); - quickstart.setText(htmltext); - quickstart.setMovementMethod(LinkMovementMethod.getInstance()); + insertHtmlEntry(v,R.id.brokenimages,R.string.broken_images_faq); + insertHtmlEntry(v,R.id.faq_howto,R.string.faq_howto); + insertHtmlEntry(v, R.id.faq_battery, R.string.baterry_consumption); return v; @@ -38,4 +32,10 @@ public class FaqFragment extends Fragment { } + private void insertHtmlEntry (View v, int viewId, int stringId) { + TextView faqitem = (TextView) v.findViewById(viewId); + faqitem.setText(Html.fromHtml(getActivity().getString(stringId))); + faqitem.setMovementMethod(LinkMovementMethod.getInstance()); + } + } |