Pull from transifex
This commit is contained in:
@@ -47,7 +47,7 @@ public class HelpAboutFragment extends Fragment {
|
||||
|
||||
HtmlTextView aboutTextView = (HtmlTextView) view.findViewById(R.id.help_about_text);
|
||||
|
||||
// load mardown from raw resource
|
||||
// load markdown from raw resource
|
||||
try {
|
||||
String html = new Markdown4jProcessor().process(
|
||||
getActivity().getResources().openRawResource(R.raw.help_about));
|
||||
|
||||
@@ -64,22 +64,22 @@ public class HelpActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
Bundle startBundle = new Bundle();
|
||||
startBundle.putInt(HelpMarkdownFragment.ARG_MARKDOWN_FILE, R.raw.help_start);
|
||||
startBundle.putInt(HelpMarkdownFragment.ARG_MARKDOWN_RES, R.raw.help_start);
|
||||
mTabsAdapter.addTab(HelpMarkdownFragment.class, startBundle,
|
||||
getString(R.string.help_tab_start));
|
||||
|
||||
Bundle certificationBundle = new Bundle();
|
||||
certificationBundle.putInt(HelpMarkdownFragment.ARG_MARKDOWN_FILE, R.raw.help_certification);
|
||||
certificationBundle.putInt(HelpMarkdownFragment.ARG_MARKDOWN_RES, R.raw.help_certification);
|
||||
mTabsAdapter.addTab(HelpMarkdownFragment.class, certificationBundle,
|
||||
getString(R.string.help_tab_wot));
|
||||
|
||||
Bundle faqBundle = new Bundle();
|
||||
faqBundle.putInt(HelpMarkdownFragment.ARG_MARKDOWN_FILE, R.raw.help_faq);
|
||||
faqBundle.putInt(HelpMarkdownFragment.ARG_MARKDOWN_RES, R.raw.help_faq);
|
||||
mTabsAdapter.addTab(HelpMarkdownFragment.class, faqBundle,
|
||||
getString(R.string.help_tab_faq));
|
||||
|
||||
Bundle changelogBundle = new Bundle();
|
||||
changelogBundle.putInt(HelpMarkdownFragment.ARG_MARKDOWN_FILE, R.raw.help_changelog);
|
||||
changelogBundle.putInt(HelpMarkdownFragment.ARG_MARKDOWN_RES, R.raw.help_changelog);
|
||||
mTabsAdapter.addTab(HelpMarkdownFragment.class, changelogBundle,
|
||||
getString(R.string.help_tab_changelog));
|
||||
|
||||
|
||||
@@ -38,17 +38,17 @@ public class HelpMarkdownFragment extends Fragment {
|
||||
|
||||
private int mHtmlFile;
|
||||
|
||||
public static final String ARG_MARKDOWN_FILE = "htmlFile";
|
||||
public static final String ARG_MARKDOWN_RES = "htmlFile";
|
||||
|
||||
/**
|
||||
* Create a new instance of HelpHtmlFragment, providing "htmlFile" as an argument.
|
||||
*/
|
||||
static HelpMarkdownFragment newInstance(int htmlFile) {
|
||||
static HelpMarkdownFragment newInstance(int markdownRes) {
|
||||
HelpMarkdownFragment f = new HelpMarkdownFragment();
|
||||
|
||||
// Supply html raw file input as an argument.
|
||||
Bundle args = new Bundle();
|
||||
args.putInt(ARG_MARKDOWN_FILE, htmlFile);
|
||||
args.putInt(ARG_MARKDOWN_RES, markdownRes);
|
||||
f.setArguments(args);
|
||||
|
||||
return f;
|
||||
@@ -58,7 +58,7 @@ public class HelpMarkdownFragment extends Fragment {
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
mActivity = getActivity();
|
||||
|
||||
mHtmlFile = getArguments().getInt(ARG_MARKDOWN_FILE);
|
||||
mHtmlFile = getArguments().getInt(ARG_MARKDOWN_RES);
|
||||
|
||||
ScrollView scroller = new ScrollView(mActivity);
|
||||
HtmlTextView text = new HtmlTextView(mActivity);
|
||||
@@ -70,7 +70,7 @@ public class HelpMarkdownFragment extends Fragment {
|
||||
|
||||
scroller.addView(text);
|
||||
|
||||
// load mardown from raw resource
|
||||
// load markdown from raw resource
|
||||
try {
|
||||
String html = new Markdown4jProcessor().process(getActivity().getResources().openRawResource(mHtmlFile));
|
||||
text.setHtmlFromString(html, true);
|
||||
|
||||
Reference in New Issue
Block a user