remove some old attrs stuff

This commit is contained in:
Helium314 2024-05-17 22:05:36 +02:00
parent e54d816126
commit 5b4ba11fb7
8 changed files with 6 additions and 117 deletions

View file

@ -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;

View file

@ -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();

View file

@ -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 {

View file

@ -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

View file

@ -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

View file

@ -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.
*
* <p>
* 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

View file

@ -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;

View file

@ -287,17 +287,6 @@
<attr name="altCode" format="string" />
<!-- Maximum column of popup keys keyboard -->
<attr name="maxPopupKeysColumn" format="integer" />
<attr name="backgroundType" format="enum">
<!-- This should be aligned with
{@link helium314.keyboard.keyboard.Key#BACKGROUND_TYPE_NORMAL} etc. -->
<enum name="empty" value="0" />
<enum name="normal" value="1" />
<enum name="functional" value="2" />
<enum name="stickyOff" value="3" />
<enum name="stickyOn" value="4" />
<enum name="action" value="5" />
<enum name="spacebar" value="6" />
</attr>
<!-- The key action flags. -->
<attr name="keyActionFlags" format="integer">
<!-- This should be aligned with