diff --git a/app/src/main/java/helium314/keyboard/keyboard/KeyboardView.java b/app/src/main/java/helium314/keyboard/keyboard/KeyboardView.java index 6eba7a46b..38ecfb9b8 100644 --- a/app/src/main/java/helium314/keyboard/keyboard/KeyboardView.java +++ b/app/src/main/java/helium314/keyboard/keyboard/KeyboardView.java @@ -39,41 +39,12 @@ import helium314.keyboard.latin.common.StringUtils; import helium314.keyboard.latin.settings.Settings; import helium314.keyboard.latin.suggestions.MoreSuggestions; import helium314.keyboard.latin.suggestions.PopupSuggestionsView; -import helium314.keyboard.latin.utils.Log; import helium314.keyboard.latin.utils.TypefaceUtils; import java.util.HashSet; -/** - * A view that renders a virtual {@link Keyboard}. - * - * @attr ref R.styleable#KeyboardView_keyBackground - * @attr ref R.styleable#KeyboardView_functionalKeyBackground - * @attr ref R.styleable#KeyboardView_spacebarBackground - * @attr ref R.styleable#KeyboardView_spacebarIconWidthRatio - * @attr ref R.styleable#Keyboard_Key_keyLabelFlags - * @attr ref R.styleable#KeyboardView_keyHintLetterPadding - * @attr ref R.styleable#KeyboardView_keyPopupHintLetter - * @attr ref R.styleable#KeyboardView_keyPopupHintLetterPadding - * @attr ref R.styleable#KeyboardView_keyShiftedLetterHintPadding - * @attr ref R.styleable#KeyboardView_keyTextShadowRadius - * @attr ref R.styleable#KeyboardView_verticalCorrection - * @attr ref R.styleable#Keyboard_Key_keyTypeface - * @attr ref R.styleable#Keyboard_Key_keyLetterSize - * @attr ref R.styleable#Keyboard_Key_keyLabelSize - * @attr ref R.styleable#Keyboard_Key_keyLargeLetterRatio - * @attr ref R.styleable#Keyboard_Key_keyLargeLabelRatio - * @attr ref R.styleable#Keyboard_Key_keyHintLetterRatio - * @attr ref R.styleable#Keyboard_Key_keyShiftedLetterHintRatio - * @attr ref R.styleable#Keyboard_Key_keyHintLabelRatio - * @attr ref R.styleable#Keyboard_Key_keyLabelOffCenterRatio - * @attr ref R.styleable#Keyboard_Key_keyHintLabelOffCenterRatio - * @attr ref R.styleable#Keyboard_Key_keyPreviewTextRatio - * @attr ref R.styleable#Keyboard_Key_keyTextColorDisabled - * @attr ref R.styleable#Keyboard_Key_keyTextShadowColor - * @attr ref R.styleable#Keyboard_Key_keyShiftedLetterHintInactivatedColor - * @attr ref R.styleable#Keyboard_Key_keyShiftedLetterHintActivatedColor - */ +/** A view that renders a virtual {@link Keyboard}. */ +// todo: this ThemeStyle-dependent stuff really should not be in here! public class KeyboardView extends View { // XML attributes private final KeyVisualAttributes mKeyVisualAttributes; diff --git a/app/src/main/java/helium314/keyboard/keyboard/MainKeyboardView.java b/app/src/main/java/helium314/keyboard/keyboard/MainKeyboardView.java index f18905b6b..6ebcfb778 100644 --- a/app/src/main/java/helium314/keyboard/keyboard/MainKeyboardView.java +++ b/app/src/main/java/helium314/keyboard/keyboard/MainKeyboardView.java @@ -63,43 +63,7 @@ import java.util.List; import java.util.Locale; import java.util.WeakHashMap; -/** - * A view that is responsible for detecting key presses and touch movements. - * - * @attr ref R.styleable#MainKeyboardView_languageOnSpacebarTextRatio - * @attr ref R.styleable#MainKeyboardView_languageOnSpacebarTextShadowRadius - * @attr ref R.styleable#MainKeyboardView_languageOnSpacebarTextShadowColor - * @attr ref R.styleable#MainKeyboardView_languageOnSpacebarFadeoutAnimator - * @attr ref R.styleable#MainKeyboardView_altCodeKeyWhileTypingFadeoutAnimator - * @attr ref R.styleable#MainKeyboardView_altCodeKeyWhileTypingFadeinAnimator - * @attr ref R.styleable#MainKeyboardView_keyHysteresisDistance - * @attr ref R.styleable#MainKeyboardView_touchNoiseThresholdTime - * @attr ref R.styleable#MainKeyboardView_touchNoiseThresholdDistance - * @attr ref R.styleable#MainKeyboardView_keySelectionByDraggingFinger - * @attr ref R.styleable#MainKeyboardView_keyRepeatStartTimeout - * @attr ref R.styleable#MainKeyboardView_keyRepeatInterval - * @attr ref R.styleable#MainKeyboardView_longPressKeyTimeout - * @attr ref R.styleable#MainKeyboardView_longPressShiftKeyTimeout - * @attr ref R.styleable#MainKeyboardView_ignoreAltCodeKeyTimeout - * @attr ref R.styleable#MainKeyboardView_keyPreviewLayout - * @attr ref R.styleable#MainKeyboardView_keyPreviewOffset - * @attr ref R.styleable#MainKeyboardView_popupKeysKeyboardLayout - * @attr ref R.styleable#MainKeyboardView_popupKeysKeyboardForActionLayout - * @attr ref R.styleable#MainKeyboardView_backgroundDimAlpha - * @attr ref R.styleable#MainKeyboardView_showPopupKeysKeyboardAtTouchPoint - * @attr ref R.styleable#MainKeyboardView_gestureFloatingPreviewTextLingerTimeout - * @attr ref R.styleable#MainKeyboardView_gestureStaticTimeThresholdAfterFastTyping - * @attr ref R.styleable#MainKeyboardView_gestureDetectFastMoveSpeedThreshold - * @attr ref R.styleable#MainKeyboardView_gestureDynamicThresholdDecayDuration - * @attr ref R.styleable#MainKeyboardView_gestureDynamicTimeThresholdFrom - * @attr ref R.styleable#MainKeyboardView_gestureDynamicTimeThresholdTo - * @attr ref R.styleable#MainKeyboardView_gestureDynamicDistanceThresholdFrom - * @attr ref R.styleable#MainKeyboardView_gestureDynamicDistanceThresholdTo - * @attr ref R.styleable#MainKeyboardView_gestureSamplingMinimumDistance - * @attr ref R.styleable#MainKeyboardView_gestureRecognitionMinimumTime - * @attr ref R.styleable#MainKeyboardView_gestureRecognitionSpeedThreshold - * @attr ref R.styleable#MainKeyboardView_suppressKeyPreviewAfterBatchInputDuration - */ +/** A view that is responsible for detecting key presses and touch movements. */ public final class MainKeyboardView extends KeyboardView implements DrawingProxy, PopupKeysPanel.Controller { private static final String TAG = MainKeyboardView.class.getSimpleName(); diff --git a/app/src/main/java/helium314/keyboard/keyboard/internal/GestureFloatingTextDrawingPreview.java b/app/src/main/java/helium314/keyboard/keyboard/internal/GestureFloatingTextDrawingPreview.java index 40a565844..b2f5d69a7 100644 --- a/app/src/main/java/helium314/keyboard/keyboard/internal/GestureFloatingTextDrawingPreview.java +++ b/app/src/main/java/helium314/keyboard/keyboard/internal/GestureFloatingTextDrawingPreview.java @@ -27,12 +27,6 @@ import helium314.keyboard.latin.settings.Settings; /** * The class for single gesture preview text. The class for multiple gesture preview text will be * derived from it. - * - * @attr ref R.styleable#KeyboardView_gestureFloatingPreviewTextSize - * @attr ref R.styleable#KeyboardView_gestureFloatingPreviewTextOffset - * @attr ref R.styleable#KeyboardView_gestureFloatingPreviewHorizontalPadding - * @attr ref R.styleable#KeyboardView_gestureFloatingPreviewVerticalPadding - * @attr ref R.styleable#KeyboardView_gestureFloatingPreviewRoundRadius */ public class GestureFloatingTextDrawingPreview extends AbstractDrawingPreview { protected static final class GesturePreviewTextParams { diff --git a/app/src/main/java/helium314/keyboard/keyboard/internal/GestureStrokeDrawingParams.java b/app/src/main/java/helium314/keyboard/keyboard/internal/GestureStrokeDrawingParams.java index 113653be3..134f22295 100644 --- a/app/src/main/java/helium314/keyboard/keyboard/internal/GestureStrokeDrawingParams.java +++ b/app/src/main/java/helium314/keyboard/keyboard/internal/GestureStrokeDrawingParams.java @@ -10,14 +10,7 @@ import android.content.res.TypedArray; import helium314.keyboard.latin.R; -/** - * This class holds parameters to control how a gesture stroke is sampled and drawn on the screen. - * - * @attr ref R.styleable#MainKeyboardView_gestureTrailMinSamplingDistance - * @attr ref R.styleable#MainKeyboardView_gestureTrailMaxInterpolationAngularThreshold - * @attr ref R.styleable#MainKeyboardView_gestureTrailMaxInterpolationDistanceThreshold - * @attr ref R.styleable#MainKeyboardView_gestureTrailMaxInterpolationSegments - */ +/** This class holds parameters to control how a gesture stroke is sampled and drawn on the screen. */ public final class GestureStrokeDrawingParams { public final double mMinSamplingDistance; // in pixel public final double mMaxInterpolationAngularThreshold; // in radian diff --git a/app/src/main/java/helium314/keyboard/keyboard/internal/GestureStrokeRecognitionParams.java b/app/src/main/java/helium314/keyboard/keyboard/internal/GestureStrokeRecognitionParams.java index 4e4101d1f..51352af1f 100644 --- a/app/src/main/java/helium314/keyboard/keyboard/internal/GestureStrokeRecognitionParams.java +++ b/app/src/main/java/helium314/keyboard/keyboard/internal/GestureStrokeRecognitionParams.java @@ -14,17 +14,6 @@ import helium314.keyboard.latin.utils.ResourceUtils; /** * This class holds parameters to control how a gesture stroke is sampled and recognized. * This class also has parameters to distinguish gesture input events from fast typing events. - * - * @attr ref R.styleable#MainKeyboardView_gestureStaticTimeThresholdAfterFastTyping - * @attr ref R.styleable#MainKeyboardView_gestureDetectFastMoveSpeedThreshold - * @attr ref R.styleable#MainKeyboardView_gestureDynamicThresholdDecayDuration - * @attr ref R.styleable#MainKeyboardView_gestureDynamicTimeThresholdFrom - * @attr ref R.styleable#MainKeyboardView_gestureDynamicTimeThresholdTo - * @attr ref R.styleable#MainKeyboardView_gestureDynamicDistanceThresholdFrom - * @attr ref R.styleable#MainKeyboardView_gestureDynamicDistanceThresholdTo - * @attr ref R.styleable#MainKeyboardView_gestureSamplingMinimumDistance - * @attr ref R.styleable#MainKeyboardView_gestureRecognitionMinimumTime - * @attr ref R.styleable#MainKeyboardView_gestureRecognitionSpeedThreshold */ public final class GestureStrokeRecognitionParams { // Static threshold for gesture after fast typing diff --git a/app/src/main/java/helium314/keyboard/keyboard/internal/GestureTrailDrawingParams.java b/app/src/main/java/helium314/keyboard/keyboard/internal/GestureTrailDrawingParams.java index 00b89699e..5f86f3644 100644 --- a/app/src/main/java/helium314/keyboard/keyboard/internal/GestureTrailDrawingParams.java +++ b/app/src/main/java/helium314/keyboard/keyboard/internal/GestureTrailDrawingParams.java @@ -14,15 +14,10 @@ import helium314.keyboard.latin.settings.Settings; /** * This class holds parameters to control how a gesture trail is drawn and animated on the screen. - * + *
* On the other hand, {@link GestureStrokeDrawingParams} class controls how each gesture stroke is
* sampled and interpolated. This class controls how those gesture strokes are displayed as a
* gesture trail and animated on the screen.
- *
- * @attr ref R.styleable#MainKeyboardView_gestureTrailFadeoutStartDelay
- * @attr ref R.styleable#MainKeyboardView_gestureTrailFadeoutDuration
- * @attr ref R.styleable#MainKeyboardView_gestureTrailUpdateInterval
- * @attr ref R.styleable#MainKeyboardView_gestureTrailWidth
*/
final class GestureTrailDrawingParams {
private static final int FADEOUT_START_DELAY_FOR_DEBUG = 2000; // millisecond
diff --git a/app/src/main/java/helium314/keyboard/keyboard/internal/SlidingKeyInputDrawingPreview.java b/app/src/main/java/helium314/keyboard/keyboard/internal/SlidingKeyInputDrawingPreview.java
index 0dc78a8fa..23381fa5a 100644
--- a/app/src/main/java/helium314/keyboard/keyboard/internal/SlidingKeyInputDrawingPreview.java
+++ b/app/src/main/java/helium314/keyboard/keyboard/internal/SlidingKeyInputDrawingPreview.java
@@ -19,13 +19,7 @@ import helium314.keyboard.latin.common.ColorType;
import helium314.keyboard.latin.common.CoordinateUtils;
import helium314.keyboard.latin.settings.Settings;
-/**
- * Draw rubber band preview graphics during sliding key input.
- *
- * @attr ref R.styleable#MainKeyboardView_slidingKeyInputPreviewWidth
- * @attr ref R.styleable#MainKeyboardView_slidingKeyInputPreviewBodyRatio
- * @attr ref R.styleable#MainKeyboardView_slidingKeyInputPreviewShadowRatio
- */
+/** Draw rubber band preview graphics during sliding key input. */
public final class SlidingKeyInputDrawingPreview extends AbstractDrawingPreview {
private final float mPreviewBodyRadius;
diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml
index 463b87b1d..d8ef5903e 100644
--- a/app/src/main/res/values/attrs.xml
+++ b/app/src/main/res/values/attrs.xml
@@ -287,17 +287,6 @@