Giter VIP home page Giter VIP logo

tt9's People

Contributors

alexknop avatar arabi12321 avatar ashivered avatar clam- avatar danijelt avatar darthflip avatar fazilaltinel avatar flaviozavan avatar gabriel-tandil avatar gyadam avatar justbruce avatar mcfrei avatar nebkrid avatar offa avatar poussinou avatar rjolina avatar sspanak avatar tomjansen avatar vladkorotnev avatar wallk avatar zakybilfagih avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tt9's Issues

New language choice is not always applied until TT9 is restarted

  • Go to an input field to activate TT9
  • Open the preferences and select English.
  • Go back to type something.
  • Go to the preferences again, deselect English and select another language

English remains active, even though it is not in the list of enabled languages.

Expected:

  • The last used language is selected, if it is in the list of enabled ones.
  • Otherwise, the first language in the enabled list is selected.
  • If the list is empty, reset the settings and use language 1.

This is a regression due to #18.

Crash when switching IMEs

  1. Choose Predictive mode
  2. Select another IME as the default one
  3. Close any open applications
  4. Open an application where you can type
  5. Go to a text field to make the other IME appear
  6. Switch to TT9
  7. Try typing something

This causes an unknown error and a crash. When Android resurrects TT9, try typing again and it will crash again.

This is a regression caused by #18.

Create a full-screen character table

  • Replace the current multi-page character table with a simpler two-paged.
    • Page 1: special characters. Use the Nokia 3310 characters list.
    • Page 2: emoji
  • Each page contains all possible characters.
  • The characters are much smaller, so that they can fit on one screen.
  • The menu can be opened by long pressing "1" in Predictive or ABC modes.
  • User can select a character using the DPAD.
  • Attempt using the current system theme.

Make dictionary clearing asynchronous

Truncating the dictionary database takes a couple of seconds and the UI remains blocked, which is undesirable.

  • Run the database query asynchronously.
  • Display some sort of a progress bar, possibly the one from #17 . - there is no progress to display, it is just a single DB query. Also, it happens so fast, there is no need of a progress bar.
  • Display a notification or a toast when it is done. Experiment and decide which one is better.

Accepting the suggestions in Predictive mode is inconsistent

Currently, there is no way of accepting a partially typed word. Also, Center key accepts suggestions inconsistently. So, let's follow the Nokia 3310 rules:

  • Center
    • accepts the current database suggestion. Currently, one should press Left/Right, then Center. This is confusing and inconsistent.
    • accepts the current generated suggestion (this works fine now).
  • Left: accepts the partially typed word as is and moves the cursor before it.
  • Right: will be handled in #69
  • Update the user readme.

Redefine the Special function keys

After #24 and #25. They are required for implementing the "next language" function.

  • (mode key) (disabled in numeric fields)
    • Short press: Cycles between: abc/ABC/Predictive/123
    • Short press while composing a word: Changes the case of the current word
    • Long press: Selects the next language
  • (backspace key)
    • Short press: Backspace
    • Long press: Continuous delete. When "BACK" is selected, long pressing is not possible.
  • (other actions key)
    • Short press: Add a word to the user dictionary
    • Long press: open the preferences screen.
  • In numeric fields, "#" and "*" can not have special functions. They can only type the respective characters. Also, changing the mode is not possible. Done
  • Update the user manual.
  • Make sure TraditionalT9.updateStatusIcon() only updates the icon. Done

Create a dictionary importing function

Currently there is such function in TraditionalT9Settings, but it is not the right place for it. Also, the code looks suboptimal.

  • Create a dictionary importing function in the new database package, in DictionaryDb.
  • Make sure single characters are imported too.
  • Only call the function from the settings file.
  • Convert all words to lowercase upon importing.
  • Get rid of the deprecated beginTransaction and endTransaction.
  • Remove the UnicodeBOMInputStream.
  • Do not generate dict.properties anymore. Clean up the build.graddle file.
  • Clean up TraditionalT9Settings.
  • Do stricter validation and do it during build
    • Do not allow words that do not contain letters.
    • Do not allow numbers.
    • Do not allow single letters.
    • Do not allow repeating words.

Back key deletes text

  • For phones with a dedicated Delete key, keep the current implementation.
  • The back key should delete text when pressed once.
  • In numeric fields (of type 3) we set mEditing = NON_EDIT in onStartInput(). However, this causes the Back keypress event to be skipped. Fix it!
  • For applications that take full control of the keypad
    • Add a note in the README
    • A dedicated Backspace key will be added in another issue.

This is the same as: Clam-#24

As a performance optimization, consider using: getCurrentInputEditorInfo().getInitialTextBeforeCursor() (and AfterCursor). As stated here, it may avoid the IPC round trip time.

The preferences screen should use the current system theme

Official guide: https://developer.android.com/guide/topics/ui/settings

  • Create a standard Preferences screen that uses SharedPreferences as backend.
  • Preferences list:
    • Help: a link to github, or the new screen if #9 is completed.
    • Dictionary Settings
      • Languages (multiselect).
        • Do not translate their names. Use the ones from the respective language class.
        • Sort them alphabetically (#5)
      • Load Dictionaries. Consider changing the label to "Cancel loading", while loading is in progress.
      • Import user dictionary (keep it hidden until: #26, #54). This is not so important anymore, because it since #68, #69 and #82, it is now possible to type any word, even if it is missing in the dictionary. Either way, this item should be done in another issue. Skipping this for now.
      • Clear Dictionaries
    • Function Keys (#35) - Will be done in the other issue.
  • Improve the option titles (and translations), where possible.
  • Remove the old settings and all related resouces.
    • TraditionalT9Settings.java.
    • settings_legacy folder
    • CustomInflater.java
    • MultiSelectListPreference
    • res/xml/prefs.xml, res/values/arrays, res/values/const and whatever remains unused in res/layout and res/drawable.
  • Get rid of LangHelper.java, if it still exists.
  • Update the user manual.
  • Translate the new settings.

Make Predictive text mode smarter

After #7.

  • Changing the case is only possible while composing a word. "#" short press changes the case. Done in #44
  • Default text mode is lowercase.
  • ~~Start with a capital letter (CAPS_SINGLE mode): ~~
    • If the text field is empty
    • At the beginning of a sentence (after ., ?, !)
  • If possible, get rid of the extra icons for upper/lower/single case for predictive modes. Keep only one icon. Done in #44

Vertical suggestions list

  1. The current suggestions list is somewhat counterintuitve, because the it is horizontal, but suggestions are selected with Up and Down buttons.
  2. Also, it covers parts of the main application. This is extremely inconvenient in chat clients, where the input field is at the bottom (Messenger, Telegram, WhatsApp and others), because the users cannot see what they have actually typed.

To solve the issues above:

  • Make the suggestions list vertical.
  • Rearrange the bottom bar and put it there
    • Remove the OK button.
    • The Settings and Backspace buttons should remain on the right and should become as small as possible.
    • Put the suggestion list on the left and make it as large as possible.
    • Increase the height of the bottom bar, to fit at least 4 suggestions
    • Ensure the suggestion list matches the look and feel of the bottom bar. - Done in #90

After #15 and #19.

Create separate language classes

After #24.

Currently, different bits of a single language are spread across LangHelper.java and CharMap.java. This means each file has multiple responsibilities and also will make adding of new languages more and more difficult.

  • Create base latin/cyrillic language classes - this is not a good idea, because it provides no flexibility for adding special letters in the middle of the candidates for a key.
  • Derive all languages from the base classes. Each language is represented as much as possible by a single class. It contains all its characters, icons, capital letter rules, etc.
  • Redo language changing using "#".
  • Try getting rid of the double index system. ID means index and there must be only one. Almost done. The UI will be cleaned up in #29
  • Ensure inserting the words from the assets still works.
  • Еnsure selecting a language from the Preferences screen still works.
  • Do not translate the language names. - in #29
  • Do not use CharMap.java and LangHelper.java anymore. Delete them. LangHelper.java is still used in the legacy preferences code. Removing it would be possible after #29.
  • Delete all unused icons.
  • Reintroduce all languages.
  • Update the README about adding new languages.

TraditionalT9.java cleanup

After #7.

The file is: TraditionalT9.java

  • The keyUp/keyDown handlers contain way too many if .. else clauses. Refactor them to be switch .. case for better readability.
  • in addition the keyDown handler does too many things. Try minimizing the logic there, to avoid weird user experience when holding a key, but it is picked up by keyDown instead.
  • There may be too many action handlers that may be causing inadequate input behavior (missed or doubled key presses). Try reducing them.
  • Do not allow global key remapping. Remove that option.
  • Do not validate the key mode in updateStatusIcon(). Do so when actually changing it or on the first run.
  • Clean up onStartInput()

Sort out showing the window in onOK()

Research whether showing the window there is necessary at all. showWindow() happening there was inherited from the original version, but it looks redundant.

Manage the window visibility and set any required flags in onRestart().

Redefine "1" key behaviour

  • Predictive and text modes
    • Short press:
      • Types a special character (one of: .,-?!'@:/;1).
      • Breaks word composition.
      • Consider the discussion in Clam-#12.
      • Also, check with the Google keyboard if any other frequently useful character should be added.
    • Double press (Predictive mode only): Types one of: :) :D ;) :( :* :P. Consider adding other smileys.
    • Long press: Open special character screen. Not possible at the moment. It will be done in #27.
  • Numeric mode:
    • Short press: Types "1"
  • Update the user manual.

Update the docs

  • README
    • A new description
    • "Adding a new language" section
    • Copy and expand the build instructions from the wiki (also review the Android Studio notes)
    • "User manual" section which entails hotkeys list and remapping instructions.
    • License section
  • Update the LICENSE
    • "License" file itself
    • language "readmes" should actually be licenes
  • A new logo, for license compatibility
  • Clean the store-res folder. The old readme is no longer needed. Possibly the different logo sizes are not needed either.

Take care of the translations and strings

  • At the end of the big cleanup there may some unused resources in res folder.
  • Make sure to check for unused buttons
  • Remove any unused translations.
  • Translate missing strings, whenever possible.

After #50

Determine the text case from the input field

In case Predictive mode is selected, use the text case of the input field.

  • Make InputFieldHelper.determineTextCase() work
  • Use currentInputConnection.getCursorCapsMode(inputField.inputType) to get the initial text case. - Based on the result, choose the initial text case.

Redefine the soft keys

After #19.

  • Right, short:
  • Left, short
    • Open settings.
    • It has this icon: ⚙
  • Remove center Let's keep it for now
  • They keys are much smaller, they don't need to take up 1/3 of the screen width.
  • Update the user manual.

More intuitive key remapping

The current way of key remapping puts too much power in the hands of the user and requires too much technical knowledge and reading the Android documentation to figure out the key codes. Also, it makes no sense to remap the number keys, because the norm for them is to type letters. So:

  • Add a "Special Function Keys" section in the preferences.
  • Allow remapping of functions only, not keys.
  • Display a list of functions ("Backspace", "Next Input Mode", "Show Settings" and so on)
  • Next to each function it is possible to select a key *, # or CALL along with hold option. All phones have these three keys, so using them only should be safe enough.
  • Validate conflicting selection of keys.
  • Consider adding other useful keys, such as BACK, DELETE, the LEFT MENU KEY, F1, F2 and so on.
  • It is possible to select no key for a function.
  • Ensure default settings on initial startup.
  • Update the user manual.

After #14, #29.

Restore the Add Word functionality

After completing #18, #14 and #26, adding new words functionality no longer works.

  • Take away the legacy function in T9DB and create a new one in DictionaryDb.
  • New words are added with priority of 1.
  • Remove the old database package
  • Re-wire all functions and the UI.
  • Update the inputConnection with the newly added word.
  • If possible, remove LangHelper.java.

Cleanup the database package

  • Remove all own dictionary related settings, functions and strings/translations, such as "nuke", "backup". done in #7
  • DatabaseHelper:
    • It is a database-pure interface. It has no knowledge about TT9.
    • It contains insert, delete, truncate and other core functions, some of which are currently in T9DB
  • T9DB
    • contains application-specific logic, such as incrementing word priority and getting words for a given digit sequence
    • Optimize the updateWords() function. Get rid of text case conversions. Simplify the code even more, if possible. Give it a more meaningful name.

The UI does not re-appear, when a text field is re-focused

Steps to reproduce:

  1. Go to an app where there are multiple text fields. For example, try editing a contact.
  2. Start typing in the name fields
  3. Move to the phone number field
  4. Go back to a name field or any other text (but non-numeric) field.

The IME is active, none of the UI elements are visible (the language indicator, the soft keys or the word suggestions).

Expected:
At step 4 the UI must re-appear.

Additional info:
This is similar to: Clam-#35

Липсващи български думи

"ѝ" липсва в CharMap.java и няма как да бъде написано.

абе
Алф
блус
дооправяне
дюнер
еднослойна
зариби
звънях
мега
метъл
мхм
накефен
накефил
обувал
оф
Петрохан
присети
пръднах
пърдя
сера
скапаната
смутих
сядайте
тоз
турбо
усилих
хаха

Consider using SharedPreferences for storing settings

After #31.

Currently, the app settings are stored in the SQLite database in a weird format (sort of like bits in an integer, but not really). This causes major inconvenience when a new setting needs to be added or an existing one removed. Also, one needs to keep track of the setting indices to identify and use them.

This task does not entail redesigning the UI. It will be done in #29.

  • Instead of all this, try using SharedPreferences as recommended in the Android dev manual.
  • Clean up T9DB. All settings-related stuff must be deleted.
  • Prepare for the new key remapping method (#35)
    • Remove the setting from the UI and all related translations.
    • Create hardcoded function key variables in TraditionalT9.java.
  • Prepare for using the system dictionary (#26)
    • Remove "nuke" and "backup" dictionary items from the UI and all related code and translations.
    • Hide the "import" function. It will be re-enabled in #26.

Improve the prediction algorithm

Review commits 043a348, 44c56e2, df4b9dc and asses whether they bring any useful improvements to the prediction. If yes, then use them.

Redefine "0" key behaviour

  • Get rid of the "Space on 0" option. Only "0" can type space. - Done
  • In predictive mode:
    • Short press: Types a space; ends word composition
    • Long press: Types "0"
  • In text mode:
    • Short press: Choose between "0", "+", " ", "\n". (current behaviour + "\n")
    • Long press: Types "0"
  • In numeric mode:
    • Short press: Types "0"
    • Long press: Types "+"
  • Update the user manual.

Add a real Help screen

Replace current Help link with a Help screen that displays the user-manual.md file. If displaying markdown is overcomplicated, just convert it to HTML. Displaying HTML is very easy by doing:

textView.setText(Html.fromHtml("<p>some text</p>", Html.FROM_HTML_MODE_COMPACT));

Update On Cat S22 Flip, attempting to open the web help seems to cause an ActivityNotFoundException:

Exception android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=https://github.com/... }
  at android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:2073)
  at android.app.Instrumentation.execStartActivity (Instrumentation.java:1729)
  at android.app.Activity.startActivityForResult (Activity.java:5481)
  at android.app.Activity.startActivityForResult (Activity.java:5439)
  at android.app.Activity.startActivity (Activity.java:5825)
  at android.app.Activity.startActivity (Activity.java:5778)
  at androidx.preference.Preference.performClick (Preference.java:219)
  at androidx.preference.Preference.performClick (Preference.java:219)
  at androidx.preference.Preference$1.onClick (Preference.java:94)
  at android.view.View.performClick (View.java:7448)
  at android.view.View.performClickInternal (View.java:7425)
  at android.view.View.access$3600 (View.java:810)
  at android.view.View$PerformClick.run (View.java:28309)
  at android.os.Handler.handleCallback (Handler.java:938)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loop (Looper.java:223)
  at android.app.ActivityThread.main (ActivityThread.java:7711)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:592)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:952)

Remember the last used input mode

After #7, #11, #14.

Sometimes, in specific apps, one needs to type using a non-default mode, for example, always use Abc, instead of predictive, or always use capitals. However, every time a text field is focused, it starts with the default mode. Switching to the desired mode all the time is very annoying, so let's fix it.

  • Remember the language
  • Remember the text case
  • Remember the mode (predictive, text, numeric)
  • Remove the "default mode" setting from the UI and just use the last mode. Perhaps, it could be changed dynamically in the background, when the user changes the input mode, to avoid big code refactoring.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.