mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-14 14:02:44 +00:00
remove some old attrs stuff
This commit is contained in:
parent
e54d816126
commit
5b4ba11fb7
8 changed files with 6 additions and 117 deletions
|
@ -39,41 +39,12 @@ import helium314.keyboard.latin.common.StringUtils;
|
||||||
import helium314.keyboard.latin.settings.Settings;
|
import helium314.keyboard.latin.settings.Settings;
|
||||||
import helium314.keyboard.latin.suggestions.MoreSuggestions;
|
import helium314.keyboard.latin.suggestions.MoreSuggestions;
|
||||||
import helium314.keyboard.latin.suggestions.PopupSuggestionsView;
|
import helium314.keyboard.latin.suggestions.PopupSuggestionsView;
|
||||||
import helium314.keyboard.latin.utils.Log;
|
|
||||||
import helium314.keyboard.latin.utils.TypefaceUtils;
|
import helium314.keyboard.latin.utils.TypefaceUtils;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
||||||
/**
|
/** A view that renders a virtual {@link Keyboard}. */
|
||||||
* A view that renders a virtual {@link Keyboard}.
|
// todo: this ThemeStyle-dependent stuff really should not be in here!
|
||||||
*
|
|
||||||
* @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
|
|
||||||
*/
|
|
||||||
public class KeyboardView extends View {
|
public class KeyboardView extends View {
|
||||||
// XML attributes
|
// XML attributes
|
||||||
private final KeyVisualAttributes mKeyVisualAttributes;
|
private final KeyVisualAttributes mKeyVisualAttributes;
|
||||||
|
|
|
@ -63,43 +63,7 @@ import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.WeakHashMap;
|
import java.util.WeakHashMap;
|
||||||
|
|
||||||
/**
|
/** A view that is responsible for detecting key presses and touch movements. */
|
||||||
* 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
|
|
||||||
*/
|
|
||||||
public final class MainKeyboardView extends KeyboardView implements DrawingProxy,
|
public final class MainKeyboardView extends KeyboardView implements DrawingProxy,
|
||||||
PopupKeysPanel.Controller {
|
PopupKeysPanel.Controller {
|
||||||
private static final String TAG = MainKeyboardView.class.getSimpleName();
|
private static final String TAG = MainKeyboardView.class.getSimpleName();
|
||||||
|
|
|
@ -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
|
* The class for single gesture preview text. The class for multiple gesture preview text will be
|
||||||
* derived from it.
|
* 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 {
|
public class GestureFloatingTextDrawingPreview extends AbstractDrawingPreview {
|
||||||
protected static final class GesturePreviewTextParams {
|
protected static final class GesturePreviewTextParams {
|
||||||
|
|
|
@ -10,14 +10,7 @@ import android.content.res.TypedArray;
|
||||||
|
|
||||||
import helium314.keyboard.latin.R;
|
import helium314.keyboard.latin.R;
|
||||||
|
|
||||||
/**
|
/** This class holds parameters to control how a gesture stroke is sampled and drawn on the screen. */
|
||||||
* 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
|
|
||||||
*/
|
|
||||||
public final class GestureStrokeDrawingParams {
|
public final class GestureStrokeDrawingParams {
|
||||||
public final double mMinSamplingDistance; // in pixel
|
public final double mMinSamplingDistance; // in pixel
|
||||||
public final double mMaxInterpolationAngularThreshold; // in radian
|
public final double mMaxInterpolationAngularThreshold; // in radian
|
||||||
|
|
|
@ -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 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.
|
* 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 {
|
public final class GestureStrokeRecognitionParams {
|
||||||
// Static threshold for gesture after fast typing
|
// Static threshold for gesture after fast typing
|
||||||
|
|
|
@ -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.
|
* 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
|
* 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
|
* sampled and interpolated. This class controls how those gesture strokes are displayed as a
|
||||||
* gesture trail and animated on the screen.
|
* 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 {
|
final class GestureTrailDrawingParams {
|
||||||
private static final int FADEOUT_START_DELAY_FOR_DEBUG = 2000; // millisecond
|
private static final int FADEOUT_START_DELAY_FOR_DEBUG = 2000; // millisecond
|
||||||
|
|
|
@ -19,13 +19,7 @@ import helium314.keyboard.latin.common.ColorType;
|
||||||
import helium314.keyboard.latin.common.CoordinateUtils;
|
import helium314.keyboard.latin.common.CoordinateUtils;
|
||||||
import helium314.keyboard.latin.settings.Settings;
|
import helium314.keyboard.latin.settings.Settings;
|
||||||
|
|
||||||
/**
|
/** Draw rubber band preview graphics during sliding key input. */
|
||||||
* 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
|
|
||||||
*/
|
|
||||||
public final class SlidingKeyInputDrawingPreview extends AbstractDrawingPreview {
|
public final class SlidingKeyInputDrawingPreview extends AbstractDrawingPreview {
|
||||||
private final float mPreviewBodyRadius;
|
private final float mPreviewBodyRadius;
|
||||||
|
|
||||||
|
|
|
@ -287,17 +287,6 @@
|
||||||
<attr name="altCode" format="string" />
|
<attr name="altCode" format="string" />
|
||||||
<!-- Maximum column of popup keys keyboard -->
|
<!-- Maximum column of popup keys keyboard -->
|
||||||
<attr name="maxPopupKeysColumn" format="integer" />
|
<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. -->
|
<!-- The key action flags. -->
|
||||||
<attr name="keyActionFlags" format="integer">
|
<attr name="keyActionFlags" format="integer">
|
||||||
<!-- This should be aligned with
|
<!-- This should be aligned with
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue