1
0
Fork 0

New Settings screen

* Settings screen is now based on the Android SharedPreferences

* Added function key configuration on the Settings screen

* Added a setting for toggling the on-screen buttons

* Added a dark/light theme setting

* Improved translations

* Fixed a problem with launching the Settings screen directly from the Android settings

* Fixed ignoring keys not actually ignoring them properly
This commit is contained in:
sspanak 2022-11-08 15:13:28 +02:00 committed by Dimo Karaivanov
parent 4e59d3393c
commit b550d5d5dd
84 changed files with 1463 additions and 1205 deletions

View file

@ -1,5 +1,5 @@
# Traditional T9
TT9 is an IME (Input Method Editor) for Android devices with hardware keypad. It supports multiple languages and predictive text typing. _NOTE: TT9 is not usable on touchscreen-only devices._
TT9 is an IME (Input Method Editor) for Android devices with a hardware keypad. It supports multiple languages and predictive text typing.
This is an updated version of the [original project](https://github.com/Clam-/TraditionalT9) by Clam-.
@ -9,73 +9,27 @@ This is an updated version of the [original project](https://github.com/Clam-/Tr
or get the APK from the [Releases Section](https://github.com/sspanak/tt9/releases/latest).
## System Requirements
- Android 4.4 or higher. _(Tested and confirmed on Android 4.4.2, 5.1.1 and 11)_
- Free space:
- Minimum 10 Mb when not using Predictive mode and no dictionaries are loaded.
- About 25 Mb per each enabled language in Predictive mode
- A hardware keypad or a keyboard. The application is not usable on touchscreen-only devices.
_If you own a phone with Android 2.2 up to 4.4, please refer to the original version of Traditional T9 from 2016._
## Using Traditional T9
If you just wish to install and use TT9, see the [user manual](docs/user-manual.md). You don't need to read anything below this line.
If you just wish to install and use Traditional T9, check out the [user manual](docs/user-manual.md) for useful tips and a list of keypad shortcuts.
## Building
The recommended way of building is using Android Studio. As the of time of writing this, the current version is: Android Studio Dolphin | 2021.3.1.
### Building a Debug .apk
If you have not configured Android Studio yet, follow [the official manual](https://developer.android.com/training/basics/firstapp), then follow the simple steps below to get the project running.
- _Import the project in Android Studio._
- _Prevent the "Default Activity not found" issue._ The app does not have a default view or a launcher icon. For this reason, you must configure Android Studio not to launch anything after installing, otherwise it will fail with "Default Activity not found" or a similar message. To do so:
- Open "Edit Configurations..." (Press Shift 3 times and select it from the command list)
- Go to "General" tab.
- Change "Launch Options" to "Nothing"
- Hit "OK"
That's it! Now you should be able to deploy and debug the app on your device.
You can find more info in this [Github issue](https://github.com/android/input-samples/issues/18).
### Building a Release .apk
The project is configured to build an unsigned release variant by default.
- Select the "release" variant from Android Studio options (`Build` -> `Select Build Variant...`)
- `Build` -> `Rebuild Project`. After that, just ignore all warnings until you get to the end of the process.
- Find the `.apk` in the generated 'build/' folder.
_Note that it may not be possible to install an unsigned `.apk` on newer versions of Android. You must either manually sign it or build a signed one instead._
### Building a Signed .apk
Make sure you have a signing key. If you don't have one, follow the [official manual](https://developer.android.com/studio/publish/app-signing#sign-apk).
- Select `Build` -> `Generate Signed Bundle / APK...`.
- Select `APK` and proceed to the next screen.
- Enter your key details (or create a new one) and continue to the next screen.
- Choose the "Release" variant, then click `Finish` to start building.
- Android Studio will tell you where the `.apk` is, but if it does not, try looking for it in the `release/` folder.
## Adding a new language
To support a new language one needs to:
- Add status icons
- Create a proper icon for each screen size. The icon needs to contain the abbreviation of the language. (e.g. "En" for "English").
- The font must be Roboto Lt at an adequate size to fit the icon square with minimum padding.
- The text must be white and the background must be transparent as per the [official Android guide](https://android-doc.github.io/guide/practices/ui_guidelines/icon_design_status_bar.html).
- To simplify the process, you could use Android Studio. It has a built-in icon generator accessible by right-cicking on "drawable" folder -> New -> Image Asset. Then choose "Icon Type": "Notification Icons", "Asset Type": Text, "Trim": No, "Padding": 0%.
- Find a suitable dictionary and add it to `assets` folder.
- Create a new language class in `languages/definitions/`. Make sure to set all properties.
- `ID` must be the next available number. Currently, the range is limited between 1 and 31, so there can be 31 languages in total.
- Set `isPunctuationPartOfWords` to `true`, if you need to use the 1-key for typing words, such as: `it's`, `a'tje` or `п'ят`. Otherwise, it would not be possible to type them, nor will they appear as suggestions. `false` is recommended when apostrophes or other punctuation are not part of the words, to allow faster typing.
- Add the new language to the list in `LanguageCollection.java`. You only need to add it in one place, in the constructor. Please, be nice and maintain the alphabetical order.
- Add a new entry in `res/values/const.xml`. Make sure the new ID matches the one in the language class.
- Add new entries in `res/values/arrays.xml`.
- Add translations in `res/values/strings-your-lang`. The Android Studio translation editor is very handy.
## Word Lists
Here is detailed information and licenses about the word lists used:
- [Bulgarian word list](docs/bgWordlistReadme.txt)
- [English word list](docs/enWordlistReadme.txt)
- [French word list](docs/frWordlistReadme.txt)
- [German word list](docs/deWordlistReadme.txt)
- [Russian word list](docs/ruWordlistReadme.txt)
- [Ukrainian word list](docs/ukWordlistReadme.txt)
## Contributing to the Project
As with many other open-source projects, this one is also maintained by its author in his free time. Any help in making Traditional T9 better will be highly appreciated. This includes:
- Testing on different phones and reporting bugs or other unusual behavior. Currently, the only testing and development device is: Qin F21 Pro+ / Android 11.
- Adding new translations or fixing incorrect ones.
- Writing new code. If you are a developer and you are willing fix a bug, add a new language or maybe create a brand new feature, see the [Contribution Guide](CONTRIBUTING.md).
## License
- The source code, the logo image and the icons are licensed under the conditions described in [LICENSE.txt](LICENSE.txt).
- The word lists / dictionaries are licensed under the licenses provided in the [respective readme files](#word-lists), where applicable.
- The dictionaries are licensed under the licenses provided in the [respective readme files](docs/dictionaries/), where applicable. Detailed information about the dictionaries is also available there.
- [Silver foil photo created by rawpixel.com - www.freepik.com](https://www.freepik.com/photos/silver-foil)
- "Roboto" font is under [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).
- "Negotiate" and "Vibrocentric" fonts are under [The Fontspring Desktop/Ebook Font End User License](docs/desktop-ebook-EULA-1.8.txt).