comparison src/com/five_ten_sg/connectbot/util/HelpTopicView.java @ 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 0ce5cc452d02
children
comparison
equal deleted inserted replaced
384:b919cd3d6e2f 385:b12705abba3e
26 /** 26 /**
27 * @author Kenny Root 27 * @author Kenny Root
28 * 28 *
29 */ 29 */
30 public class HelpTopicView extends WebView { 30 public class HelpTopicView extends WebView {
31 public final static String HELPDIR = "help";
32 public final static String SUFFIX = ".html";
33
31 public HelpTopicView(Context context, AttributeSet attrs, int defStyle) { 34 public HelpTopicView(Context context, AttributeSet attrs, int defStyle) {
32 super(context, attrs, defStyle); 35 super(context, attrs, defStyle);
33 initialize(); 36 initialize();
34 } 37 }
35 38
48 wSet.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS); 51 wSet.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);
49 wSet.setUseWideViewPort(false); 52 wSet.setUseWideViewPort(false);
50 } 53 }
51 54
52 public HelpTopicView setTopic(String topic) { 55 public HelpTopicView setTopic(String topic) {
53 String path = String.format("file:///android_asset/%s/%s%s", 56 String path = String.format("file:///android_asset/%s/%s%s", HELPDIR, topic, SUFFIX);
54 HelpActivity.HELPDIR, topic, HelpActivity.SUFFIX);
55 loadUrl(path); 57 loadUrl(path);
56 computeScroll(); 58 computeScroll();
57 return this; 59 return this;
58 } 60 }
59 } 61 }