/** * Sets the drawable for the wheel foreground * @param resource */ public void setWheelForeground(int resource) { wheelForeground = resource; centerDrawable = getContext().getResources().getDrawable(wheelForeground); }
/** * Creates item layouts if necessary */ private void createItemsLayout() { if (itemsLayout == null) { itemsLayout = new LinearLayout(getContext()); itemsLayout.setOrientation(LinearLayout.VERTICAL); } }
/** * Sets the drawable for the wheel foreground * @param resource */ public void setWheelForeground(int resource) { wheelForeground = resource; centerDrawable = getContext().getResources().getDrawable(wheelForeground); }
/** * Creates item layouts if necessary */ private void createItemsLayout() { if (itemsLayout == null) { itemsLayout = new LinearLayout(getContext()); itemsLayout.setOrientation(LinearLayout.VERTICAL); } }
/** * Initializes class data * @param context the context */ private void initData(Context context) { scroller = new WheelScroller(getContext(), scrollingListener); }
/** * Initializes class data * * @param context * the context */ private void initData(Context context) { scroller = new WheelScroller(getContext(), scrollingListener); }
/** * Initializes resources */ private void initResourcesIfNecessary() { if (centerDrawable == null) { centerDrawable = getContext().getResources().getDrawable(wheelForeground); } if (topShadow == null) { topShadow = new GradientDrawable(Orientation.TOP_BOTTOM, SHADOWS_COLORS); } if (bottomShadow == null) { bottomShadow = new GradientDrawable(Orientation.BOTTOM_TOP, SHADOWS_COLORS); } setBackgroundResource(wheelBackground); }
/** * Initializes resources */ private void initResourcesIfNecessary() { if (centerDrawable == null) { centerDrawable = getContext().getResources().getDrawable(wheelForeground); } if (topShadow == null) { topShadow = new GradientDrawable(Orientation.TOP_BOTTOM, SHADOWS_COLORS); } if (bottomShadow == null) { bottomShadow = new GradientDrawable(Orientation.BOTTOM_TOP, SHADOWS_COLORS); } setBackgroundResource(wheelBackground); }