Add empty activities for the two help topics
app/src/main/AndroidManifest.xml
12 | 12 | android:roundIcon="@mipmap/ic_launcher_round" | |
13 | 13 | android:supportsRtl="true" | |
14 | 14 | android:theme="@style/AppTheme"> | |
15 | - | <activity android:name=".SettingsActivity" | |
15 | + | <activity android:name=".HelpRadicalActivity" | |
16 | + | android:label="@string/help_topic_radicals" | |
17 | + | android:parentActivityName=".HelpActivity" | |
18 | + | tools:ignore="UnusedAttribute"> | |
19 | + | <meta-data | |
20 | + | android:name="android.support.PARENT_ACTIVITY" | |
21 | + | android:value=".HelpActivity" /> | |
22 | + | </activity> | |
23 | + | <activity android:name=".HelpRomajiActivity" | |
24 | + | android:label="@string/help_topic_romaji" | |
25 | + | android:parentActivityName=".HelpActivity" | |
26 | + | tools:ignore="UnusedAttribute"> | |
27 | + | <meta-data | |
28 | + | android:name="android.support.PARENT_ACTIVITY" | |
29 | + | android:value=".HelpActivity" /> | |
30 | + | </activity> | |
31 | + | <activity | |
32 | + | android:name=".SettingsActivity" | |
16 | 33 | android:parentActivityName=".MainActivity" | |
17 | 34 | tools:ignore="UnusedAttribute"> | |
18 | 35 | <meta-data | |
19 | 36 | android:name="android.support.PARENT_ACTIVITY" | |
20 | 37 | android:value=".MainActivity" /> | |
21 | 38 | </activity> | |
22 | - | <activity android:name=".DictionaryDownloadActivity" | |
39 | + | <activity | |
40 | + | android:name=".DictionaryDownloadActivity" | |
23 | 41 | android:label="@string/title_activity_dictionary_download" | |
24 | 42 | android:parentActivityName=".DictionaryActivity" | |
25 | 43 | tools:ignore="UnusedAttribute"> | |
… | |||
27 | 45 | android:name="android.support.PARENT_ACTIVITY" | |
28 | 46 | android:value=".DictionaryActivity" /> | |
29 | 47 | </activity> | |
30 | - | <activity android:name=".AboutActivity" | |
31 | - | android:parentActivityName=".MainActivity" | |
48 | + | <activity | |
49 | + | android:name=".AboutActivity" | |
32 | 50 | android:label="@string/title_activity_about" | |
51 | + | android:parentActivityName=".MainActivity" | |
33 | 52 | tools:ignore="UnusedAttribute"> | |
34 | 53 | <meta-data | |
35 | 54 | android:name="android.support.PARENT_ACTIVITY" | |
36 | 55 | android:value=".MainActivity" /> | |
37 | 56 | </activity> | |
38 | - | <activity android:name=".HelpActivity" | |
39 | - | android:parentActivityName=".MainActivity" | |
57 | + | <activity | |
58 | + | android:name=".HelpActivity" | |
40 | 59 | android:label="@string/title_activity_help" | |
60 | + | android:parentActivityName=".MainActivity" | |
41 | 61 | tools:ignore="UnusedAttribute"> | |
42 | 62 | <meta-data | |
43 | 63 | android:name="android.support.PARENT_ACTIVITY" | |
… | |||
64 | 84 | </activity> | |
65 | 85 | </application> | |
66 | 86 | ||
67 | - | </manifest> | |
87 | + | </manifest> | |
87 | < | ||
0 | 88 | < | \ No newline at end of file |
app/src/main/java/eu/lepiller/nani/HelpActivity.java
2 | 2 | ||
3 | 3 | import androidx.appcompat.app.AppCompatActivity; | |
4 | 4 | ||
5 | + | import android.content.Intent; | |
5 | 6 | import android.os.Bundle; | |
7 | + | import android.view.View; | |
8 | + | import android.widget.Button; | |
6 | 9 | ||
7 | 10 | public class HelpActivity extends AppCompatActivity { | |
8 | 11 | ||
… | |||
10 | 13 | protected void onCreate(Bundle savedInstanceState) { | |
11 | 14 | super.onCreate(savedInstanceState); | |
12 | 15 | setContentView(R.layout.activity_help); | |
16 | + | ||
17 | + | Button romaji_button = findViewById(R.id.help_topic_romaji); | |
18 | + | Button radical_button = findViewById(R.id.help_topic_radicals); | |
19 | + | ||
20 | + | romaji_button.setOnClickListener(getOpenListener(HelpRomajiActivity.class)); | |
21 | + | radical_button.setOnClickListener(getOpenListener(HelpRadicalActivity.class)); | |
22 | + | } | |
23 | + | ||
24 | + | private<T> View.OnClickListener getOpenListener(final Class<T> c) { | |
25 | + | return new View.OnClickListener() { | |
26 | + | @Override | |
27 | + | public void onClick(View v) { | |
28 | + | Intent intent = new Intent(HelpActivity.this, c); | |
29 | + | startActivity(intent); | |
30 | + | } | |
31 | + | }; | |
13 | 32 | } | |
14 | 33 | } |
app/src/main/java/eu/lepiller/nani/HelpRadicalActivity.java unknown status 1
1 | + | package eu.lepiller.nani; | |
2 | + | ||
3 | + | import androidx.appcompat.app.AppCompatActivity; | |
4 | + | ||
5 | + | import android.os.Bundle; | |
6 | + | ||
7 | + | public class HelpRadicalActivity extends AppCompatActivity { | |
8 | + | ||
9 | + | @Override | |
10 | + | protected void onCreate(Bundle savedInstanceState) { | |
11 | + | super.onCreate(savedInstanceState); | |
12 | + | setContentView(R.layout.activity_help_radical); | |
13 | + | } | |
14 | + | } | |
14 | < | ||
0 | 15 | < | \ No newline at end of file |
app/src/main/java/eu/lepiller/nani/HelpRomajiActivity.java unknown status 1
1 | + | package eu.lepiller.nani; | |
2 | + | ||
3 | + | import androidx.appcompat.app.AppCompatActivity; | |
4 | + | ||
5 | + | import android.os.Bundle; | |
6 | + | ||
7 | + | public class HelpRomajiActivity extends AppCompatActivity { | |
8 | + | ||
9 | + | @Override | |
10 | + | protected void onCreate(Bundle savedInstanceState) { | |
11 | + | super.onCreate(savedInstanceState); | |
12 | + | setContentView(R.layout.activity_help_romaji); | |
13 | + | } | |
14 | + | } | |
14 | < | ||
0 | 15 | < | \ No newline at end of file |
app/src/main/res/layout/activity_help.xml
28 | 28 | android:text="@string/help_info" | |
29 | 29 | android:layout_marginBottom="16dp" /> | |
30 | 30 | ||
31 | - | <TableLayout | |
32 | - | android:layout_width="match_parent" | |
33 | - | android:layout_height="wrap_content"> | |
34 | - | </TableLayout> | |
31 | + | <LinearLayout | |
32 | + | android:layout_width="match_parent" | |
33 | + | android:layout_height="wrap_content" | |
34 | + | android:layout_marginBottom="8dp"> | |
35 | + | <Button android:id="@+id/help_topic_romaji" | |
36 | + | android:layout_width="0dp" | |
37 | + | android:layout_height="wrap_content" | |
38 | + | android:layout_marginEnd="8dp" | |
39 | + | android:layout_marginRight="8dp" | |
40 | + | android:layout_weight="1" | |
41 | + | android:background="@color/colorAccent" | |
42 | + | android:text="@string/help_topic_romaji" | |
43 | + | android:textColor="@color/colorGrey"/> | |
44 | + | <Button android:id="@+id/help_topic_radicals" | |
45 | + | android:layout_width="0dp" | |
46 | + | android:layout_height="wrap_content" | |
47 | + | android:layout_marginEnd="8dp" | |
48 | + | android:layout_marginRight="8dp" | |
49 | + | android:layout_weight="1" | |
50 | + | android:background="@color/colorAccent" | |
51 | + | android:text="@string/help_topic_radicals" | |
52 | + | android:textColor="@color/colorGrey" /> | |
53 | + | </LinearLayout> | |
35 | 54 | </LinearLayout> | |
36 | 55 | </ScrollView> | |
36 | 55 | = | |
37 | 56 | = | \ No newline at end of file |
app/src/main/res/layout/activity_help_radical.xml unknown status 1
1 | + | <?xml version="1.0" encoding="utf-8"?> | |
2 | + | <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | |
3 | + | xmlns:tools="http://schemas.android.com/tools" | |
4 | + | android:layout_width="match_parent" | |
5 | + | android:layout_height="match_parent" | |
6 | + | tools:context=".HelpRadicalActivity"> | |
7 | + | <LinearLayout | |
8 | + | android:layout_width="match_parent" | |
9 | + | android:layout_height="wrap_content" | |
10 | + | android:orientation="vertical"> | |
11 | + | ||
12 | + | </LinearLayout> | |
13 | + | ||
14 | + | </ScrollView> | |
14 | < | ||
0 | 15 | < | \ No newline at end of file |
app/src/main/res/layout/activity_help_romaji.xml unknown status 1
1 | + | <?xml version="1.0" encoding="utf-8"?> | |
2 | + | <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | |
3 | + | xmlns:tools="http://schemas.android.com/tools" | |
4 | + | android:layout_width="match_parent" | |
5 | + | android:layout_height="match_parent" | |
6 | + | tools:context=".HelpRomajiActivity"> | |
7 | + | <LinearLayout | |
8 | + | android:layout_width="match_parent" | |
9 | + | android:layout_height="wrap_content" | |
10 | + | android:orientation="vertical"> | |
11 | + | ||
12 | + | </LinearLayout> | |
13 | + | ||
14 | + | </ScrollView> | |
14 | < | ||
0 | 15 | < | \ No newline at end of file |
app/src/main/res/values-fr/strings.xml
130 | 130 | ?? utiliser Nani de mani??re plus efficace. Vous devriez prendre le temps de lire les diff??rents | |
131 | 131 | sujets d\'aide. Cliquez sur le sujet qui vous int??resse : | |
132 | 132 | </string> | |
133 | + | <string name="help_topic_radicals">Saisir des kanji ?? partir de leurs composants (radicaux)</string> | |
134 | + | <string name="help_topic_romaji">Utiliser des romaji dans le champ de recherche</string> | |
135 | + | ||
136 | + | <!-- Help Activity: romaji --> | |
137 | + | <!-- Help Activity: radicals --> | |
133 | 138 | </resources> |
app/src/main/res/values/strings.xml
132 | 132 | Nani in a more efficient way. You should take the time to read the help topics. Click on the | |
133 | 133 | topic you are interested in today: | |
134 | 134 | </string> | |
135 | + | <string name="help_topic_radicals">Entering kanji by components (radicals)</string> | |
136 | + | <string name="help_topic_romaji">Using romaji in search input</string> | |
137 | + | ||
138 | + | <!-- Help Activity: romaji --> | |
139 | + | <!-- Help Activity: radicals --> | |
135 | 140 | </resources> |