Mercurial > 510Connectbot
changeset 385:b12705abba3e
wizard and help present help pages in the same order
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 06 Aug 2014 11:49:01 -0700 |
parents | b919cd3d6e2f |
children | e481699db6b1 |
files | src/com/five_ten_sg/connectbot/HelpActivity.java src/com/five_ten_sg/connectbot/util/HelpTopicView.java |
diffstat | 2 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/com/five_ten_sg/connectbot/HelpActivity.java Wed Aug 06 11:34:32 2014 -0700 +++ b/src/com/five_ten_sg/connectbot/HelpActivity.java Wed Aug 06 11:49:01 2014 -0700 @@ -48,7 +48,7 @@ try { String[] topics = getResources().getStringArray(R.array.list_wizard_topics); - for (String topic : topics) { + for (final String topic : topics) { Button button = new Button(this); button.setText(topic); button.setOnClickListener(new OnClickListener() {
--- a/src/com/five_ten_sg/connectbot/util/HelpTopicView.java Wed Aug 06 11:34:32 2014 -0700 +++ b/src/com/five_ten_sg/connectbot/util/HelpTopicView.java Wed Aug 06 11:49:01 2014 -0700 @@ -28,6 +28,9 @@ * */ public class HelpTopicView extends WebView { + public final static String HELPDIR = "help"; + public final static String SUFFIX = ".html"; + public HelpTopicView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); initialize(); @@ -50,8 +53,7 @@ } public HelpTopicView setTopic(String topic) { - String path = String.format("file:///android_asset/%s/%s%s", - HelpActivity.HELPDIR, topic, HelpActivity.SUFFIX); + String path = String.format("file:///android_asset/%s/%s%s", HELPDIR, topic, SUFFIX); loadUrl(path); computeScroll(); return this;