Simple Notepad Application for Android OS
Revision | 703ef18acfd27cd13a13a5c06aa66e36f66f6636 (tree) |
---|---|
Time | 2016-05-05 14:35:52 |
Author | Masahiko, SAWAI <say@user...> |
Commiter | Masahiko, SAWAI |
Updated app version : 1.0.8 -> 1.0.9
@@ -8,21 +8,21 @@ | ||
8 | 8 | <groupId>org.routine_work</groupId> |
9 | 9 | <artifactId>notepad-app-level-11</artifactId> |
10 | 10 | <packaging>apk</packaging> |
11 | - <version>1.0.8</version> | |
11 | + <version>1.0.9</version> | |
12 | 12 | <name>Notepad App Level 11</name> |
13 | 13 | |
14 | 14 | <parent> |
15 | 15 | <groupId>org.routine_work</groupId> |
16 | 16 | <artifactId>notepad-project</artifactId> |
17 | - <version>1.0.8</version> | |
17 | + <version>1.0.9</version> | |
18 | 18 | </parent> |
19 | 19 | |
20 | 20 | <dependencies> |
21 | 21 | |
22 | 22 | <dependency> |
23 | - <groupId>com.google.android</groupId> | |
23 | + <groupId>android</groupId> | |
24 | 24 | <artifactId>android</artifactId> |
25 | - <version>4.1.1.4</version> | |
25 | + <version>6.0_r3</version> | |
26 | 26 | <!-- |
27 | 27 | <version>1.5_r3</version> |
28 | 28 | <version>1.5_r4</version> |
@@ -39,7 +39,7 @@ | ||
39 | 39 | <dependency> |
40 | 40 | <groupId>org.routine_work</groupId> |
41 | 41 | <artifactId>notepad-common</artifactId> |
42 | - <version>1.0.8</version> | |
42 | + <version>1.0.9</version> | |
43 | 43 | <scope>compile</scope> |
44 | 44 | </dependency> |
45 | 45 |
@@ -2,8 +2,8 @@ | ||
2 | 2 | <manifest |
3 | 3 | xmlns:android="http://schemas.android.com/apk/res/android" |
4 | 4 | package="org.routine_work.notepad" |
5 | - android:versionCode="25" | |
6 | - android:versionName="1.0.8" | |
5 | + android:versionCode="27" | |
6 | + android:versionName="1.0.9" | |
7 | 7 | android:installLocation="auto" |
8 | 8 | > |
9 | 9 | <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="23" /> |
@@ -23,6 +23,8 @@ | ||
23 | 23 | */ |
24 | 24 | package org.routine_work.notepad.prefs; |
25 | 25 | |
26 | +import android.annotation.TargetApi; | |
27 | +import android.os.Build; | |
26 | 28 | import android.os.Bundle; |
27 | 29 | import android.preference.PreferenceActivity; |
28 | 30 | import android.view.Menu; |
@@ -37,14 +39,12 @@ import org.routine_work.utils.Log; | ||
37 | 39 | * |
38 | 40 | * @author sawai |
39 | 41 | */ |
40 | -public class NotepadPreferenceActivity extends PreferenceActivity | |
41 | -{ | |
42 | +public class NotepadPreferenceActivity extends PreferenceActivity { | |
42 | 43 | |
43 | 44 | private static final String LOG_TAG = "simple-notepad"; |
44 | 45 | |
45 | 46 | @Override |
46 | - protected void onCreate(Bundle savedInstanceState) | |
47 | - { | |
47 | + protected void onCreate(Bundle savedInstanceState) { | |
48 | 48 | Log.v(LOG_TAG, "Hello"); |
49 | 49 | |
50 | 50 | setTheme(NotepadPreferenceUtils.getTheme(this)); |
@@ -54,8 +54,7 @@ public class NotepadPreferenceActivity extends PreferenceActivity | ||
54 | 54 | } |
55 | 55 | |
56 | 56 | @Override |
57 | - public void onBuildHeaders(List<Header> target) | |
58 | - { | |
57 | + public void onBuildHeaders(List<Header> target) { | |
59 | 58 | Log.v(LOG_TAG, "Hello"); |
60 | 59 | |
61 | 60 | super.onBuildHeaders(target); |
@@ -65,8 +64,7 @@ public class NotepadPreferenceActivity extends PreferenceActivity | ||
65 | 64 | } |
66 | 65 | |
67 | 66 | @Override |
68 | - public boolean onCreateOptionsMenu(Menu menu) | |
69 | - { | |
67 | + public boolean onCreateOptionsMenu(Menu menu) { | |
70 | 68 | MenuInflater menuInflater = getMenuInflater(); |
71 | 69 | menuInflater.inflate(R.menu.quit_option_menu, menu); |
72 | 70 |
@@ -74,13 +72,11 @@ public class NotepadPreferenceActivity extends PreferenceActivity | ||
74 | 72 | } |
75 | 73 | |
76 | 74 | @Override |
77 | - public boolean onOptionsItemSelected(MenuItem item) | |
78 | - { | |
75 | + public boolean onOptionsItemSelected(MenuItem item) { | |
79 | 76 | boolean result = true; |
80 | 77 | |
81 | 78 | int itemId = item.getItemId(); |
82 | - switch (itemId) | |
83 | - { | |
79 | + switch (itemId) { | |
84 | 80 | case R.id.quit_menuitem: |
85 | 81 | NotepadActivity.quitApplication(this); |
86 | 82 | break; |
@@ -94,4 +90,29 @@ public class NotepadPreferenceActivity extends PreferenceActivity | ||
94 | 90 | return result; |
95 | 91 | } |
96 | 92 | |
93 | + private static final String[] VALID_FRAGMENT_NAMES = { | |
94 | + "org.routine_work.notepad.prefs.DisplayPreferenceFragment", | |
95 | + "org.routine_work.notepad.prefs.ShareDataPreferenceFragment", | |
96 | + "org.routine_work.notepad.prefs.BackupAndResetPreferenceFragment", | |
97 | + "org.routine_work.notepad.prefs.AboutAppPreferenceFragment" | |
98 | + }; | |
99 | + | |
100 | + @Override | |
101 | + @TargetApi(Build.VERSION_CODES.KITKAT) | |
102 | + protected boolean isValidFragment(String fragmentName) { | |
103 | + boolean result = false; | |
104 | + Log.v(LOG_TAG, "Hello"); | |
105 | + Log.v(LOG_TAG, "fragmentName => " + fragmentName); | |
106 | + | |
107 | + for (String validFragmentName : VALID_FRAGMENT_NAMES) { | |
108 | + if (validFragmentName.equals(fragmentName)) { | |
109 | + result = true; | |
110 | + break; | |
111 | + } | |
112 | + } | |
113 | + Log.v(LOG_TAG, "result => " + result); | |
114 | + Log.v(LOG_TAG, "Bye"); | |
115 | + return result; | |
116 | + } | |
117 | + | |
97 | 118 | } |
@@ -8,13 +8,13 @@ | ||
8 | 8 | <groupId>org.routine_work</groupId> |
9 | 9 | <artifactId>notepad-app</artifactId> |
10 | 10 | <packaging>apk</packaging> |
11 | - <version>1.0.8</version> | |
11 | + <version>1.0.9</version> | |
12 | 12 | <name>Notepad App</name> |
13 | 13 | |
14 | 14 | <parent> |
15 | 15 | <groupId>org.routine_work</groupId> |
16 | 16 | <artifactId>notepad-project</artifactId> |
17 | - <version>1.0.8</version> | |
17 | + <version>1.0.9</version> | |
18 | 18 | </parent> |
19 | 19 | |
20 | 20 | <dependencies> |
@@ -39,7 +39,7 @@ | ||
39 | 39 | <dependency> |
40 | 40 | <groupId>org.routine_work</groupId> |
41 | 41 | <artifactId>notepad-common</artifactId> |
42 | - <version>1.0.8</version> | |
42 | + <version>1.0.9</version> | |
43 | 43 | <scope>compile</scope> |
44 | 44 | </dependency> |
45 | 45 |
@@ -2,8 +2,8 @@ | ||
2 | 2 | <manifest |
3 | 3 | xmlns:android="http://schemas.android.com/apk/res/android" |
4 | 4 | package="org.routine_work.notepad" |
5 | - android:versionCode="24" | |
6 | - android:versionName="1.0.8" | |
5 | + android:versionCode="26" | |
6 | + android:versionName="1.0.9" | |
7 | 7 | android:installLocation="auto" |
8 | 8 | > |
9 | 9 | <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4" /> |
@@ -8,13 +8,13 @@ | ||
8 | 8 | <groupId>org.routine_work</groupId> |
9 | 9 | <artifactId>notepad-common</artifactId> |
10 | 10 | <packaging>jar</packaging> |
11 | - <version>1.0.8</version> | |
11 | + <version>1.0.9</version> | |
12 | 12 | <name>Notepad Common Library</name> |
13 | 13 | |
14 | 14 | <parent> |
15 | 15 | <groupId>org.routine_work</groupId> |
16 | 16 | <artifactId>notepad-project</artifactId> |
17 | - <version>1.0.8</version> | |
17 | + <version>1.0.9</version> | |
18 | 18 | </parent> |
19 | 19 | |
20 | 20 | <dependencies> |
@@ -7,7 +7,7 @@ | ||
7 | 7 | <groupId>org.routine_work</groupId> |
8 | 8 | <artifactId>notepad-project</artifactId> |
9 | 9 | <packaging>pom</packaging> |
10 | - <version>1.0.8</version> | |
10 | + <version>1.0.9</version> | |
11 | 11 | <name>Notepad Project</name> |
12 | 12 | <url>http://sourceforge.jp/users/say/pf/android_notepad/scm/</url> |
13 | 13 |