# HG changeset patch # User Carl Byington # Date 1407350042 25200 # Node ID f7e09771172fe5413c427f8522a3071fdc0d0845 # Parent 41fa02fdb9c6eae32d0c6c36028072531dcfd333 wizard and help present help pages in the same order diff -r 41fa02fdb9c6 -r f7e09771172f help/Hints.html.in --- a/help/Hints.html.in Wed Aug 06 10:43:02 2014 -0700 +++ b/help/Hints.html.in Wed Aug 06 11:34:02 2014 -0700 @@ -1,6 +1,6 @@

Helpful hints

-

When you have multiple sessions open, you can 'pan' between them by +

When you have multiple sessions open, you can switch between them by swiping your finger left-to-right or right-to-left over the screen.

diff -r 41fa02fdb9c6 -r f7e09771172f src/com/five_ten_sg/connectbot/HelpActivity.java --- a/src/com/five_ten_sg/connectbot/HelpActivity.java Wed Aug 06 10:43:02 2014 -0700 +++ b/src/com/five_ten_sg/connectbot/HelpActivity.java Wed Aug 06 11:34:02 2014 -0700 @@ -22,7 +22,6 @@ import android.app.Activity; import android.content.Intent; import android.content.pm.PackageManager.NameNotFoundException; -import android.content.res.AssetManager; import android.os.Bundle; import android.util.Log; import android.view.View; @@ -38,9 +37,6 @@ public class HelpActivity extends Activity { public final static String TAG = "ConnectBot.HelpActivity"; - public final static String HELPDIR = "help"; - public final static String SUFFIX = ".html"; - @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); @@ -48,24 +44,21 @@ this.setTitle(String.format("%s: %s", getResources().getText(R.string.app_name), getResources().getText(R.string.title_help))); - AssetManager am = this.getAssets(); LinearLayout content = (LinearLayout)this.findViewById(R.id.topics); try { - for (String name : am.list(HELPDIR)) { - if (name.endsWith(SUFFIX)) { - Button button = new Button(this); - final String topic = name.substring(0, name.length() - SUFFIX.length()); - button.setText(topic); - button.setOnClickListener(new OnClickListener() { - public void onClick(View v) { - Intent intent = new Intent(HelpActivity.this, HelpTopicActivity.class); - intent.putExtra(Intent.EXTRA_TITLE, topic); - HelpActivity.this.startActivity(intent); - } - }); - content.addView(button); - } + String[] topics = getResources().getStringArray(R.array.list_wizard_topics); + for (String topic : topics)) { + Button button = new Button(this); + button.setText(topic); + button.setOnClickListener(new OnClickListener() { + public void onClick(View v) { + Intent intent = new Intent(HelpActivity.this, HelpTopicActivity.class); + intent.putExtra(Intent.EXTRA_TITLE, topic); + HelpActivity.this.startActivity(intent); + } + }); + content.addView(button); } } catch (IOException e) {