はてなハイク・キーワードの検索と入力アプリ
修订版 | dbce3d9c048cc67b7a266d159f97e19720ce0d46 (tree) |
---|---|
时间 | 2012-09-09 21:24:11 |
作者 | Kodakana <kodakana@linu...> |
Commiter | Kodakana |
メモリ不足のときの動作改善を目的とする変更。アイコン作成。その他整理。
@@ -1,7 +1,7 @@ | ||
1 | 1 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
2 | 2 | package="org.pulpdust.kigo" |
3 | 3 | android:versionCode="1" |
4 | - android:versionName="0.3" | |
4 | + android:versionName="0.4" | |
5 | 5 | android:installLocation="auto" > |
6 | 6 | |
7 | 7 | <uses-sdk |
@@ -29,7 +29,7 @@ You can change various settings from the Options menu to open the setting screen | ||
29 | 29 | * Tap Behavour(Select from the "Open" "send" copy "," what happens when you tap an item) |
30 | 30 | * Font Size(Select the size of a font in the list) |
31 | 31 | * Haiku Host(Select the host that you want to use from h.hatena.ne.jp or h.hatena.com) |
32 | - * Send Template | |
32 | + * Mail Template | |
33 | 33 | * To:(During the "Send" operation, the address is automatically placed in the email To field) |
34 | 34 | * CC:(Same as above) |
35 | 35 | * BCC:(..) |
@@ -1,7 +1,7 @@ | ||
1 | 1 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
2 | 2 | package="org.pulpdust.kigo" |
3 | 3 | android:versionCode="1" |
4 | - android:versionName="0.3" | |
4 | + android:versionName="0.4" | |
5 | 5 | android:installLocation="auto" > |
6 | 6 | |
7 | 7 | <uses-sdk |
@@ -50,33 +50,42 @@ public final class R { | ||
50 | 50 | public static final int main_context=0x7f090001; |
51 | 51 | } |
52 | 52 | public static final class string { |
53 | + public static final int address=0x7f070003; | |
54 | + public static final int app_author=0x7f070004; | |
55 | + public static final int app_copy=0x7f070006; | |
56 | + public static final int app_lic=0x7f070002; | |
53 | 57 | public static final int app_name=0x7f070000; |
54 | - public static final int bcc=0x7f070010; | |
55 | - public static final int button_find=0x7f070004; | |
56 | - public static final int cc=0x7f07000f; | |
57 | - public static final int err_fail_get=0x7f070007; | |
58 | - public static final int err_no_net=0x7f070006; | |
59 | - public static final int hello_world=0x7f070001; | |
60 | - public static final int hint_word=0x7f070005; | |
61 | - public static final int info_entries=0x7f070016; | |
62 | - public static final int info_follows=0x7f070017; | |
63 | - public static final int info_title=0x7f070018; | |
64 | - public static final int info_word=0x7f070019; | |
65 | - public static final int menu_copy=0x7f070011; | |
66 | - public static final int menu_info=0x7f070013; | |
67 | - public static final int menu_open=0x7f070012; | |
68 | - public static final int menu_relat=0x7f070014; | |
69 | - public static final int menu_send=0x7f070015; | |
70 | - public static final int menu_settings=0x7f070002; | |
71 | - public static final int on_load=0x7f070008; | |
72 | - public static final int pref_cat_app=0x7f070009; | |
73 | - public static final int pref_cat_templ=0x7f07000d; | |
74 | - public static final int pref_font=0x7f07000a; | |
75 | - public static final int pref_host=0x7f07000c; | |
76 | - public static final int pref_tap=0x7f07000b; | |
77 | - public static final int relateds=0x7f07001a; | |
78 | - public static final int title_activity_kigo=0x7f070003; | |
79 | - public static final int to=0x7f07000e; | |
58 | + public static final int app_ver=0x7f070001; | |
59 | + public static final int bcc=0x7f070018; | |
60 | + public static final int button_find=0x7f07000c; | |
61 | + public static final int cc=0x7f070017; | |
62 | + public static final int copy=0x7f070005; | |
63 | + public static final int err_fail_get=0x7f07000f; | |
64 | + public static final int err_no_net=0x7f07000e; | |
65 | + public static final int hello_world=0x7f070009; | |
66 | + public static final int hint_word=0x7f07000d; | |
67 | + public static final int info_entries=0x7f07001f; | |
68 | + public static final int info_follows=0x7f070020; | |
69 | + public static final int info_title=0x7f070021; | |
70 | + public static final int info_word=0x7f070022; | |
71 | + public static final int license=0x7f070008; | |
72 | + public static final int menu_copy=0x7f07001a; | |
73 | + public static final int menu_info=0x7f07001c; | |
74 | + public static final int menu_open=0x7f07001b; | |
75 | + public static final int menu_relat=0x7f07001d; | |
76 | + public static final int menu_send=0x7f07001e; | |
77 | + public static final int menu_settings=0x7f07000a; | |
78 | + public static final int on_load=0x7f070010; | |
79 | + public static final int pref_cat_about=0x7f070019; | |
80 | + public static final int pref_cat_app=0x7f070011; | |
81 | + public static final int pref_cat_templ=0x7f070015; | |
82 | + public static final int pref_font=0x7f070012; | |
83 | + public static final int pref_host=0x7f070014; | |
84 | + public static final int pref_tap=0x7f070013; | |
85 | + public static final int relateds=0x7f070023; | |
86 | + public static final int title_activity_kigo=0x7f07000b; | |
87 | + public static final int to=0x7f070016; | |
88 | + public static final int version=0x7f070007; | |
80 | 89 | } |
81 | 90 | public static final class style { |
82 | 91 | public static final int AppTheme=0x7f080000; |
@@ -1,6 +1,14 @@ | ||
1 | 1 | <resources> |
2 | 2 | |
3 | 3 | <string name="app_name">Kigo</string> |
4 | + <string name="app_ver">0.4</string> | |
5 | + <string name="app_lic">GNU GPL v3</string> | |
6 | + <string name="address">連絡先</string> | |
7 | + <string name="app_author">Kodakana<kodakana.hws@gmail.com></string> | |
8 | + <string name="copy">製作・著作</string> | |
9 | + <string name="app_copy">© 2012 pulpdust.org/Kodakana</string> | |
10 | + <string name="version">Ver.</string> | |
11 | + <string name="license">許諾条件</string> | |
4 | 12 | <string name="hello_world">ほげえええぇぇぇぇぇ</string> |
5 | 13 | <string name="menu_settings">設定</string> |
6 | 14 | <string name="title_activity_kigo">Kigo</string> |
@@ -17,6 +25,7 @@ | ||
17 | 25 | <string name="to">To:</string> |
18 | 26 | <string name="cc">CC:</string> |
19 | 27 | <string name="bcc">BCC:</string> |
28 | + <string name="pref_cat_about">概要</string> | |
20 | 29 | <string name="menu_copy">コピー</string> |
21 | 30 | <string name="menu_open">開く</string> |
22 | 31 | <string name="menu_info">情報</string> |
@@ -1,6 +1,14 @@ | ||
1 | 1 | <resources> |
2 | 2 | |
3 | 3 | <string name="app_name">Kigo</string> |
4 | + <string name="app_ver">0.4</string> | |
5 | + <string name="app_lic">GNU GPL v3</string> | |
6 | + <string name="address">Address</string> | |
7 | + <string name="app_author">Kodakana<kodakana.hws@gmail.com></string> | |
8 | + <string name="copy">Copyright</string> | |
9 | + <string name="app_copy">© 2012 pulpdust.org/Kodakana</string> | |
10 | + <string name="version">Ver.</string> | |
11 | + <string name="license">License</string> | |
4 | 12 | <string name="hello_world">Hello world!</string> |
5 | 13 | <string name="menu_settings">Settings</string> |
6 | 14 | <string name="title_activity_kigo">Kigo</string> |
@@ -13,10 +21,11 @@ | ||
13 | 21 | <string name="pref_font">Font Size</string> |
14 | 22 | <string name="pref_tap">Tap Behavior</string> |
15 | 23 | <string name="pref_host">Haiku Host</string> |
16 | - <string name="pref_cat_templ">Send To Template</string> | |
24 | + <string name="pref_cat_templ">Mail Template</string> | |
17 | 25 | <string name="to">To:</string> |
18 | 26 | <string name="cc">CC:</string> |
19 | 27 | <string name="bcc">BCC:</string> |
28 | + <string name="pref_cat_about">About</string> | |
20 | 29 | <string name="menu_copy">Copy</string> |
21 | 30 | <string name="menu_open">Open</string> |
22 | 31 | <string name="menu_info">Info</string> |
@@ -32,5 +32,23 @@ | ||
32 | 32 | android:key="bcc" |
33 | 33 | android:title="@string/bcc" /> |
34 | 34 | </PreferenceCategory> |
35 | - | |
35 | + <PreferenceCategory android:title="@string/pref_cat_about"> | |
36 | + <Preference | |
37 | + android:selectable="false" | |
38 | + android:title="@string/app_name" | |
39 | + android:summary="@string/app_ver" /> | |
40 | + <Preference | |
41 | + android:selectable="false" | |
42 | + android:title="@string/copy" | |
43 | + android:summary="@string/app_copy" /> | |
44 | + <Preference | |
45 | + android:selectable="false" | |
46 | + android:title="@string/license" | |
47 | + android:summary="@string/app_lic" /> | |
48 | + <Preference | |
49 | + android:selectable="false" | |
50 | + android:title="@string/address" | |
51 | + android:summary="@string/app_author" /> | |
52 | + </PreferenceCategory> | |
53 | + | |
36 | 54 | </PreferenceScreen> |
\ No newline at end of file |
@@ -80,6 +80,7 @@ public class KigoActivity extends Activity { | ||
80 | 80 | String[] send_to = new String[1]; |
81 | 81 | String[] cc = new String[1]; |
82 | 82 | String[] bcc = new String[1]; |
83 | + String svdt = "savedata"; | |
83 | 84 | int tpbhvr; |
84 | 85 | int fntsz = 12; |
85 | 86 | boolean prvd; |
@@ -100,6 +101,7 @@ public class KigoActivity extends Activity { | ||
100 | 101 | } else { |
101 | 102 | prvd = false; |
102 | 103 | rltd = false; |
104 | + loadSave(); | |
103 | 105 | } |
104 | 106 | readPrefs(); |
105 | 107 | requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); |
@@ -367,6 +369,12 @@ public class KigoActivity extends Activity { | ||
367 | 369 | setTitle(R.string.app_name); |
368 | 370 | reLoad(guri); |
369 | 371 | return true; |
372 | + } else if (!sbj.equals("")){ | |
373 | + edttxt.setText(""); | |
374 | + goFind(); | |
375 | + return true; | |
376 | + } else { | |
377 | + return super.dispatchKeyEvent(kev); | |
370 | 378 | } |
371 | 379 | default: |
372 | 380 | return super.dispatchKeyEvent(kev); |
@@ -495,7 +503,14 @@ public class KigoActivity extends Activity { | ||
495 | 503 | switch (requestCode){ |
496 | 504 | case 2: |
497 | 505 | readPrefs(); |
498 | - reLoad(guri); | |
506 | + if (obj != null){ | |
507 | + arryadpt.clear(); | |
508 | + xmlBaker(obj); | |
509 | + } else if (guri != null){ | |
510 | + reLoad(guri); | |
511 | + } else { | |
512 | + goFind(); | |
513 | + } | |
499 | 514 | break; |
500 | 515 | } |
501 | 516 | } |
@@ -508,4 +523,33 @@ public class KigoActivity extends Activity { | ||
508 | 523 | cc[0] = sprefs.getString("cc", ""); |
509 | 524 | bcc[0] = sprefs.getString("bcc", ""); |
510 | 525 | } |
526 | + public void loadSave(){ | |
527 | + SharedPreferences spref = getSharedPreferences(svdt, 0); | |
528 | + sbj = spref.getString("sbj", ""); | |
529 | + obj = spref.getString("obj", null); | |
530 | + guri = spref.getString("guri", null); | |
531 | + } | |
532 | + | |
533 | + @Override | |
534 | + public void onStop(){ | |
535 | + super.onStop(); | |
536 | + SharedPreferences spref = getSharedPreferences(svdt, 0); | |
537 | + SharedPreferences.Editor sedit = spref.edit(); | |
538 | + if (obj != null){ | |
539 | + sedit.putString("obj", obj); | |
540 | + } else { | |
541 | + sedit.putString("obj", null); | |
542 | + } | |
543 | + if (!sbj.equals("")){ | |
544 | + sedit.putString("sbj", sbj); | |
545 | + } else { | |
546 | + sedit.putString("sbj", ""); | |
547 | + } | |
548 | + if (guri != null){ | |
549 | + sedit.putString("guri", guri); | |
550 | + } else { | |
551 | + sedit.putString("guri", null); | |
552 | + } | |
553 | + sedit.commit(); | |
554 | + } | |
511 | 555 | } |