private Drawable createSelectableDrawableWithPathFactory(PathFactory pathFactory) {
   return BackgroundDrawableFactory.createSelectableDrawable(
       new ButtonDrawable(
           pathFactory,
           skin.symbolMajorButtonSelectedTopColor,
           skin.symbolMajorButtonSelectedBottomColor,
           0),
       Optional.<Drawable>of(
           BackgroundDrawableFactory.createPressableDrawable(
               new ButtonDrawable(
                   pathFactory,
                   skin.symbolMajorButtonPressedTopColor,
                   skin.symbolMajorButtonPressedBottomColor,
                   0),
               Optional.<Drawable>of(
                   new ButtonDrawable(
                       pathFactory,
                       skin.symbolMajorButtonTopColor,
                       skin.symbolMajorButtonBottomColor,
                       skin.symbolMajorButtonShadowColor)))));
 }
Пример #2
0
 private static Drawable createButtonBackgroundDrawable(float density) {
   return BackgroundDrawableFactory.createPressableDrawable(
       new RoundRectKeyDrawable(
           (int) (NARROW_MODE_BUTTON_LEFT_OFFSET * density),
           (int) (NARROW_MODE_BUTTON_TOP_OFFSET * density),
           (int) (NARROW_MODE_BUTTON_RIGHT_OFFSET * density),
           (int) (NARROW_MODE_BUTTON_BOTTOM_OFFSET * density),
           (int) (NARROW_MODE_BUTTON_CORNOR_RADIUS * density),
           0xFFE9E4E4,
           0xFFB2ADAD,
           0,
           0xFF1E1E1E),
       new RoundRectKeyDrawable(
           (int) (NARROW_MODE_BUTTON_LEFT_OFFSET * density),
           (int) (NARROW_MODE_BUTTON_TOP_OFFSET * density),
           (int) (NARROW_MODE_BUTTON_RIGHT_OFFSET * density),
           (int) (NARROW_MODE_BUTTON_BOTTOM_OFFSET * density),
           (int) (NARROW_MODE_BUTTON_CORNOR_RADIUS * density),
           0xFF858087,
           0xFF67645F,
           0,
           0xFF1E1E1E));
 }