Initial commit
This commit is contained in:
17
sources/com/kyleduo/switchbutton/ColorUtils.java
Normal file
17
sources/com/kyleduo/switchbutton/ColorUtils.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package com.kyleduo.switchbutton;
|
||||
|
||||
import android.R;
|
||||
import android.content.res.ColorStateList;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class ColorUtils {
|
||||
static ColorStateList a(int i) {
|
||||
int i2 = i - (-805306368);
|
||||
return new ColorStateList(new int[][]{new int[]{-16842910, R.attr.state_checked}, new int[]{-16842910}, new int[]{R.attr.state_checked, R.attr.state_pressed}, new int[]{-16842912, R.attr.state_pressed}, new int[]{R.attr.state_checked}, new int[]{-16842912}}, new int[]{i - (-520093696), 268435456, i2, 536870912, i2, 536870912});
|
||||
}
|
||||
|
||||
static ColorStateList b(int i) {
|
||||
int i2 = i - (-1728053248);
|
||||
return new ColorStateList(new int[][]{new int[]{-16842910, R.attr.state_checked}, new int[]{-16842910}, new int[]{R.attr.state_pressed, -16842912}, new int[]{R.attr.state_pressed, R.attr.state_checked}, new int[]{R.attr.state_checked}, new int[]{-16842912}}, new int[]{i - (-1442840576), -4539718, i2, i2, i | (-16777216), -1118482});
|
||||
}
|
||||
}
|
233
sources/com/kyleduo/switchbutton/R$attr.java
Normal file
233
sources/com/kyleduo/switchbutton/R$attr.java
Normal file
@@ -0,0 +1,233 @@
|
||||
package com.kyleduo.switchbutton;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class R$attr {
|
||||
public static final int actionBarDivider = 2130968576;
|
||||
public static final int actionBarItemBackground = 2130968577;
|
||||
public static final int actionBarPopupTheme = 2130968578;
|
||||
public static final int actionBarSize = 2130968579;
|
||||
public static final int actionBarSplitStyle = 2130968580;
|
||||
public static final int actionBarStyle = 2130968581;
|
||||
public static final int actionBarTabBarStyle = 2130968582;
|
||||
public static final int actionBarTabStyle = 2130968583;
|
||||
public static final int actionBarTabTextStyle = 2130968584;
|
||||
public static final int actionBarTheme = 2130968585;
|
||||
public static final int actionBarWidgetTheme = 2130968586;
|
||||
public static final int actionButtonStyle = 2130968587;
|
||||
public static final int actionDropDownStyle = 2130968589;
|
||||
public static final int actionLayout = 2130968590;
|
||||
public static final int actionMenuTextAppearance = 2130968591;
|
||||
public static final int actionMenuTextColor = 2130968592;
|
||||
public static final int actionModeBackground = 2130968593;
|
||||
public static final int actionModeCloseButtonStyle = 2130968594;
|
||||
public static final int actionModeCloseDrawable = 2130968595;
|
||||
public static final int actionModeCopyDrawable = 2130968596;
|
||||
public static final int actionModeCutDrawable = 2130968597;
|
||||
public static final int actionModeFindDrawable = 2130968598;
|
||||
public static final int actionModePasteDrawable = 2130968599;
|
||||
public static final int actionModePopupWindowStyle = 2130968600;
|
||||
public static final int actionModeSelectAllDrawable = 2130968601;
|
||||
public static final int actionModeShareDrawable = 2130968602;
|
||||
public static final int actionModeSplitBackground = 2130968603;
|
||||
public static final int actionModeStyle = 2130968604;
|
||||
public static final int actionModeWebSearchDrawable = 2130968605;
|
||||
public static final int actionOverflowButtonStyle = 2130968606;
|
||||
public static final int actionOverflowMenuStyle = 2130968607;
|
||||
public static final int actionProviderClass = 2130968608;
|
||||
public static final int actionViewClass = 2130968609;
|
||||
public static final int activityChooserViewStyle = 2130968610;
|
||||
public static final int alertDialogButtonGroupStyle = 2130968611;
|
||||
public static final int alertDialogCenterButtons = 2130968612;
|
||||
public static final int alertDialogStyle = 2130968613;
|
||||
public static final int alertDialogTheme = 2130968614;
|
||||
public static final int allowStacking = 2130968615;
|
||||
public static final int arrowHeadLength = 2130968618;
|
||||
public static final int arrowShaftLength = 2130968619;
|
||||
public static final int autoCompleteTextViewStyle = 2130968623;
|
||||
public static final int background = 2130968629;
|
||||
public static final int backgroundSplit = 2130968630;
|
||||
public static final int backgroundStacked = 2130968631;
|
||||
public static final int backgroundTint = 2130968632;
|
||||
public static final int backgroundTintMode = 2130968633;
|
||||
public static final int barLength = 2130968636;
|
||||
public static final int borderlessButtonStyle = 2130968648;
|
||||
public static final int buttonBarButtonStyle = 2130968663;
|
||||
public static final int buttonBarNegativeButtonStyle = 2130968664;
|
||||
public static final int buttonBarNeutralButtonStyle = 2130968665;
|
||||
public static final int buttonBarPositiveButtonStyle = 2130968666;
|
||||
public static final int buttonBarStyle = 2130968667;
|
||||
public static final int buttonPanelSideLayout = 2130968670;
|
||||
public static final int buttonStyle = 2130968672;
|
||||
public static final int buttonStyleSmall = 2130968673;
|
||||
public static final int buttonTint = 2130968674;
|
||||
public static final int buttonTintMode = 2130968675;
|
||||
public static final int checkboxStyle = 2130968684;
|
||||
public static final int checkedTextViewStyle = 2130968689;
|
||||
public static final int closeIcon = 2130968715;
|
||||
public static final int closeItemLayout = 2130968722;
|
||||
public static final int collapseContentDescription = 2130968723;
|
||||
public static final int collapseIcon = 2130968724;
|
||||
public static final int color = 2130968727;
|
||||
public static final int colorAccent = 2130968728;
|
||||
public static final int colorButtonNormal = 2130968730;
|
||||
public static final int colorControlActivated = 2130968731;
|
||||
public static final int colorControlHighlight = 2130968732;
|
||||
public static final int colorControlNormal = 2130968733;
|
||||
public static final int colorPrimary = 2130968735;
|
||||
public static final int colorPrimaryDark = 2130968736;
|
||||
public static final int colorSwitchThumbNormal = 2130968739;
|
||||
public static final int commitIcon = 2130968753;
|
||||
public static final int contentInsetEnd = 2130968760;
|
||||
public static final int contentInsetLeft = 2130968762;
|
||||
public static final int contentInsetRight = 2130968763;
|
||||
public static final int contentInsetStart = 2130968764;
|
||||
public static final int controlBackground = 2130968772;
|
||||
public static final int customNavigationLayout = 2130968779;
|
||||
public static final int defaultQueryHint = 2130968780;
|
||||
public static final int dialogPreferredPadding = 2130968784;
|
||||
public static final int dialogTheme = 2130968785;
|
||||
public static final int displayOptions = 2130968786;
|
||||
public static final int divider = 2130968787;
|
||||
public static final int dividerHorizontal = 2130968788;
|
||||
public static final int dividerPadding = 2130968789;
|
||||
public static final int dividerVertical = 2130968790;
|
||||
public static final int drawableSize = 2130968792;
|
||||
public static final int drawerArrowStyle = 2130968793;
|
||||
public static final int dropDownListViewStyle = 2130968794;
|
||||
public static final int dropdownListPreferredItemHeight = 2130968795;
|
||||
public static final int editTextBackground = 2130968796;
|
||||
public static final int editTextColor = 2130968797;
|
||||
public static final int editTextStyle = 2130968798;
|
||||
public static final int elevation = 2130968799;
|
||||
public static final int expandActivityOverflowButtonDrawable = 2130968805;
|
||||
public static final int gapBetweenBars = 2130968840;
|
||||
public static final int goIcon = 2130968842;
|
||||
public static final int height = 2130968844;
|
||||
public static final int hideOnContentScroll = 2130968850;
|
||||
public static final int homeAsUpIndicator = 2130968855;
|
||||
public static final int homeLayout = 2130968856;
|
||||
public static final int icon = 2130968858;
|
||||
public static final int iconifiedByDefault = 2130968866;
|
||||
public static final int imageButtonStyle = 2130968869;
|
||||
public static final int indeterminateProgressStyle = 2130968871;
|
||||
public static final int initialActivityCount = 2130968877;
|
||||
public static final int isLightTheme = 2130968879;
|
||||
public static final int itemPadding = 2130968888;
|
||||
public static final int kswAnimationDuration = 2130968895;
|
||||
public static final int kswBackColor = 2130968896;
|
||||
public static final int kswBackDrawable = 2130968897;
|
||||
public static final int kswBackRadius = 2130968898;
|
||||
public static final int kswFadeBack = 2130968899;
|
||||
public static final int kswTextAdjust = 2130968900;
|
||||
public static final int kswTextExtra = 2130968901;
|
||||
public static final int kswTextOff = 2130968902;
|
||||
public static final int kswTextOn = 2130968903;
|
||||
public static final int kswTextThumbInset = 2130968904;
|
||||
public static final int kswThumbColor = 2130968905;
|
||||
public static final int kswThumbDrawable = 2130968906;
|
||||
public static final int kswThumbHeight = 2130968907;
|
||||
public static final int kswThumbMargin = 2130968908;
|
||||
public static final int kswThumbMarginBottom = 2130968909;
|
||||
public static final int kswThumbMarginLeft = 2130968910;
|
||||
public static final int kswThumbMarginRight = 2130968911;
|
||||
public static final int kswThumbMarginTop = 2130968912;
|
||||
public static final int kswThumbRadius = 2130968913;
|
||||
public static final int kswThumbRangeRatio = 2130968914;
|
||||
public static final int kswThumbWidth = 2130968915;
|
||||
public static final int kswTintColor = 2130968916;
|
||||
public static final int layout = 2130968919;
|
||||
public static final int listChoiceBackgroundIndicator = 2130968986;
|
||||
public static final int listDividerAlertDialog = 2130968987;
|
||||
public static final int listItemLayout = 2130968988;
|
||||
public static final int listLayout = 2130968989;
|
||||
public static final int listPopupWindowStyle = 2130968991;
|
||||
public static final int listPreferredItemHeight = 2130968992;
|
||||
public static final int listPreferredItemHeightLarge = 2130968993;
|
||||
public static final int listPreferredItemHeightSmall = 2130968994;
|
||||
public static final int listPreferredItemPaddingLeft = 2130968995;
|
||||
public static final int listPreferredItemPaddingRight = 2130968996;
|
||||
public static final int logo = 2130968997;
|
||||
public static final int logoDescription = 2130968998;
|
||||
public static final int maxButtonHeight = 2130969007;
|
||||
public static final int measureWithLargestChild = 2130969010;
|
||||
public static final int multiChoiceItemLayout = 2130969012;
|
||||
public static final int navigationContentDescription = 2130969013;
|
||||
public static final int navigationIcon = 2130969014;
|
||||
public static final int navigationMode = 2130969015;
|
||||
public static final int overlapAnchor = 2130969023;
|
||||
public static final int paddingEnd = 2130969025;
|
||||
public static final int paddingStart = 2130969026;
|
||||
public static final int panelBackground = 2130969029;
|
||||
public static final int panelMenuListTheme = 2130969030;
|
||||
public static final int panelMenuListWidth = 2130969031;
|
||||
public static final int popupMenuStyle = 2130969037;
|
||||
public static final int popupTheme = 2130969038;
|
||||
public static final int popupWindowStyle = 2130969039;
|
||||
public static final int preserveIconSpacing = 2130969040;
|
||||
public static final int progressBarPadding = 2130969042;
|
||||
public static final int progressBarStyle = 2130969043;
|
||||
public static final int queryBackground = 2130969044;
|
||||
public static final int queryHint = 2130969045;
|
||||
public static final int radioButtonStyle = 2130969046;
|
||||
public static final int ratingBarStyle = 2130969048;
|
||||
public static final int searchHintIcon = 2130969070;
|
||||
public static final int searchIcon = 2130969071;
|
||||
public static final int searchViewStyle = 2130969072;
|
||||
public static final int seekBarStyle = 2130969073;
|
||||
public static final int selectableItemBackground = 2130969074;
|
||||
public static final int selectableItemBackgroundBorderless = 2130969075;
|
||||
public static final int showAsAction = 2130969076;
|
||||
public static final int showDividers = 2130969077;
|
||||
public static final int showText = 2130969079;
|
||||
public static final int singleChoiceItemLayout = 2130969082;
|
||||
public static final int spinBars = 2130969088;
|
||||
public static final int spinnerDropDownItemStyle = 2130969089;
|
||||
public static final int spinnerStyle = 2130969090;
|
||||
public static final int splitTrack = 2130969091;
|
||||
public static final int state_above_anchor = 2130969094;
|
||||
public static final int submitBackground = 2130969105;
|
||||
public static final int subtitle = 2130969106;
|
||||
public static final int subtitleTextAppearance = 2130969107;
|
||||
public static final int subtitleTextColor = 2130969108;
|
||||
public static final int subtitleTextStyle = 2130969109;
|
||||
public static final int suggestionRowLayout = 2130969110;
|
||||
public static final int switchMinWidth = 2130969111;
|
||||
public static final int switchPadding = 2130969112;
|
||||
public static final int switchStyle = 2130969113;
|
||||
public static final int switchTextAppearance = 2130969114;
|
||||
public static final int textAllCaps = 2130969145;
|
||||
public static final int textAppearanceLargePopupMenu = 2130969156;
|
||||
public static final int textAppearanceListItem = 2130969157;
|
||||
public static final int textAppearanceListItemSmall = 2130969159;
|
||||
public static final int textAppearanceSearchResultSubtitle = 2130969162;
|
||||
public static final int textAppearanceSearchResultTitle = 2130969163;
|
||||
public static final int textAppearanceSmallPopupMenu = 2130969164;
|
||||
public static final int textColorAlertDialogListItem = 2130969167;
|
||||
public static final int textColorSearchUrl = 2130969168;
|
||||
public static final int theme = 2130969172;
|
||||
public static final int thickness = 2130969173;
|
||||
public static final int thumbTextPadding = 2130969174;
|
||||
public static final int title = 2130969182;
|
||||
public static final int titleMarginBottom = 2130969185;
|
||||
public static final int titleMarginEnd = 2130969186;
|
||||
public static final int titleMarginStart = 2130969187;
|
||||
public static final int titleMarginTop = 2130969188;
|
||||
public static final int titleMargins = 2130969189;
|
||||
public static final int titleTextAppearance = 2130969190;
|
||||
public static final int titleTextColor = 2130969191;
|
||||
public static final int titleTextStyle = 2130969192;
|
||||
public static final int toolbarNavigationButtonStyle = 2130969199;
|
||||
public static final int toolbarStyle = 2130969200;
|
||||
public static final int track = 2130969205;
|
||||
public static final int voiceIcon = 2130969225;
|
||||
public static final int windowActionBar = 2130969250;
|
||||
public static final int windowActionBarOverlay = 2130969251;
|
||||
public static final int windowActionModeOverlay = 2130969252;
|
||||
public static final int windowFixedHeightMajor = 2130969253;
|
||||
public static final int windowFixedHeightMinor = 2130969254;
|
||||
public static final int windowFixedWidthMajor = 2130969255;
|
||||
public static final int windowFixedWidthMinor = 2130969256;
|
||||
public static final int windowMinWidthMajor = 2130969257;
|
||||
public static final int windowMinWidthMinor = 2130969258;
|
||||
public static final int windowNoTitle = 2130969259;
|
||||
}
|
272
sources/com/kyleduo/switchbutton/R$styleable.java
Normal file
272
sources/com/kyleduo/switchbutton/R$styleable.java
Normal file
@@ -0,0 +1,272 @@
|
||||
package com.kyleduo.switchbutton;
|
||||
|
||||
import com.ubt.jimu.R;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class R$styleable {
|
||||
public static final int ActionBarLayout_android_layout_gravity = 0;
|
||||
public static final int ActionBar_background = 0;
|
||||
public static final int ActionBar_backgroundSplit = 1;
|
||||
public static final int ActionBar_backgroundStacked = 2;
|
||||
public static final int ActionBar_contentInsetEnd = 3;
|
||||
public static final int ActionBar_contentInsetEndWithActions = 4;
|
||||
public static final int ActionBar_contentInsetLeft = 5;
|
||||
public static final int ActionBar_contentInsetRight = 6;
|
||||
public static final int ActionBar_contentInsetStart = 7;
|
||||
public static final int ActionBar_contentInsetStartWithNavigation = 8;
|
||||
public static final int ActionBar_customNavigationLayout = 9;
|
||||
public static final int ActionBar_displayOptions = 10;
|
||||
public static final int ActionBar_divider = 11;
|
||||
public static final int ActionBar_elevation = 12;
|
||||
public static final int ActionBar_height = 13;
|
||||
public static final int ActionBar_hideOnContentScroll = 14;
|
||||
public static final int ActionBar_homeAsUpIndicator = 15;
|
||||
public static final int ActionBar_homeLayout = 16;
|
||||
public static final int ActionBar_icon = 17;
|
||||
public static final int ActionBar_indeterminateProgressStyle = 18;
|
||||
public static final int ActionBar_itemPadding = 19;
|
||||
public static final int ActionBar_logo = 20;
|
||||
public static final int ActionBar_navigationMode = 21;
|
||||
public static final int ActionBar_popupTheme = 22;
|
||||
public static final int ActionBar_progressBarPadding = 23;
|
||||
public static final int ActionBar_progressBarStyle = 24;
|
||||
public static final int ActionBar_subtitle = 25;
|
||||
public static final int ActionBar_subtitleTextStyle = 26;
|
||||
public static final int ActionBar_title = 27;
|
||||
public static final int ActionBar_titleTextStyle = 28;
|
||||
public static final int ActionMenuItemView_android_minWidth = 0;
|
||||
public static final int ActionMode_background = 0;
|
||||
public static final int ActionMode_backgroundSplit = 1;
|
||||
public static final int ActionMode_closeItemLayout = 2;
|
||||
public static final int ActionMode_height = 3;
|
||||
public static final int ActionMode_subtitleTextStyle = 4;
|
||||
public static final int ActionMode_titleTextStyle = 5;
|
||||
public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 0;
|
||||
public static final int ActivityChooserView_initialActivityCount = 1;
|
||||
public static final int AlertDialog_android_layout = 0;
|
||||
public static final int AlertDialog_buttonIconDimen = 1;
|
||||
public static final int AlertDialog_buttonPanelSideLayout = 2;
|
||||
public static final int AlertDialog_listItemLayout = 3;
|
||||
public static final int AlertDialog_listLayout = 4;
|
||||
public static final int AlertDialog_multiChoiceItemLayout = 5;
|
||||
public static final int AlertDialog_showTitle = 6;
|
||||
public static final int AlertDialog_singleChoiceItemLayout = 7;
|
||||
public static final int AppCompatTextView_android_textAppearance = 0;
|
||||
public static final int AppCompatTextView_autoSizeMaxTextSize = 1;
|
||||
public static final int AppCompatTextView_autoSizeMinTextSize = 2;
|
||||
public static final int AppCompatTextView_autoSizePresetSizes = 3;
|
||||
public static final int AppCompatTextView_autoSizeStepGranularity = 4;
|
||||
public static final int AppCompatTextView_autoSizeTextType = 5;
|
||||
public static final int AppCompatTextView_firstBaselineToTopHeight = 6;
|
||||
public static final int AppCompatTextView_fontFamily = 7;
|
||||
public static final int AppCompatTextView_lastBaselineToBottomHeight = 8;
|
||||
public static final int AppCompatTextView_lineHeight = 9;
|
||||
public static final int AppCompatTextView_textAllCaps = 10;
|
||||
public static final int ButtonBarLayout_allowStacking = 0;
|
||||
public static final int CompoundButton_android_button = 0;
|
||||
public static final int CompoundButton_buttonTint = 1;
|
||||
public static final int CompoundButton_buttonTintMode = 2;
|
||||
public static final int DrawerArrowToggle_arrowHeadLength = 0;
|
||||
public static final int DrawerArrowToggle_arrowShaftLength = 1;
|
||||
public static final int DrawerArrowToggle_barLength = 2;
|
||||
public static final int DrawerArrowToggle_color = 3;
|
||||
public static final int DrawerArrowToggle_drawableSize = 4;
|
||||
public static final int DrawerArrowToggle_gapBetweenBars = 5;
|
||||
public static final int DrawerArrowToggle_spinBars = 6;
|
||||
public static final int DrawerArrowToggle_thickness = 7;
|
||||
public static final int LinearLayoutCompat_Layout_android_layout_gravity = 0;
|
||||
public static final int LinearLayoutCompat_Layout_android_layout_height = 2;
|
||||
public static final int LinearLayoutCompat_Layout_android_layout_weight = 3;
|
||||
public static final int LinearLayoutCompat_Layout_android_layout_width = 1;
|
||||
public static final int LinearLayoutCompat_android_baselineAligned = 2;
|
||||
public static final int LinearLayoutCompat_android_baselineAlignedChildIndex = 3;
|
||||
public static final int LinearLayoutCompat_android_gravity = 0;
|
||||
public static final int LinearLayoutCompat_android_orientation = 1;
|
||||
public static final int LinearLayoutCompat_android_weightSum = 4;
|
||||
public static final int LinearLayoutCompat_divider = 5;
|
||||
public static final int LinearLayoutCompat_dividerPadding = 6;
|
||||
public static final int LinearLayoutCompat_measureWithLargestChild = 7;
|
||||
public static final int LinearLayoutCompat_showDividers = 8;
|
||||
public static final int ListPopupWindow_android_dropDownHorizontalOffset = 0;
|
||||
public static final int ListPopupWindow_android_dropDownVerticalOffset = 1;
|
||||
public static final int MenuGroup_android_checkableBehavior = 5;
|
||||
public static final int MenuGroup_android_enabled = 0;
|
||||
public static final int MenuGroup_android_id = 1;
|
||||
public static final int MenuGroup_android_menuCategory = 3;
|
||||
public static final int MenuGroup_android_orderInCategory = 4;
|
||||
public static final int MenuGroup_android_visible = 2;
|
||||
public static final int MenuItem_actionLayout = 13;
|
||||
public static final int MenuItem_actionProviderClass = 14;
|
||||
public static final int MenuItem_actionViewClass = 15;
|
||||
public static final int MenuItem_alphabeticModifiers = 16;
|
||||
public static final int MenuItem_android_alphabeticShortcut = 9;
|
||||
public static final int MenuItem_android_checkable = 11;
|
||||
public static final int MenuItem_android_checked = 3;
|
||||
public static final int MenuItem_android_enabled = 1;
|
||||
public static final int MenuItem_android_icon = 0;
|
||||
public static final int MenuItem_android_id = 2;
|
||||
public static final int MenuItem_android_menuCategory = 5;
|
||||
public static final int MenuItem_android_numericShortcut = 10;
|
||||
public static final int MenuItem_android_onClick = 12;
|
||||
public static final int MenuItem_android_orderInCategory = 6;
|
||||
public static final int MenuItem_android_title = 7;
|
||||
public static final int MenuItem_android_titleCondensed = 8;
|
||||
public static final int MenuItem_android_visible = 4;
|
||||
public static final int MenuItem_contentDescription = 17;
|
||||
public static final int MenuItem_iconTint = 18;
|
||||
public static final int MenuItem_iconTintMode = 19;
|
||||
public static final int MenuItem_numericModifiers = 20;
|
||||
public static final int MenuItem_showAsAction = 21;
|
||||
public static final int MenuItem_tooltipText = 22;
|
||||
public static final int MenuView_android_headerBackground = 4;
|
||||
public static final int MenuView_android_horizontalDivider = 2;
|
||||
public static final int MenuView_android_itemBackground = 5;
|
||||
public static final int MenuView_android_itemIconDisabledAlpha = 6;
|
||||
public static final int MenuView_android_itemTextAppearance = 1;
|
||||
public static final int MenuView_android_verticalDivider = 3;
|
||||
public static final int MenuView_android_windowAnimationStyle = 0;
|
||||
public static final int MenuView_preserveIconSpacing = 7;
|
||||
public static final int MenuView_subMenuArrow = 8;
|
||||
public static final int PopupWindowBackgroundState_state_above_anchor = 0;
|
||||
public static final int PopupWindow_android_popupAnimationStyle = 1;
|
||||
public static final int PopupWindow_android_popupBackground = 0;
|
||||
public static final int PopupWindow_overlapAnchor = 2;
|
||||
public static final int SearchView_android_focusable = 0;
|
||||
public static final int SearchView_android_imeOptions = 3;
|
||||
public static final int SearchView_android_inputType = 2;
|
||||
public static final int SearchView_android_maxWidth = 1;
|
||||
public static final int SearchView_closeIcon = 4;
|
||||
public static final int SearchView_commitIcon = 5;
|
||||
public static final int SearchView_defaultQueryHint = 6;
|
||||
public static final int SearchView_goIcon = 7;
|
||||
public static final int SearchView_iconifiedByDefault = 8;
|
||||
public static final int SearchView_layout = 9;
|
||||
public static final int SearchView_queryBackground = 10;
|
||||
public static final int SearchView_queryHint = 11;
|
||||
public static final int SearchView_searchHintIcon = 12;
|
||||
public static final int SearchView_searchIcon = 13;
|
||||
public static final int SearchView_submitBackground = 14;
|
||||
public static final int SearchView_suggestionRowLayout = 15;
|
||||
public static final int SearchView_voiceIcon = 16;
|
||||
public static final int Spinner_android_dropDownWidth = 3;
|
||||
public static final int Spinner_android_entries = 0;
|
||||
public static final int Spinner_android_popupBackground = 1;
|
||||
public static final int Spinner_android_prompt = 2;
|
||||
public static final int Spinner_popupTheme = 4;
|
||||
public static final int SwitchButton_kswAnimationDuration = 0;
|
||||
public static final int SwitchButton_kswBackColor = 1;
|
||||
public static final int SwitchButton_kswBackDrawable = 2;
|
||||
public static final int SwitchButton_kswBackRadius = 3;
|
||||
public static final int SwitchButton_kswFadeBack = 4;
|
||||
public static final int SwitchButton_kswTextAdjust = 5;
|
||||
public static final int SwitchButton_kswTextExtra = 6;
|
||||
public static final int SwitchButton_kswTextOff = 7;
|
||||
public static final int SwitchButton_kswTextOn = 8;
|
||||
public static final int SwitchButton_kswTextThumbInset = 9;
|
||||
public static final int SwitchButton_kswThumbColor = 10;
|
||||
public static final int SwitchButton_kswThumbDrawable = 11;
|
||||
public static final int SwitchButton_kswThumbHeight = 12;
|
||||
public static final int SwitchButton_kswThumbMargin = 13;
|
||||
public static final int SwitchButton_kswThumbMarginBottom = 14;
|
||||
public static final int SwitchButton_kswThumbMarginLeft = 15;
|
||||
public static final int SwitchButton_kswThumbMarginRight = 16;
|
||||
public static final int SwitchButton_kswThumbMarginTop = 17;
|
||||
public static final int SwitchButton_kswThumbRadius = 18;
|
||||
public static final int SwitchButton_kswThumbRangeRatio = 19;
|
||||
public static final int SwitchButton_kswThumbWidth = 20;
|
||||
public static final int SwitchButton_kswTintColor = 21;
|
||||
public static final int SwitchCompat_android_textOff = 1;
|
||||
public static final int SwitchCompat_android_textOn = 0;
|
||||
public static final int SwitchCompat_android_thumb = 2;
|
||||
public static final int SwitchCompat_showText = 3;
|
||||
public static final int SwitchCompat_splitTrack = 4;
|
||||
public static final int SwitchCompat_switchMinWidth = 5;
|
||||
public static final int SwitchCompat_switchPadding = 6;
|
||||
public static final int SwitchCompat_switchTextAppearance = 7;
|
||||
public static final int SwitchCompat_thumbTextPadding = 8;
|
||||
public static final int SwitchCompat_thumbTint = 9;
|
||||
public static final int SwitchCompat_thumbTintMode = 10;
|
||||
public static final int SwitchCompat_track = 11;
|
||||
public static final int SwitchCompat_trackTint = 12;
|
||||
public static final int SwitchCompat_trackTintMode = 13;
|
||||
public static final int TextAppearance_android_fontFamily = 10;
|
||||
public static final int TextAppearance_android_shadowColor = 6;
|
||||
public static final int TextAppearance_android_shadowDx = 7;
|
||||
public static final int TextAppearance_android_shadowDy = 8;
|
||||
public static final int TextAppearance_android_shadowRadius = 9;
|
||||
public static final int TextAppearance_android_textColor = 3;
|
||||
public static final int TextAppearance_android_textColorHint = 4;
|
||||
public static final int TextAppearance_android_textColorLink = 5;
|
||||
public static final int TextAppearance_android_textSize = 0;
|
||||
public static final int TextAppearance_android_textStyle = 2;
|
||||
public static final int TextAppearance_android_typeface = 1;
|
||||
public static final int TextAppearance_fontFamily = 11;
|
||||
public static final int TextAppearance_textAllCaps = 12;
|
||||
public static final int Toolbar_android_gravity = 0;
|
||||
public static final int Toolbar_android_minHeight = 1;
|
||||
public static final int Toolbar_buttonGravity = 2;
|
||||
public static final int Toolbar_collapseContentDescription = 3;
|
||||
public static final int Toolbar_collapseIcon = 4;
|
||||
public static final int Toolbar_contentInsetEnd = 5;
|
||||
public static final int Toolbar_contentInsetEndWithActions = 6;
|
||||
public static final int Toolbar_contentInsetLeft = 7;
|
||||
public static final int Toolbar_contentInsetRight = 8;
|
||||
public static final int Toolbar_contentInsetStart = 9;
|
||||
public static final int Toolbar_contentInsetStartWithNavigation = 10;
|
||||
public static final int Toolbar_logo = 11;
|
||||
public static final int Toolbar_logoDescription = 12;
|
||||
public static final int Toolbar_maxButtonHeight = 13;
|
||||
public static final int Toolbar_navigationContentDescription = 14;
|
||||
public static final int Toolbar_navigationIcon = 15;
|
||||
public static final int Toolbar_popupTheme = 16;
|
||||
public static final int Toolbar_subtitle = 17;
|
||||
public static final int Toolbar_subtitleTextAppearance = 18;
|
||||
public static final int Toolbar_subtitleTextColor = 19;
|
||||
public static final int Toolbar_title = 20;
|
||||
public static final int Toolbar_titleMargin = 21;
|
||||
public static final int Toolbar_titleMarginBottom = 22;
|
||||
public static final int Toolbar_titleMarginEnd = 23;
|
||||
public static final int Toolbar_titleMarginStart = 24;
|
||||
public static final int Toolbar_titleMarginTop = 25;
|
||||
public static final int Toolbar_titleMargins = 26;
|
||||
public static final int Toolbar_titleTextAppearance = 27;
|
||||
public static final int Toolbar_titleTextColor = 28;
|
||||
public static final int ViewBackgroundHelper_android_background = 0;
|
||||
public static final int ViewBackgroundHelper_backgroundTint = 1;
|
||||
public static final int ViewBackgroundHelper_backgroundTintMode = 2;
|
||||
public static final int ViewStubCompat_android_id = 0;
|
||||
public static final int ViewStubCompat_android_inflatedId = 2;
|
||||
public static final int ViewStubCompat_android_layout = 1;
|
||||
public static final int View_android_focusable = 1;
|
||||
public static final int View_android_theme = 0;
|
||||
public static final int View_paddingEnd = 2;
|
||||
public static final int View_paddingStart = 3;
|
||||
public static final int View_theme = 4;
|
||||
public static final int[] ActionBar = {R.attr.background, R.attr.backgroundSplit, R.attr.backgroundStacked, R.attr.contentInsetEnd, R.attr.contentInsetEndWithActions, R.attr.contentInsetLeft, R.attr.contentInsetRight, R.attr.contentInsetStart, R.attr.contentInsetStartWithNavigation, R.attr.customNavigationLayout, R.attr.displayOptions, R.attr.divider, R.attr.elevation, R.attr.height, R.attr.hideOnContentScroll, R.attr.homeAsUpIndicator, R.attr.homeLayout, R.attr.icon, R.attr.indeterminateProgressStyle, R.attr.itemPadding, R.attr.logo, R.attr.navigationMode, R.attr.popupTheme, R.attr.progressBarPadding, R.attr.progressBarStyle, R.attr.subtitle, R.attr.subtitleTextStyle, R.attr.title, R.attr.titleTextStyle};
|
||||
public static final int[] ActionBarLayout = {android.R.attr.layout_gravity};
|
||||
public static final int[] ActionMenuItemView = {android.R.attr.minWidth};
|
||||
public static final int[] ActionMode = {R.attr.background, R.attr.backgroundSplit, R.attr.closeItemLayout, R.attr.height, R.attr.subtitleTextStyle, R.attr.titleTextStyle};
|
||||
public static final int[] ActivityChooserView = {R.attr.expandActivityOverflowButtonDrawable, R.attr.initialActivityCount};
|
||||
public static final int[] AlertDialog = {android.R.attr.layout, R.attr.buttonIconDimen, R.attr.buttonPanelSideLayout, R.attr.listItemLayout, R.attr.listLayout, R.attr.multiChoiceItemLayout, R.attr.showTitle, R.attr.singleChoiceItemLayout};
|
||||
public static final int[] AppCompatTextView = {android.R.attr.textAppearance, R.attr.autoSizeMaxTextSize, R.attr.autoSizeMinTextSize, R.attr.autoSizePresetSizes, R.attr.autoSizeStepGranularity, R.attr.autoSizeTextType, R.attr.firstBaselineToTopHeight, R.attr.fontFamily, R.attr.lastBaselineToBottomHeight, R.attr.lineHeight, R.attr.textAllCaps};
|
||||
public static final int[] ButtonBarLayout = {R.attr.allowStacking};
|
||||
public static final int[] CompoundButton = {android.R.attr.button, R.attr.buttonTint, R.attr.buttonTintMode};
|
||||
public static final int[] DrawerArrowToggle = {R.attr.arrowHeadLength, R.attr.arrowShaftLength, R.attr.barLength, R.attr.color, R.attr.drawableSize, R.attr.gapBetweenBars, R.attr.spinBars, R.attr.thickness};
|
||||
public static final int[] LinearLayoutCompat = {android.R.attr.gravity, android.R.attr.orientation, android.R.attr.baselineAligned, android.R.attr.baselineAlignedChildIndex, android.R.attr.weightSum, R.attr.divider, R.attr.dividerPadding, R.attr.measureWithLargestChild, R.attr.showDividers};
|
||||
public static final int[] LinearLayoutCompat_Layout = {android.R.attr.layout_gravity, android.R.attr.layout_width, android.R.attr.layout_height, android.R.attr.layout_weight};
|
||||
public static final int[] ListPopupWindow = {android.R.attr.dropDownHorizontalOffset, android.R.attr.dropDownVerticalOffset};
|
||||
public static final int[] MenuGroup = {android.R.attr.enabled, android.R.attr.id, android.R.attr.visible, android.R.attr.menuCategory, android.R.attr.orderInCategory, android.R.attr.checkableBehavior};
|
||||
public static final int[] MenuItem = {android.R.attr.icon, android.R.attr.enabled, android.R.attr.id, android.R.attr.checked, android.R.attr.visible, android.R.attr.menuCategory, android.R.attr.orderInCategory, android.R.attr.title, android.R.attr.titleCondensed, android.R.attr.alphabeticShortcut, android.R.attr.numericShortcut, android.R.attr.checkable, android.R.attr.onClick, R.attr.actionLayout, R.attr.actionProviderClass, R.attr.actionViewClass, R.attr.alphabeticModifiers, R.attr.contentDescription, R.attr.iconTint, R.attr.iconTintMode, R.attr.numericModifiers, R.attr.showAsAction, R.attr.tooltipText};
|
||||
public static final int[] MenuView = {android.R.attr.windowAnimationStyle, android.R.attr.itemTextAppearance, android.R.attr.horizontalDivider, android.R.attr.verticalDivider, android.R.attr.headerBackground, android.R.attr.itemBackground, android.R.attr.itemIconDisabledAlpha, R.attr.preserveIconSpacing, R.attr.subMenuArrow};
|
||||
public static final int[] PopupWindow = {android.R.attr.popupBackground, android.R.attr.popupAnimationStyle, R.attr.overlapAnchor};
|
||||
public static final int[] PopupWindowBackgroundState = {R.attr.state_above_anchor};
|
||||
public static final int[] SearchView = {android.R.attr.focusable, android.R.attr.maxWidth, android.R.attr.inputType, android.R.attr.imeOptions, R.attr.closeIcon, R.attr.commitIcon, R.attr.defaultQueryHint, R.attr.goIcon, R.attr.iconifiedByDefault, R.attr.layout, R.attr.queryBackground, R.attr.queryHint, R.attr.searchHintIcon, R.attr.searchIcon, R.attr.submitBackground, R.attr.suggestionRowLayout, R.attr.voiceIcon};
|
||||
public static final int[] Spinner = {android.R.attr.entries, android.R.attr.popupBackground, android.R.attr.prompt, android.R.attr.dropDownWidth, R.attr.popupTheme};
|
||||
public static final int[] SwitchButton = {R.attr.kswAnimationDuration, R.attr.kswBackColor, R.attr.kswBackDrawable, R.attr.kswBackRadius, R.attr.kswFadeBack, R.attr.kswTextAdjust, R.attr.kswTextExtra, R.attr.kswTextOff, R.attr.kswTextOn, R.attr.kswTextThumbInset, R.attr.kswThumbColor, R.attr.kswThumbDrawable, R.attr.kswThumbHeight, R.attr.kswThumbMargin, R.attr.kswThumbMarginBottom, R.attr.kswThumbMarginLeft, R.attr.kswThumbMarginRight, R.attr.kswThumbMarginTop, R.attr.kswThumbRadius, R.attr.kswThumbRangeRatio, R.attr.kswThumbWidth, R.attr.kswTintColor};
|
||||
public static final int[] SwitchCompat = {android.R.attr.textOn, android.R.attr.textOff, android.R.attr.thumb, R.attr.showText, R.attr.splitTrack, R.attr.switchMinWidth, R.attr.switchPadding, R.attr.switchTextAppearance, R.attr.thumbTextPadding, R.attr.thumbTint, R.attr.thumbTintMode, R.attr.track, R.attr.trackTint, R.attr.trackTintMode};
|
||||
public static final int[] TextAppearance = {android.R.attr.textSize, android.R.attr.typeface, android.R.attr.textStyle, android.R.attr.textColor, android.R.attr.textColorHint, android.R.attr.textColorLink, android.R.attr.shadowColor, android.R.attr.shadowDx, android.R.attr.shadowDy, android.R.attr.shadowRadius, android.R.attr.fontFamily, R.attr.fontFamily, R.attr.textAllCaps};
|
||||
public static final int[] Toolbar = {android.R.attr.gravity, android.R.attr.minHeight, R.attr.buttonGravity, R.attr.collapseContentDescription, R.attr.collapseIcon, R.attr.contentInsetEnd, R.attr.contentInsetEndWithActions, R.attr.contentInsetLeft, R.attr.contentInsetRight, R.attr.contentInsetStart, R.attr.contentInsetStartWithNavigation, R.attr.logo, R.attr.logoDescription, R.attr.maxButtonHeight, R.attr.navigationContentDescription, R.attr.navigationIcon, R.attr.popupTheme, R.attr.subtitle, R.attr.subtitleTextAppearance, R.attr.subtitleTextColor, R.attr.title, R.attr.titleMargin, R.attr.titleMarginBottom, R.attr.titleMarginEnd, R.attr.titleMarginStart, R.attr.titleMarginTop, R.attr.titleMargins, R.attr.titleTextAppearance, R.attr.titleTextColor};
|
||||
public static final int[] View = {android.R.attr.theme, android.R.attr.focusable, R.attr.paddingEnd, R.attr.paddingStart, R.attr.theme};
|
||||
public static final int[] ViewBackgroundHelper = {android.R.attr.background, R.attr.backgroundTint, R.attr.backgroundTintMode};
|
||||
public static final int[] ViewStubCompat = {android.R.attr.id, android.R.attr.layout, android.R.attr.inflatedId};
|
||||
}
|
955
sources/com/kyleduo/switchbutton/SwitchButton.java
Normal file
955
sources/com/kyleduo/switchbutton/SwitchButton.java
Normal file
@@ -0,0 +1,955 @@
|
||||
package com.kyleduo.switchbutton;
|
||||
|
||||
import android.R;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.PointF;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.StateListDrawable;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.text.Layout;
|
||||
import android.text.StaticLayout;
|
||||
import android.text.TextPaint;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.TypedValue;
|
||||
import android.view.View;
|
||||
import android.view.ViewConfiguration;
|
||||
import android.view.ViewParent;
|
||||
import android.view.animation.AccelerateDecelerateInterpolator;
|
||||
import android.widget.CompoundButton;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class SwitchButton extends CompoundButton {
|
||||
private static int[] g0 = {R.attr.state_checked, R.attr.state_enabled, R.attr.state_pressed};
|
||||
private static int[] h0 = {-16842912, R.attr.state_enabled, R.attr.state_pressed};
|
||||
private RectF A;
|
||||
private RectF B;
|
||||
private Paint C;
|
||||
private boolean D;
|
||||
private boolean E;
|
||||
private boolean F;
|
||||
private ObjectAnimator G;
|
||||
private float H;
|
||||
private RectF I;
|
||||
private float J;
|
||||
private float K;
|
||||
private float L;
|
||||
private int M;
|
||||
private int N;
|
||||
private Paint O;
|
||||
private CharSequence P;
|
||||
private CharSequence Q;
|
||||
private TextPaint R;
|
||||
private Layout S;
|
||||
private Layout T;
|
||||
private float U;
|
||||
private float V;
|
||||
private int W;
|
||||
private Drawable a;
|
||||
private int a0;
|
||||
private Drawable b;
|
||||
private int b0;
|
||||
private ColorStateList c;
|
||||
private boolean c0;
|
||||
private ColorStateList d;
|
||||
private boolean d0;
|
||||
private float e;
|
||||
private boolean e0;
|
||||
private float f;
|
||||
private CompoundButton.OnCheckedChangeListener f0;
|
||||
private RectF g;
|
||||
private float h;
|
||||
private long i;
|
||||
private boolean j;
|
||||
private int k;
|
||||
private int l;
|
||||
private int m;
|
||||
private int n;
|
||||
private int o;
|
||||
private int p;
|
||||
private int q;
|
||||
private int r;
|
||||
private int s;
|
||||
private int t;
|
||||
private Drawable u;
|
||||
private Drawable v;
|
||||
private RectF x;
|
||||
private RectF y;
|
||||
private RectF z;
|
||||
|
||||
static class SavedState extends View.BaseSavedState {
|
||||
public static final Parcelable.Creator<SavedState> CREATOR = new Parcelable.Creator<SavedState>() { // from class: com.kyleduo.switchbutton.SwitchButton.SavedState.1
|
||||
/* JADX WARN: Can't rename method to resolve collision */
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public SavedState createFromParcel(Parcel parcel) {
|
||||
return new SavedState(parcel);
|
||||
}
|
||||
|
||||
/* JADX WARN: Can't rename method to resolve collision */
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public SavedState[] newArray(int i) {
|
||||
return new SavedState[i];
|
||||
}
|
||||
};
|
||||
CharSequence offText;
|
||||
CharSequence onText;
|
||||
|
||||
@Override // android.view.View.BaseSavedState, android.view.AbsSavedState, android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
super.writeToParcel(parcel, i);
|
||||
TextUtils.writeToParcel(this.onText, parcel, i);
|
||||
TextUtils.writeToParcel(this.offText, parcel, i);
|
||||
}
|
||||
|
||||
SavedState(Parcelable parcelable) {
|
||||
super(parcelable);
|
||||
}
|
||||
|
||||
private SavedState(Parcel parcel) {
|
||||
super(parcel);
|
||||
this.onText = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
|
||||
this.offText = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
|
||||
}
|
||||
}
|
||||
|
||||
public SwitchButton(Context context, AttributeSet attributeSet, int i) {
|
||||
super(context, attributeSet, i);
|
||||
this.F = false;
|
||||
this.c0 = false;
|
||||
this.d0 = false;
|
||||
this.e0 = false;
|
||||
a(attributeSet);
|
||||
}
|
||||
|
||||
private void a(AttributeSet attributeSet) {
|
||||
String str;
|
||||
String str2;
|
||||
int i;
|
||||
int i2;
|
||||
int i3;
|
||||
int i4;
|
||||
float f;
|
||||
float f2;
|
||||
Drawable drawable;
|
||||
ColorStateList colorStateList;
|
||||
Drawable drawable2;
|
||||
ColorStateList colorStateList2;
|
||||
float f3;
|
||||
float f4;
|
||||
float f5;
|
||||
float f6;
|
||||
float f7;
|
||||
float f8;
|
||||
float f9;
|
||||
int i5;
|
||||
boolean z;
|
||||
float f10;
|
||||
TypedArray obtainStyledAttributes;
|
||||
ColorStateList colorStateList3;
|
||||
boolean z2;
|
||||
this.M = ViewConfiguration.get(getContext()).getScaledTouchSlop();
|
||||
this.N = ViewConfiguration.getPressedStateDuration() + ViewConfiguration.getTapTimeout();
|
||||
this.C = new Paint(1);
|
||||
this.O = new Paint(1);
|
||||
this.O.setStyle(Paint.Style.STROKE);
|
||||
this.O.setStrokeWidth(getResources().getDisplayMetrics().density);
|
||||
this.R = getPaint();
|
||||
this.x = new RectF();
|
||||
this.y = new RectF();
|
||||
this.z = new RectF();
|
||||
this.g = new RectF();
|
||||
this.A = new RectF();
|
||||
this.B = new RectF();
|
||||
this.G = ObjectAnimator.ofFloat(this, "progress", 0.0f, 0.0f).setDuration(250L);
|
||||
this.G.setInterpolator(new AccelerateDecelerateInterpolator());
|
||||
this.I = new RectF();
|
||||
float f11 = getResources().getDisplayMetrics().density * 2.0f;
|
||||
TypedArray obtainStyledAttributes2 = attributeSet == null ? null : getContext().obtainStyledAttributes(attributeSet, R$styleable.SwitchButton);
|
||||
if (obtainStyledAttributes2 != null) {
|
||||
drawable2 = obtainStyledAttributes2.getDrawable(R$styleable.SwitchButton_kswThumbDrawable);
|
||||
colorStateList2 = obtainStyledAttributes2.getColorStateList(R$styleable.SwitchButton_kswThumbColor);
|
||||
float dimension = obtainStyledAttributes2.getDimension(R$styleable.SwitchButton_kswThumbMargin, f11);
|
||||
float dimension2 = obtainStyledAttributes2.getDimension(R$styleable.SwitchButton_kswThumbMarginLeft, dimension);
|
||||
f4 = obtainStyledAttributes2.getDimension(R$styleable.SwitchButton_kswThumbMarginRight, dimension);
|
||||
float dimension3 = obtainStyledAttributes2.getDimension(R$styleable.SwitchButton_kswThumbMarginTop, dimension);
|
||||
float dimension4 = obtainStyledAttributes2.getDimension(R$styleable.SwitchButton_kswThumbMarginBottom, dimension);
|
||||
float dimension5 = obtainStyledAttributes2.getDimension(R$styleable.SwitchButton_kswThumbWidth, 0.0f);
|
||||
f2 = obtainStyledAttributes2.getDimension(R$styleable.SwitchButton_kswThumbHeight, 0.0f);
|
||||
float dimension6 = obtainStyledAttributes2.getDimension(R$styleable.SwitchButton_kswThumbRadius, -1.0f);
|
||||
float dimension7 = obtainStyledAttributes2.getDimension(R$styleable.SwitchButton_kswBackRadius, -1.0f);
|
||||
Drawable drawable3 = obtainStyledAttributes2.getDrawable(R$styleable.SwitchButton_kswBackDrawable);
|
||||
colorStateList = obtainStyledAttributes2.getColorStateList(R$styleable.SwitchButton_kswBackColor);
|
||||
float f12 = obtainStyledAttributes2.getFloat(R$styleable.SwitchButton_kswThumbRangeRatio, 1.8f);
|
||||
int integer = obtainStyledAttributes2.getInteger(R$styleable.SwitchButton_kswAnimationDuration, ItemTouchHelper.Callback.DEFAULT_SWIPE_ANIMATION_DURATION);
|
||||
boolean z3 = obtainStyledAttributes2.getBoolean(R$styleable.SwitchButton_kswFadeBack, true);
|
||||
int color = obtainStyledAttributes2.getColor(R$styleable.SwitchButton_kswTintColor, 0);
|
||||
String string = obtainStyledAttributes2.getString(R$styleable.SwitchButton_kswTextOn);
|
||||
String string2 = obtainStyledAttributes2.getString(R$styleable.SwitchButton_kswTextOff);
|
||||
int dimensionPixelSize = obtainStyledAttributes2.getDimensionPixelSize(R$styleable.SwitchButton_kswTextThumbInset, 0);
|
||||
int dimensionPixelSize2 = obtainStyledAttributes2.getDimensionPixelSize(R$styleable.SwitchButton_kswTextExtra, 0);
|
||||
int dimensionPixelSize3 = obtainStyledAttributes2.getDimensionPixelSize(R$styleable.SwitchButton_kswTextAdjust, 0);
|
||||
obtainStyledAttributes2.recycle();
|
||||
i3 = dimensionPixelSize3;
|
||||
f9 = dimension7;
|
||||
f8 = dimension6;
|
||||
f7 = f12;
|
||||
i5 = integer;
|
||||
drawable = drawable3;
|
||||
z = z3;
|
||||
i4 = color;
|
||||
str2 = string2;
|
||||
str = string;
|
||||
f = dimension5;
|
||||
f5 = dimension2;
|
||||
f3 = dimension4;
|
||||
i = dimensionPixelSize;
|
||||
f6 = dimension3;
|
||||
i2 = dimensionPixelSize2;
|
||||
} else {
|
||||
str = null;
|
||||
str2 = null;
|
||||
i = 0;
|
||||
i2 = 0;
|
||||
i3 = 0;
|
||||
i4 = 0;
|
||||
f = 0.0f;
|
||||
f2 = 0.0f;
|
||||
drawable = null;
|
||||
colorStateList = null;
|
||||
drawable2 = null;
|
||||
colorStateList2 = null;
|
||||
f3 = 0.0f;
|
||||
f4 = 0.0f;
|
||||
f5 = 0.0f;
|
||||
f6 = 0.0f;
|
||||
f7 = 1.8f;
|
||||
f8 = -1.0f;
|
||||
f9 = -1.0f;
|
||||
i5 = ItemTouchHelper.Callback.DEFAULT_SWIPE_ANIMATION_DURATION;
|
||||
z = true;
|
||||
}
|
||||
float f13 = f3;
|
||||
if (attributeSet == null) {
|
||||
f10 = f4;
|
||||
obtainStyledAttributes = null;
|
||||
} else {
|
||||
f10 = f4;
|
||||
obtainStyledAttributes = getContext().obtainStyledAttributes(attributeSet, new int[]{R.attr.focusable, R.attr.clickable});
|
||||
}
|
||||
if (obtainStyledAttributes != null) {
|
||||
colorStateList3 = colorStateList;
|
||||
boolean z4 = obtainStyledAttributes.getBoolean(0, true);
|
||||
boolean z5 = obtainStyledAttributes.getBoolean(1, z4);
|
||||
setFocusable(z4);
|
||||
setClickable(z5);
|
||||
obtainStyledAttributes.recycle();
|
||||
} else {
|
||||
colorStateList3 = colorStateList;
|
||||
setFocusable(true);
|
||||
setClickable(true);
|
||||
}
|
||||
this.P = str;
|
||||
this.Q = str2;
|
||||
this.W = i;
|
||||
this.a0 = i2;
|
||||
this.b0 = i3;
|
||||
this.a = drawable2;
|
||||
this.d = colorStateList2;
|
||||
this.D = this.a != null;
|
||||
this.k = i4;
|
||||
if (this.k == 0) {
|
||||
TypedValue typedValue = new TypedValue();
|
||||
z2 = true;
|
||||
if (getContext().getTheme().resolveAttribute(R$attr.colorAccent, typedValue, true)) {
|
||||
this.k = typedValue.data;
|
||||
} else {
|
||||
this.k = 3309506;
|
||||
}
|
||||
} else {
|
||||
z2 = true;
|
||||
}
|
||||
if (!this.D && this.d == null) {
|
||||
this.d = ColorUtils.b(this.k);
|
||||
this.p = this.d.getDefaultColor();
|
||||
}
|
||||
this.l = a(f);
|
||||
this.m = a(f2);
|
||||
this.b = drawable;
|
||||
this.c = colorStateList3;
|
||||
if (this.b == null) {
|
||||
z2 = false;
|
||||
}
|
||||
this.E = z2;
|
||||
if (!this.E && this.c == null) {
|
||||
this.c = ColorUtils.a(this.k);
|
||||
this.q = this.c.getDefaultColor();
|
||||
this.r = this.c.getColorForState(g0, this.q);
|
||||
}
|
||||
this.g.set(f5, f6, f10, f13);
|
||||
float f14 = f7;
|
||||
if (this.g.width() >= 0.0f) {
|
||||
f14 = Math.max(f14, 1.0f);
|
||||
}
|
||||
this.h = f14;
|
||||
this.e = f8;
|
||||
this.f = f9;
|
||||
this.i = i5;
|
||||
this.j = z;
|
||||
this.G.setDuration(this.i);
|
||||
if (isChecked()) {
|
||||
setProgress(1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
private int b(int i) {
|
||||
int size = View.MeasureSpec.getSize(i);
|
||||
int mode = View.MeasureSpec.getMode(i);
|
||||
if (this.l == 0 && this.D) {
|
||||
this.l = this.a.getIntrinsicWidth();
|
||||
}
|
||||
int a = a(this.U);
|
||||
if (this.h == 0.0f) {
|
||||
this.h = 1.8f;
|
||||
}
|
||||
if (mode != 1073741824) {
|
||||
if (this.l == 0) {
|
||||
this.l = a(getResources().getDisplayMetrics().density * 20.0f);
|
||||
}
|
||||
if (this.h == 0.0f) {
|
||||
this.h = 1.8f;
|
||||
}
|
||||
int a2 = a(this.l * this.h);
|
||||
float f = a + this.a0;
|
||||
float f2 = a2 - this.l;
|
||||
RectF rectF = this.g;
|
||||
int a3 = a(f - ((f2 + Math.max(rectF.left, rectF.right)) + this.W));
|
||||
float f3 = a2;
|
||||
RectF rectF2 = this.g;
|
||||
this.n = a(rectF2.left + f3 + rectF2.right + Math.max(0, a3));
|
||||
if (this.n >= 0) {
|
||||
int a4 = a(f3 + Math.max(0.0f, this.g.left) + Math.max(0.0f, this.g.right) + Math.max(0, a3));
|
||||
return Math.max(a4, getPaddingLeft() + a4 + getPaddingRight());
|
||||
}
|
||||
this.l = 0;
|
||||
this.n = 0;
|
||||
return size;
|
||||
}
|
||||
int paddingLeft = (size - getPaddingLeft()) - getPaddingRight();
|
||||
if (this.l != 0) {
|
||||
int a5 = a(r2 * this.h);
|
||||
int i2 = this.a0 + a;
|
||||
int i3 = a5 - this.l;
|
||||
RectF rectF3 = this.g;
|
||||
int a6 = i2 - (i3 + a(Math.max(rectF3.left, rectF3.right)));
|
||||
float f4 = a5;
|
||||
RectF rectF4 = this.g;
|
||||
this.n = a(rectF4.left + f4 + rectF4.right + Math.max(a6, 0));
|
||||
if (this.n < 0) {
|
||||
this.l = 0;
|
||||
}
|
||||
if (f4 + Math.max(this.g.left, 0.0f) + Math.max(this.g.right, 0.0f) + Math.max(a6, 0) > paddingLeft) {
|
||||
this.l = 0;
|
||||
}
|
||||
}
|
||||
if (this.l != 0) {
|
||||
return size;
|
||||
}
|
||||
int a7 = a((((size - getPaddingLeft()) - getPaddingRight()) - Math.max(this.g.left, 0.0f)) - Math.max(this.g.right, 0.0f));
|
||||
if (a7 < 0) {
|
||||
this.l = 0;
|
||||
this.n = 0;
|
||||
return size;
|
||||
}
|
||||
float f5 = a7;
|
||||
this.l = a(f5 / this.h);
|
||||
RectF rectF5 = this.g;
|
||||
this.n = a(f5 + rectF5.left + rectF5.right);
|
||||
if (this.n < 0) {
|
||||
this.l = 0;
|
||||
this.n = 0;
|
||||
return size;
|
||||
}
|
||||
int i4 = a + this.a0;
|
||||
int i5 = a7 - this.l;
|
||||
RectF rectF6 = this.g;
|
||||
int a8 = i4 - (i5 + a(Math.max(rectF6.left, rectF6.right)));
|
||||
if (a8 > 0) {
|
||||
this.l -= a8;
|
||||
}
|
||||
if (this.l >= 0) {
|
||||
return size;
|
||||
}
|
||||
this.l = 0;
|
||||
this.n = 0;
|
||||
return size;
|
||||
}
|
||||
|
||||
private float getProgress() {
|
||||
return this.H;
|
||||
}
|
||||
|
||||
private boolean getStatusBasedOnPos() {
|
||||
return getProgress() > 0.5f;
|
||||
}
|
||||
|
||||
private void setDrawableState(Drawable drawable) {
|
||||
if (drawable != null) {
|
||||
drawable.setState(getDrawableState());
|
||||
invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
private void setProgress(float f) {
|
||||
if (f > 1.0f) {
|
||||
f = 1.0f;
|
||||
} else if (f < 0.0f) {
|
||||
f = 0.0f;
|
||||
}
|
||||
this.H = f;
|
||||
invalidate();
|
||||
}
|
||||
|
||||
@Override // android.widget.CompoundButton, android.widget.TextView, android.view.View
|
||||
protected void drawableStateChanged() {
|
||||
ColorStateList colorStateList;
|
||||
ColorStateList colorStateList2;
|
||||
super.drawableStateChanged();
|
||||
if (this.D || (colorStateList2 = this.d) == null) {
|
||||
setDrawableState(this.a);
|
||||
} else {
|
||||
this.p = colorStateList2.getColorForState(getDrawableState(), this.p);
|
||||
}
|
||||
int[] iArr = isChecked() ? h0 : g0;
|
||||
ColorStateList textColors = getTextColors();
|
||||
if (textColors != null) {
|
||||
int defaultColor = textColors.getDefaultColor();
|
||||
this.s = textColors.getColorForState(g0, defaultColor);
|
||||
this.t = textColors.getColorForState(h0, defaultColor);
|
||||
}
|
||||
if (!this.E && (colorStateList = this.c) != null) {
|
||||
this.q = colorStateList.getColorForState(getDrawableState(), this.q);
|
||||
this.r = this.c.getColorForState(iArr, this.q);
|
||||
return;
|
||||
}
|
||||
Drawable drawable = this.b;
|
||||
if ((drawable instanceof StateListDrawable) && this.j) {
|
||||
drawable.setState(iArr);
|
||||
this.v = this.b.getCurrent().mutate();
|
||||
} else {
|
||||
this.v = null;
|
||||
}
|
||||
setDrawableState(this.b);
|
||||
Drawable drawable2 = this.b;
|
||||
if (drawable2 != null) {
|
||||
this.u = drawable2.getCurrent().mutate();
|
||||
}
|
||||
}
|
||||
|
||||
public long getAnimationDuration() {
|
||||
return this.i;
|
||||
}
|
||||
|
||||
public ColorStateList getBackColor() {
|
||||
return this.c;
|
||||
}
|
||||
|
||||
public Drawable getBackDrawable() {
|
||||
return this.b;
|
||||
}
|
||||
|
||||
public float getBackRadius() {
|
||||
return this.f;
|
||||
}
|
||||
|
||||
public PointF getBackSizeF() {
|
||||
return new PointF(this.y.width(), this.y.height());
|
||||
}
|
||||
|
||||
public CharSequence getTextOff() {
|
||||
return this.Q;
|
||||
}
|
||||
|
||||
public CharSequence getTextOn() {
|
||||
return this.P;
|
||||
}
|
||||
|
||||
public ColorStateList getThumbColor() {
|
||||
return this.d;
|
||||
}
|
||||
|
||||
public Drawable getThumbDrawable() {
|
||||
return this.a;
|
||||
}
|
||||
|
||||
public float getThumbHeight() {
|
||||
return this.m;
|
||||
}
|
||||
|
||||
public RectF getThumbMargin() {
|
||||
return this.g;
|
||||
}
|
||||
|
||||
public float getThumbRadius() {
|
||||
return this.e;
|
||||
}
|
||||
|
||||
public float getThumbRangeRatio() {
|
||||
return this.h;
|
||||
}
|
||||
|
||||
public float getThumbWidth() {
|
||||
return this.l;
|
||||
}
|
||||
|
||||
public int getTintColor() {
|
||||
return this.k;
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:38:0x012e */
|
||||
/* JADX WARN: Removed duplicated region for block: B:40:0x0131 */
|
||||
@Override // android.widget.CompoundButton, android.widget.TextView, android.view.View
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
protected void onDraw(android.graphics.Canvas r14) {
|
||||
/*
|
||||
Method dump skipped, instructions count: 525
|
||||
To view this dump change 'Code comments level' option to 'DEBUG'
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.kyleduo.switchbutton.SwitchButton.onDraw(android.graphics.Canvas):void");
|
||||
}
|
||||
|
||||
@Override // android.widget.TextView, android.view.View
|
||||
protected void onMeasure(int i, int i2) {
|
||||
if (this.S == null && !TextUtils.isEmpty(this.P)) {
|
||||
this.S = a(this.P);
|
||||
}
|
||||
if (this.T == null && !TextUtils.isEmpty(this.Q)) {
|
||||
this.T = a(this.Q);
|
||||
}
|
||||
float width = this.S != null ? r0.getWidth() : 0.0f;
|
||||
float width2 = this.T != null ? r2.getWidth() : 0.0f;
|
||||
if (width == 0.0f && width2 == 0.0f) {
|
||||
this.U = 0.0f;
|
||||
} else {
|
||||
this.U = Math.max(width, width2);
|
||||
}
|
||||
float height = this.S != null ? r0.getHeight() : 0.0f;
|
||||
float height2 = this.T != null ? r2.getHeight() : 0.0f;
|
||||
if (height == 0.0f && height2 == 0.0f) {
|
||||
this.V = 0.0f;
|
||||
} else {
|
||||
this.V = Math.max(height, height2);
|
||||
}
|
||||
setMeasuredDimension(b(i), a(i2));
|
||||
}
|
||||
|
||||
@Override // android.widget.CompoundButton, android.widget.TextView, android.view.View
|
||||
public void onRestoreInstanceState(Parcelable parcelable) {
|
||||
SavedState savedState = (SavedState) parcelable;
|
||||
a(savedState.onText, savedState.offText);
|
||||
this.c0 = true;
|
||||
super.onRestoreInstanceState(savedState.getSuperState());
|
||||
this.c0 = false;
|
||||
}
|
||||
|
||||
@Override // android.widget.CompoundButton, android.widget.TextView, android.view.View
|
||||
public Parcelable onSaveInstanceState() {
|
||||
SavedState savedState = new SavedState(super.onSaveInstanceState());
|
||||
savedState.onText = this.P;
|
||||
savedState.offText = this.Q;
|
||||
return savedState;
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
protected void onSizeChanged(int i, int i2, int i3, int i4) {
|
||||
super.onSizeChanged(i, i2, i3, i4);
|
||||
if (i == i3 && i2 == i4) {
|
||||
return;
|
||||
}
|
||||
b();
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:15:0x0034, code lost:
|
||||
|
||||
if (r0 != 3) goto L47;
|
||||
*/
|
||||
@Override // android.widget.TextView, android.view.View
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
public boolean onTouchEvent(android.view.MotionEvent r10) {
|
||||
/*
|
||||
Method dump skipped, instructions count: 234
|
||||
To view this dump change 'Code comments level' option to 'DEBUG'
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.kyleduo.switchbutton.SwitchButton.onTouchEvent(android.view.MotionEvent):boolean");
|
||||
}
|
||||
|
||||
@Override // android.widget.CompoundButton, android.view.View
|
||||
public boolean performClick() {
|
||||
return super.performClick();
|
||||
}
|
||||
|
||||
public void setAnimationDuration(long j) {
|
||||
this.i = j;
|
||||
}
|
||||
|
||||
public void setBackColor(ColorStateList colorStateList) {
|
||||
this.c = colorStateList;
|
||||
if (this.c != null) {
|
||||
setBackDrawable(null);
|
||||
}
|
||||
invalidate();
|
||||
}
|
||||
|
||||
public void setBackColorRes(int i) {
|
||||
setBackColor(ContextCompat.b(getContext(), i));
|
||||
}
|
||||
|
||||
public void setBackDrawable(Drawable drawable) {
|
||||
this.b = drawable;
|
||||
this.E = this.b != null;
|
||||
refreshDrawableState();
|
||||
this.d0 = false;
|
||||
requestLayout();
|
||||
invalidate();
|
||||
}
|
||||
|
||||
public void setBackDrawableRes(int i) {
|
||||
setBackDrawable(ContextCompat.c(getContext(), i));
|
||||
}
|
||||
|
||||
public void setBackRadius(float f) {
|
||||
this.f = f;
|
||||
if (this.E) {
|
||||
return;
|
||||
}
|
||||
invalidate();
|
||||
}
|
||||
|
||||
@Override // android.widget.CompoundButton, android.widget.Checkable
|
||||
public void setChecked(boolean z) {
|
||||
if (isChecked() != z) {
|
||||
a(z);
|
||||
}
|
||||
if (this.c0) {
|
||||
setCheckedImmediatelyNoEvent(z);
|
||||
} else {
|
||||
super.setChecked(z);
|
||||
}
|
||||
}
|
||||
|
||||
public void setCheckedImmediately(boolean z) {
|
||||
super.setChecked(z);
|
||||
ObjectAnimator objectAnimator = this.G;
|
||||
if (objectAnimator != null && objectAnimator.isRunning()) {
|
||||
this.G.cancel();
|
||||
}
|
||||
setProgress(z ? 1.0f : 0.0f);
|
||||
invalidate();
|
||||
}
|
||||
|
||||
public void setCheckedImmediatelyNoEvent(boolean z) {
|
||||
if (this.f0 == null) {
|
||||
setCheckedImmediately(z);
|
||||
return;
|
||||
}
|
||||
super.setOnCheckedChangeListener(null);
|
||||
setCheckedImmediately(z);
|
||||
super.setOnCheckedChangeListener(this.f0);
|
||||
}
|
||||
|
||||
public void setCheckedNoEvent(boolean z) {
|
||||
if (this.f0 == null) {
|
||||
setChecked(z);
|
||||
return;
|
||||
}
|
||||
super.setOnCheckedChangeListener(null);
|
||||
setChecked(z);
|
||||
super.setOnCheckedChangeListener(this.f0);
|
||||
}
|
||||
|
||||
public void setDrawDebugRect(boolean z) {
|
||||
this.F = z;
|
||||
invalidate();
|
||||
}
|
||||
|
||||
public void setFadeBack(boolean z) {
|
||||
this.j = z;
|
||||
}
|
||||
|
||||
@Override // android.widget.CompoundButton
|
||||
public void setOnCheckedChangeListener(CompoundButton.OnCheckedChangeListener onCheckedChangeListener) {
|
||||
super.setOnCheckedChangeListener(onCheckedChangeListener);
|
||||
this.f0 = onCheckedChangeListener;
|
||||
}
|
||||
|
||||
public void setTextAdjust(int i) {
|
||||
this.b0 = i;
|
||||
this.d0 = false;
|
||||
requestLayout();
|
||||
invalidate();
|
||||
}
|
||||
|
||||
public void setTextExtra(int i) {
|
||||
this.a0 = i;
|
||||
this.d0 = false;
|
||||
requestLayout();
|
||||
invalidate();
|
||||
}
|
||||
|
||||
public void setTextThumbInset(int i) {
|
||||
this.W = i;
|
||||
this.d0 = false;
|
||||
requestLayout();
|
||||
invalidate();
|
||||
}
|
||||
|
||||
public void setThumbColor(ColorStateList colorStateList) {
|
||||
this.d = colorStateList;
|
||||
if (this.d != null) {
|
||||
setThumbDrawable(null);
|
||||
}
|
||||
invalidate();
|
||||
}
|
||||
|
||||
public void setThumbColorRes(int i) {
|
||||
setThumbColor(ContextCompat.b(getContext(), i));
|
||||
}
|
||||
|
||||
public void setThumbDrawable(Drawable drawable) {
|
||||
this.a = drawable;
|
||||
this.D = this.a != null;
|
||||
refreshDrawableState();
|
||||
this.d0 = false;
|
||||
requestLayout();
|
||||
invalidate();
|
||||
}
|
||||
|
||||
public void setThumbDrawableRes(int i) {
|
||||
setThumbDrawable(ContextCompat.c(getContext(), i));
|
||||
}
|
||||
|
||||
public void setThumbMargin(RectF rectF) {
|
||||
if (rectF == null) {
|
||||
a(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
} else {
|
||||
a(rectF.left, rectF.top, rectF.right, rectF.bottom);
|
||||
}
|
||||
}
|
||||
|
||||
public void setThumbRadius(float f) {
|
||||
this.e = f;
|
||||
if (this.D) {
|
||||
return;
|
||||
}
|
||||
invalidate();
|
||||
}
|
||||
|
||||
public void setThumbRangeRatio(float f) {
|
||||
this.h = f;
|
||||
this.d0 = false;
|
||||
requestLayout();
|
||||
}
|
||||
|
||||
public void setTintColor(int i) {
|
||||
this.k = i;
|
||||
this.d = ColorUtils.b(this.k);
|
||||
this.c = ColorUtils.a(this.k);
|
||||
this.E = false;
|
||||
this.D = false;
|
||||
refreshDrawableState();
|
||||
invalidate();
|
||||
}
|
||||
|
||||
public SwitchButton(Context context, AttributeSet attributeSet) {
|
||||
super(context, attributeSet);
|
||||
this.F = false;
|
||||
this.c0 = false;
|
||||
this.d0 = false;
|
||||
this.e0 = false;
|
||||
a(attributeSet);
|
||||
}
|
||||
|
||||
public SwitchButton(Context context) {
|
||||
super(context);
|
||||
this.F = false;
|
||||
this.c0 = false;
|
||||
this.d0 = false;
|
||||
this.e0 = false;
|
||||
a((AttributeSet) null);
|
||||
}
|
||||
|
||||
private void b() {
|
||||
int i;
|
||||
float paddingTop;
|
||||
float paddingLeft;
|
||||
if (this.l == 0 || (i = this.m) == 0 || this.n == 0 || this.o == 0) {
|
||||
return;
|
||||
}
|
||||
if (this.e == -1.0f) {
|
||||
this.e = Math.min(r0, i) / 2;
|
||||
}
|
||||
if (this.f == -1.0f) {
|
||||
this.f = Math.min(this.n, this.o) / 2;
|
||||
}
|
||||
int measuredWidth = (getMeasuredWidth() - getPaddingLeft()) - getPaddingRight();
|
||||
int measuredHeight = (getMeasuredHeight() - getPaddingTop()) - getPaddingBottom();
|
||||
int a = a((this.n - Math.min(0.0f, this.g.left)) - Math.min(0.0f, this.g.right));
|
||||
if (measuredHeight <= a((this.o - Math.min(0.0f, this.g.top)) - Math.min(0.0f, this.g.bottom))) {
|
||||
paddingTop = getPaddingTop() + Math.max(0.0f, this.g.top);
|
||||
} else {
|
||||
paddingTop = (((measuredHeight - r3) + 1) / 2) + getPaddingTop() + Math.max(0.0f, this.g.top);
|
||||
}
|
||||
if (measuredWidth <= this.n) {
|
||||
paddingLeft = getPaddingLeft() + Math.max(0.0f, this.g.left);
|
||||
} else {
|
||||
paddingLeft = (((measuredWidth - a) + 1) / 2) + getPaddingLeft() + Math.max(0.0f, this.g.left);
|
||||
}
|
||||
this.x.set(paddingLeft, paddingTop, this.l + paddingLeft, this.m + paddingTop);
|
||||
RectF rectF = this.x;
|
||||
float f = rectF.left;
|
||||
RectF rectF2 = this.g;
|
||||
float f2 = f - rectF2.left;
|
||||
RectF rectF3 = this.y;
|
||||
float f3 = rectF.top;
|
||||
float f4 = rectF2.top;
|
||||
rectF3.set(f2, f3 - f4, this.n + f2, (f3 - f4) + this.o);
|
||||
RectF rectF4 = this.z;
|
||||
RectF rectF5 = this.x;
|
||||
rectF4.set(rectF5.left, 0.0f, (this.y.right - this.g.right) - rectF5.width(), 0.0f);
|
||||
this.f = Math.min(Math.min(this.y.width(), this.y.height()) / 2.0f, this.f);
|
||||
Drawable drawable = this.b;
|
||||
if (drawable != null) {
|
||||
RectF rectF6 = this.y;
|
||||
drawable.setBounds((int) rectF6.left, (int) rectF6.top, a(rectF6.right), a(this.y.bottom));
|
||||
}
|
||||
if (this.S != null) {
|
||||
RectF rectF7 = this.y;
|
||||
float width = (rectF7.left + (((((rectF7.width() + this.W) - this.l) - this.g.right) - this.S.getWidth()) / 2.0f)) - this.b0;
|
||||
RectF rectF8 = this.y;
|
||||
float height = rectF8.top + ((rectF8.height() - this.S.getHeight()) / 2.0f);
|
||||
this.A.set(width, height, this.S.getWidth() + width, this.S.getHeight() + height);
|
||||
}
|
||||
if (this.T != null) {
|
||||
RectF rectF9 = this.y;
|
||||
float width2 = ((rectF9.right - (((((rectF9.width() + this.W) - this.l) - this.g.left) - this.T.getWidth()) / 2.0f)) - this.T.getWidth()) + this.b0;
|
||||
RectF rectF10 = this.y;
|
||||
float height2 = rectF10.top + ((rectF10.height() - this.T.getHeight()) / 2.0f);
|
||||
this.B.set(width2, height2, this.T.getWidth() + width2, this.T.getHeight() + height2);
|
||||
}
|
||||
this.d0 = true;
|
||||
}
|
||||
|
||||
private Layout a(CharSequence charSequence) {
|
||||
return new StaticLayout(charSequence, this.R, (int) Math.ceil(Layout.getDesiredWidth(charSequence, r2)), Layout.Alignment.ALIGN_CENTER, 1.0f, 0.0f, false);
|
||||
}
|
||||
|
||||
private int a(int i) {
|
||||
int size = View.MeasureSpec.getSize(i);
|
||||
int mode = View.MeasureSpec.getMode(i);
|
||||
if (this.m == 0 && this.D) {
|
||||
this.m = this.a.getIntrinsicHeight();
|
||||
}
|
||||
if (mode == 1073741824) {
|
||||
if (this.m != 0) {
|
||||
RectF rectF = this.g;
|
||||
this.o = a(r6 + rectF.top + rectF.bottom);
|
||||
this.o = a(Math.max(this.o, this.V));
|
||||
if ((((this.o + getPaddingTop()) + getPaddingBottom()) - Math.min(0.0f, this.g.top)) - Math.min(0.0f, this.g.bottom) > size) {
|
||||
this.m = 0;
|
||||
}
|
||||
}
|
||||
if (this.m == 0) {
|
||||
this.o = a(((size - getPaddingTop()) - getPaddingBottom()) + Math.min(0.0f, this.g.top) + Math.min(0.0f, this.g.bottom));
|
||||
if (this.o < 0) {
|
||||
this.o = 0;
|
||||
this.m = 0;
|
||||
return size;
|
||||
}
|
||||
RectF rectF2 = this.g;
|
||||
this.m = a((r6 - rectF2.top) - rectF2.bottom);
|
||||
}
|
||||
if (this.m >= 0) {
|
||||
return size;
|
||||
}
|
||||
this.o = 0;
|
||||
this.m = 0;
|
||||
return size;
|
||||
}
|
||||
if (this.m == 0) {
|
||||
this.m = a(getResources().getDisplayMetrics().density * 20.0f);
|
||||
}
|
||||
float f = this.m;
|
||||
RectF rectF3 = this.g;
|
||||
this.o = a(f + rectF3.top + rectF3.bottom);
|
||||
if (this.o < 0) {
|
||||
this.o = 0;
|
||||
this.m = 0;
|
||||
return size;
|
||||
}
|
||||
int a = a(this.V - r6);
|
||||
if (a > 0) {
|
||||
this.o += a;
|
||||
this.m += a;
|
||||
}
|
||||
int max = Math.max(this.m, this.o);
|
||||
return Math.max(Math.max(max, getPaddingTop() + max + getPaddingBottom()), getSuggestedMinimumHeight());
|
||||
}
|
||||
|
||||
private int a(double d) {
|
||||
return (int) Math.ceil(d);
|
||||
}
|
||||
|
||||
protected void a(boolean z) {
|
||||
ObjectAnimator objectAnimator = this.G;
|
||||
if (objectAnimator == null) {
|
||||
return;
|
||||
}
|
||||
if (objectAnimator.isRunning()) {
|
||||
this.G.cancel();
|
||||
}
|
||||
this.G.setDuration(this.i);
|
||||
if (z) {
|
||||
this.G.setFloatValues(this.H, 1.0f);
|
||||
} else {
|
||||
this.G.setFloatValues(this.H, 0.0f);
|
||||
}
|
||||
this.G.start();
|
||||
}
|
||||
|
||||
private void a() {
|
||||
ViewParent parent = getParent();
|
||||
if (parent != null) {
|
||||
parent.requestDisallowInterceptTouchEvent(true);
|
||||
}
|
||||
this.e0 = true;
|
||||
}
|
||||
|
||||
public void a(float f, float f2, float f3, float f4) {
|
||||
this.g.set(f, f2, f3, f4);
|
||||
this.d0 = false;
|
||||
requestLayout();
|
||||
}
|
||||
|
||||
public void a(CharSequence charSequence, CharSequence charSequence2) {
|
||||
this.P = charSequence;
|
||||
this.Q = charSequence2;
|
||||
this.S = null;
|
||||
this.T = null;
|
||||
this.d0 = false;
|
||||
requestLayout();
|
||||
invalidate();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user