mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-23 07:39:11 +00:00
remove or add info to some todos
This commit is contained in:
parent
8eb8a2368a
commit
4645e425e6
12 changed files with 13 additions and 22 deletions
|
@ -46,7 +46,6 @@ import java.util.WeakHashMap;
|
|||
* This is an extended {@link KeyboardView} class that hosts an emoji page keyboard.
|
||||
* Multi-touch unsupported. No gesture support.
|
||||
*/
|
||||
// TODO: Implement key popup preview.
|
||||
public final class EmojiPageKeyboardView extends KeyboardView implements
|
||||
MoreKeysPanel.Controller {
|
||||
private static final String TAG = "EmojiPageKeyboardView";
|
||||
|
|
|
@ -47,8 +47,6 @@ public final class KeyVisualAttributes {
|
|||
public final float mLabelOffCenterRatio;
|
||||
public final float mHintLabelOffCenterRatio;
|
||||
|
||||
// todo: replace the remaining colors with something from new colors instead of theme
|
||||
// but first check which colors are actually used
|
||||
private static final int[] VISUAL_ATTRIBUTE_IDS = {
|
||||
R.styleable.Keyboard_Key_keyTypeface,
|
||||
R.styleable.Keyboard_Key_keyLetterSize,
|
||||
|
@ -115,15 +113,20 @@ public final class KeyVisualAttributes {
|
|||
mPreviewTextRatio = ResourceUtils.getFraction(keyAttr,
|
||||
R.styleable.Keyboard_Key_keyPreviewTextRatio);
|
||||
|
||||
// todo: check what colors do, and if irrelevant and no plan to use -> remove here and from attr
|
||||
final Colors colors = Settings.getInstance().getCurrent().mColors;
|
||||
mTextColor = colors.get(ColorType.KEY_TEXT);
|
||||
// when? -> isShiftedLetterActivated, which is a label flag
|
||||
mTextInactivatedColor = keyAttr.getColor(R.styleable.Keyboard_Key_keyTextInactivatedColor, 0);
|
||||
// when? -> mKeyTextShadowRadius > 0, but it's always set to -1 (in theme) -> maybe play with this?
|
||||
mTextShadowColor = keyAttr.getColor(R.styleable.Keyboard_Key_keyTextShadowColor, 0);
|
||||
mFunctionalTextColor = colors.get(ColorType.FUNCTIONAL_KEY_TEXT);
|
||||
mHintLetterColor = colors.get(ColorType.KEY_HINT_TEXT);
|
||||
mHintLabelColor = colors.get(ColorType.KEY_TEXT);
|
||||
// when? -> hasShiftedLetterHint and not isShiftedLetterActivated -> both are label flags
|
||||
mShiftedLetterHintInactivatedColor = keyAttr.getColor(
|
||||
R.styleable.Keyboard_Key_keyShiftedLetterHintInactivatedColor, 0);
|
||||
// when? -> hasShiftedLetterHint and isShiftedLetterActivated -> both are label flags
|
||||
mShiftedLetterHintActivatedColor = keyAttr.getColor(
|
||||
R.styleable.Keyboard_Key_keyShiftedLetterHintActivatedColor, 0);
|
||||
mPreviewTextColor = colors.get(ColorType.KEY_TEXT);
|
||||
|
|
|
@ -651,7 +651,7 @@ abstract class KeyboardParser(private val params: KeyboardParams, private val co
|
|||
if (params.mIconsSet.getIconDrawable(KeyboardIconsSet.getIconId(this)) != null) return this
|
||||
if (params.mId.mWidth == AndroidSpellCheckerService.SPELLCHECKER_DUMMY_KEYBOARD_WIDTH
|
||||
&& params.mId.mHeight == AndroidSpellCheckerService.SPELLCHECKER_DUMMY_KEYBOARD_HEIGHT
|
||||
&& !params.mId.mSubtype.rawSubtype.extraValue.contains(Constants.Subtype.ExtraValue.EMOJI_CAPABLE)
|
||||
&& !params.mId.mSubtype.hasExtraValue(Constants.Subtype.ExtraValue.EMOJI_CAPABLE)
|
||||
)
|
||||
// fake keyboard that is used by spell checker (for key coordinates), but not shown to the user
|
||||
// often this doesn't have any icons loaded, and there is no need to bother with this
|
||||
|
|
|
@ -58,7 +58,6 @@ import java.util.concurrent.TimeUnit;
|
|||
* a client for interacting with dictionaries.
|
||||
*/
|
||||
public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
|
||||
// TODO: Consolidate dictionaries in native code.
|
||||
public static final String TAG = DictionaryFacilitatorImpl.class.getSimpleName();
|
||||
|
||||
// HACK: This threshold is being used when adding a capitalized entry in the User History
|
||||
|
@ -333,7 +332,6 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
|
|||
final String dictNamePrefix,
|
||||
@Nullable final DictionaryInitializationListener listener) {
|
||||
final HashMap<Locale, ArrayList<String>> existingDictionariesToCleanup = new HashMap<>();
|
||||
// TODO: Make subDictTypesToUse configurable by resource or a static final list.
|
||||
final HashSet<String> subDictTypesToUse = new HashSet<>();
|
||||
subDictTypesToUse.add(Dictionary.TYPE_USER);
|
||||
final List<Locale> allLocales = new ArrayList<>() {{
|
||||
|
|
|
@ -95,9 +95,6 @@ public final class DictionaryPackInstallBroadcastReceiver extends BroadcastRecei
|
|||
// If we are replacing the package, we will receive ADDED right away so no need to
|
||||
// remove the dictionary at the moment, since we will do it when we receive the
|
||||
// ADDED broadcast.
|
||||
|
||||
// TODO: Only reload dictionary on REMOVED when the removed package is the one we
|
||||
// read dictionary from?
|
||||
mService.resetSuggestMainDict();
|
||||
} else if (DictionaryPackConstants.NEW_DICTIONARY_INTENT_ACTION.equals(action)) {
|
||||
if (null == mService) {
|
||||
|
|
|
@ -1995,8 +1995,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
p.println(" Keyboard mode = " + keyboardMode);
|
||||
final SettingsValues settingsValues = mSettings.getCurrent();
|
||||
p.println(settingsValues.dump());
|
||||
p.println(mDictionaryFacilitator.dump(this /* context */));
|
||||
// TODO: Dump all settings values
|
||||
p.println(mDictionaryFacilitator.dump(this));
|
||||
}
|
||||
|
||||
// slightly modified from Simple Keyboard: https://github.com/rkkr/simple-keyboard/blob/master/app/src/main/java/rkr/simplekeyboard/inputmethod/latin/LatinIME.java
|
||||
|
|
|
@ -51,6 +51,10 @@ public class RichInputMethodSubtype {
|
|||
return mSubtype.getExtraValueOf(key);
|
||||
}
|
||||
|
||||
public boolean hasExtraValue(@NonNull final String key) {
|
||||
return mSubtype.containsExtraValueKey(key);
|
||||
}
|
||||
|
||||
// The mode is also determined by the primary subtype.
|
||||
public String getMode() {
|
||||
return mSubtype.getMode();
|
||||
|
|
|
@ -38,8 +38,6 @@ class DictionaryHeader(
|
|||
|
||||
val description: String?
|
||||
// Helper method to get the description
|
||||
// TODO: Right now each dictionary file comes with a description in its own language.
|
||||
// It will display as is no matter the device's locale. It should be internationalized.
|
||||
get() = mDictionaryOptions.mAttributes[DICTIONARY_DESCRIPTION_KEY]
|
||||
|
||||
fun info(locale: Locale): String {
|
||||
|
@ -52,8 +50,6 @@ class DictionaryHeader(
|
|||
companion object {
|
||||
// Note that these are corresponding definitions in native code in latinime::HeaderPolicy
|
||||
// and latinime::HeaderReadWriteUtils.
|
||||
// TODO: Standardize the key names and bump up the format version, taking care not to
|
||||
// break format version 2 dictionaries.
|
||||
const val DICTIONARY_VERSION_KEY = "version"
|
||||
const val DICTIONARY_LOCALE_KEY = "locale"
|
||||
const val DICTIONARY_ID_KEY = "dictionary"
|
||||
|
|
|
@ -37,7 +37,6 @@ import helium314.keyboard.latin.utils.UncachedInputMethodManagerUtils;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
// TODO: Use Fragment to implement welcome screen and setup steps.
|
||||
public final class SetupWizardActivity extends AppCompatActivity implements View.OnClickListener {
|
||||
// For debugging purpose.
|
||||
private static final boolean FORCE_TO_SHOW_WELCOME_SCREEN = false;
|
||||
|
|
|
@ -252,6 +252,7 @@ public final class MoreSuggestions extends Keyboard {
|
|||
// KeyboardIconsSet and alpha are unused. Use the icon that has been passed to the
|
||||
// constructor.
|
||||
// TODO: Drawable itself should have an alpha value.
|
||||
// todo: replace with shape or vector, or maybe remove it completely
|
||||
mIcon.setAlpha(128);
|
||||
return mIcon;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ public final class AutoCorrectionUtils {
|
|||
if (suggestion.isKindOf(SuggestedWordInfo.KIND_WHITELIST)) {
|
||||
return true;
|
||||
}
|
||||
// TODO: return suggestion.isAppropriateForAutoCorrection();
|
||||
if (!suggestion.isAppropriateForAutoCorrection()) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -242,15 +242,12 @@ public final class SubtypeLocaleUtils {
|
|||
private static String getSubtypeDisplayNameInternal(@NonNull final InputMethodSubtype subtype,
|
||||
@NonNull final Locale displayLocale) {
|
||||
final String replacementString = getReplacementString(subtype, displayLocale);
|
||||
// TODO: rework this for multi-lingual subtypes
|
||||
final int nameResId = subtype.getNameResId();
|
||||
return RunInLocaleKt.runInLocale(sResources, displayLocale,
|
||||
res -> {
|
||||
try {
|
||||
return StringUtils.capitalizeFirstCodePoint(res.getString(nameResId, replacementString), displayLocale);
|
||||
} catch (Resources.NotFoundException e) {
|
||||
// TODO: Remove this catch when InputMethodManager.getCurrentInputMethodSubtype
|
||||
// is fixed.
|
||||
Log.w(TAG, "Unknown subtype: mode=" + subtype.getMode()
|
||||
+ " nameResId=" + subtype.getNameResId()
|
||||
+ " locale=" + subtype.getLocale()
|
||||
|
@ -280,8 +277,7 @@ public final class SubtypeLocaleUtils {
|
|||
if (keyboardLayoutSet == null && subtype.isAsciiCapable()) {
|
||||
keyboardLayoutSet = QWERTY;
|
||||
}
|
||||
// TODO: Remove this null check when InputMethodManager.getCurrentInputMethodSubtype is fixed.
|
||||
if (keyboardLayoutSet == null) {
|
||||
if (keyboardLayoutSet == null) { // we could search for a subtype with the correct script, but this is a bug anyway...
|
||||
Log.w(TAG, "KeyboardLayoutSet not found, use QWERTY: " +
|
||||
"locale=" + subtype.getLocale() + " extraValue=" + subtype.getExtraValue());
|
||||
return QWERTY;
|
||||
|
|
Loading…
Add table
Reference in a new issue