Add help activity
CHANGELOG.md
| 1 | 1 | Changelog | |
| 2 | 2 | ========= | |
| 3 | 3 | ||
| 4 | + | Changes Since 0.2.3 | |
| 5 | + | ------------------- | |
| 6 | + | ||
| 7 | + | ### Features | |
| 8 | + | ||
| 9 | + | * Add a Help screen. | |
| 10 | + | ||
| 11 | + | ### Translations | |
| 12 | + | ||
| 13 | + | * Update fr translation. | |
| 14 | + | ||
| 4 | 15 | Changes In 0.2.3 | |
| 5 | 16 | ---------------- | |
| 6 | 17 |
app/src/main/AndroidManifest.xml
| 35 | 35 | android:name="android.support.PARENT_ACTIVITY" | |
| 36 | 36 | android:value=".MainActivity" /> | |
| 37 | 37 | </activity> | |
| 38 | + | <activity android:name=".HelpActivity" | |
| 39 | + | android:parentActivityName=".MainActivity" | |
| 40 | + | android:label="@string/title_activity_help" | |
| 41 | + | tools:ignore="UnusedAttribute"> | |
| 42 | + | <meta-data | |
| 43 | + | android:name="android.support.PARENT_ACTIVITY" | |
| 44 | + | android:value=".MainActivity" /> | |
| 45 | + | </activity> | |
| 38 | 46 | <activity | |
| 39 | 47 | android:name=".DictionaryActivity" | |
| 40 | 48 | android:label="@string/title_activity_dictionary" | |
… | |||
| 56 | 64 | </activity> | |
| 57 | 65 | </application> | |
| 58 | 66 | ||
| 59 | - | </manifest> | |
| 59 | > | ||
| 60 | 0 | > | \ No newline at end of file |
| 67 | + | </manifest> | |
app/src/main/java/eu/lepiller/nani/HelpActivity.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 HelpActivity extends AppCompatActivity { | |
| 8 | + | ||
| 9 | + | @Override | |
| 10 | + | protected void onCreate(Bundle savedInstanceState) { | |
| 11 | + | super.onCreate(savedInstanceState); | |
| 12 | + | setContentView(R.layout.activity_help); | |
| 13 | + | } | |
| 14 | + | } |
app/src/main/java/eu/lepiller/nani/MainActivity.java
| 295 | 295 | // as you specify a parent activity in AndroidManifest.xml. | |
| 296 | 296 | int id = item.getItemId(); | |
| 297 | 297 | ||
| 298 | - | //noinspection SimplifiableIfStatement | |
| 299 | 298 | if (id == R.id.action_settings) { | |
| 300 | 299 | Intent intent = new Intent(this, SettingsActivity.class); | |
| 301 | 300 | startActivity(intent); | |
… | |||
| 308 | 307 | Intent intent = new Intent(this, AboutActivity.class); | |
| 309 | 308 | startActivity(intent); | |
| 310 | 309 | return true; | |
| 310 | + | } else if (id == R.id.action_help) { | |
| 311 | + | Intent intent = new Intent(this, HelpActivity.class); | |
| 312 | + | startActivity(intent); | |
| 313 | + | return true; | |
| 311 | 314 | } | |
| 312 | 315 | ||
| 313 | 316 | return super.onOptionsItemSelected(item); | |
app/src/main/res/layout/activity_help.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=".HelpActivity"> | |
| 7 | + | ||
| 8 | + | </ScrollView> | |
| 8 | < | ||
| 0 | 9 | < | \ No newline at end of file |
app/src/main/res/menu/menu_main.xml
| 10 | 10 | android:title="@string/action_settings" | |
| 11 | 11 | app:showAsAction="never" /> | |
| 12 | 12 | <item | |
| 13 | + | android:id="@+id/action_help" | |
| 14 | + | android:title="@string/action_help" /> | |
| 15 | + | <item | |
| 13 | 16 | android:id="@+id/action_about" | |
| 14 | 17 | android:title="@string/action_about" /> | |
| 15 | 18 | </menu> |
app/src/main/res/values-fr/strings.xml
| 1 | 1 | <resources> | |
| 2 | 2 | <string name="action_settings">Param??tres</string> | |
| 3 | 3 | <string name="action_dictionaries">G??rer les dictionnaires</string> | |
| 4 | + | <string name="action_help">Aide</string> | |
| 4 | 5 | <string name="action_about">?? propos</string> | |
| 5 | 6 | ||
| 6 | 7 | <string name="search_hint">Rechercher un mot en japonais, par kanji, par signification, ???</string> | |
… | |||
| 8 | 9 | <string name="title_activity_about">?? propos</string> | |
| 9 | 10 | <string name="title_activity_dictionary">Dictionnaires</string> | |
| 10 | 11 | <string name="title_activity_dictionary_download">T??l??chargement</string> | |
| 12 | + | <string name="title_activity_help">Aide</string> | |
| 11 | 13 | <string name="no_search">Recherche vide</string> | |
| 12 | 14 | <string name="no_dic">Vous n???avez pas encore t??l??charg?? de dictionnaire utilisable avec cette | |
| 13 | 15 | fonctionnalit?? de recherche. T??l??chargez un dictionnaire. | |
app/src/main/res/values/strings.xml
| 2 | 2 | <string name="app_name" translatable="false">Nani?</string> | |
| 3 | 3 | <string name="action_settings">Settings</string> | |
| 4 | 4 | <string name="action_dictionaries">Manage Dictionaries</string> | |
| 5 | + | <string name="action_help">Help</string> | |
| 5 | 6 | <string name="action_about">About</string> | |
| 6 | 7 | ||
| 7 | 8 | <string name="search_hint">Search japanese word, kanji, meaning, ???</string> | |
… | |||
| 9 | 10 | <string name="title_activity_about">About</string> | |
| 10 | 11 | <string name="title_activity_dictionary">Dictionaries</string> | |
| 11 | 12 | <string name="title_activity_dictionary_download">Download</string> | |
| 13 | + | <string name="title_activity_help">Help</string> | |
| 12 | 14 | <string name="no_search">No search term</string> | |
| 13 | 15 | <string name="no_dic">You haven\'t downloaded any dictionary usable with this search function. Please select a dictionary.</string> | |
| 14 | 16 | <string name="incompatible_format">Dictionary %s is not compatible with this version of the application. Either update the dictionary or the app.</string> | |