Subtasks help page now looks cool and fits on one page

pull/14/head
Tim Su 14 years ago
parent e10e4c8a0d
commit ff01ab795f

@ -48,9 +48,10 @@ public class DialogUtilities {
* @param html
* @param title
*/
@SuppressWarnings("nls")
public static void htmlDialog(Context context, String html, int title) {
WebView webView = new WebView(context);
webView.loadData(html, "text/html", "utf-8"); //$NON-NLS-1$ //$NON-NLS-2$
webView.loadDataWithBaseURL("file:///android_res/drawable/", html, "text/html", "utf-8", null);
webView.setBackgroundColor(0);
new AlertDialog.Builder(context)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

@ -96,21 +96,20 @@ public class OrderedListFragmentHelper<LIST> {
@SuppressWarnings("nls")
private void showSubtasksHelp() {
String imageBase = "file:///android_asset/";
String body = String.format("<h2>%s</h2><br><br><img src='%s'/>" +
"<br>%s<br><br><img src='%s'/><br>%s",
String body = String.format("<h3>%s</h3><img src='%s'>" +
"<br>%s<br><br><br><img src='%s'><br>%s",
getActivity().getString(R.string.subtasks_help_1),
imageBase + "subtasks_vertical.png",
"subtasks_vertical.png",
getActivity().getString(R.string.subtasks_help_2),
imageBase + "subtasks_horizontal.png",
"subtasks_horizontal.png",
getActivity().getString(R.string.subtasks_help_3));
System.err.println(body);;
String color = (AndroidUtilities.getSdkVersion() >= 11 ? "black" : "white");
String html = String.format("<html><body style='text-align:center;color:%s'>%s</body></html>",
color, body);
DialogUtilities.htmlDialog(getActivity(), html, R.string.subtasks_help_title);
Preferences.setInt(AstridPreferences.P_SUBTASKS_HELP, 1);
}
public void beforeSetUpTaskList(Filter filter) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

@ -4,8 +4,8 @@
<!-- Subtasks Help Introduction -->
<string name="subtasks_help_title">Sort and Indent in Astrid</string>
<string name="subtasks_help_1">Tap and hold to move a task.</string>
<string name="subtasks_help_2">Drag vertically to rearrange.</string>
<string name="subtasks_help_3">Drag horizontally to indent.</string>
<string name="subtasks_help_1">Tap and hold to move a task</string>
<string name="subtasks_help_2">Drag vertically to rearrange</string>
<string name="subtasks_help_3">Drag horizontally to indent</string>
</resources>

Loading…
Cancel
Save