Home | History | Annotate | Download | only in widget

Lines Matching defs:drawables

342     static class Drawables {
377 public Drawables(Context context) {
385 // First reset "left" and "right" drawables to their initial values
386 mShowing[Drawables.LEFT] = mDrawableLeftInitial;
387 mShowing[Drawables.RIGHT] = mDrawableRightInitial;
391 if (mDrawableStart != null && mShowing[Drawables.LEFT] == null) {
392 mShowing[Drawables.LEFT] = mDrawableStart;
397 if (mDrawableEnd != null && mShowing[Drawables.RIGHT] == null) {
398 mShowing[Drawables.RIGHT] = mDrawableEnd;
403 // JB-MR1+ normal case: "start" / "end" drawables are overriding "left" / "right"
408 mShowing[Drawables.RIGHT] = mDrawableStart;
412 mShowing[Drawables.LEFT] = mDrawableEnd;
421 mShowing[Drawables.LEFT] = mDrawableStart;
425 mShowing[Drawables.RIGHT] = mDrawableEnd;
468 mShowing[Drawables.LEFT] = mDrawableTemp;
473 mShowing[Drawables.RIGHT] = mDrawableTemp;
486 mDrawableTemp = mShowing[Drawables.LEFT];
490 mShowing[Drawables.LEFT] = mDrawableError;
498 mDrawableTemp = mShowing[Drawables.RIGHT];
502 mShowing[Drawables.RIGHT] = mDrawableError;
511 Drawables mDrawables;
1309 // Set up the tint (if needed) before setting the drawables so that it
1313 mDrawables = new Drawables(context);
1325 // This call will save the initial left/right drawables
1513 Drawables dr = mDrawables;
1515 mDrawables = dr = new Drawables(getContext());
1895 final Drawables dr = mDrawables;
1896 if (dr == null || dr.mShowing[Drawables.TOP] == null) {
1908 final Drawables dr = mDrawables;
1909 if (dr == null || dr.mShowing[Drawables.BOTTOM] == null) {
1921 final Drawables dr = mDrawables;
1922 if (dr == null || dr.mShowing[Drawables.LEFT] == null) {
1934 final Drawables dr = mDrawables;
1935 if (dr == null || dr.mShowing[Drawables.RIGHT] == null) {
2097 * Sets the Drawables (if any) to appear to the left of, above, to the
2099 * Drawable there. The Drawables must already have had
2102 * Calling this method will overwrite any Drawables previously set using
2112 Drawables dr = mDrawables;
2124 final boolean drawables = left != null || top != null || right != null || bottom != null;
2125 if (!drawables) {
2126 // Clearing drawables... can we free the data structure?
2147 mDrawables = dr = new Drawables(getContext());
2152 if (dr.mShowing[Drawables.LEFT] != left && dr.mShowing[Drawables.LEFT] != null) {
2153 dr.mShowing[Drawables.LEFT].setCallback(null);
2155 dr.mShowing[Drawables.LEFT] = left;
2157 if (dr.mShowing[Drawables.TOP] != top && dr.mShowing[Drawables.TOP] != null) {
2158 dr.mShowing[Drawables.TOP].setCallback(null);
2160 dr.mShowing[Drawables.TOP] = top;
2162 if (dr.mShowing[Drawables.RIGHT] != right && dr.mShowing[Drawables.RIGHT] != null) {
2163 dr.mShowing[Drawables.RIGHT].setCallback(null);
2165 dr.mShowing[Drawables.RIGHT] = right;
2167 if (dr.mShowing[Drawables.BOTTOM] != bottom && dr.mShowing[Drawables.BOTTOM] != null) {
2168 dr.mShowing[Drawables.BOTTOM].setCallback(null);
2170 dr.mShowing[Drawables.BOTTOM] = bottom;
2218 // Save initial left/right drawables
2232 * Sets the Drawables (if any) to appear to the left of, above, to the
2234 * The Drawables' bounds will be set to their intrinsic bounds.
2236 * Calling this method will overwrite any Drawables previously set using
2260 * Sets the Drawables (if any) to appear to the left of, above, to the
2262 * Drawable there. The Drawables' bounds will be set to their intrinsic
2265 * Calling this method will overwrite any Drawables previously set using
2293 * Sets the Drawables (if any) to appear to the start of, above, to the end
2295 * there. The Drawables must already have had {@link Drawable#setBounds}
2298 * Calling this method will overwrite any Drawables previously set using
2309 Drawables dr = mDrawables;
2313 if (dr.mShowing[Drawables.LEFT] != null) {
2314 dr.mShowing[Drawables.LEFT].setCallback(null);
2316 dr.mShowing[Drawables.LEFT] = dr.mDrawableLeftInitial = null;
2317 if (dr.mShowing[Drawables.RIGHT] != null) {
2318 dr.mShowing[Drawables.RIGHT].setCallback(null);
2320 dr.mShowing[Drawables.RIGHT] = dr.mDrawableRightInitial = null;
2325 final boolean drawables = start != null || top != null
2328 if (!drawables) {
2329 // Clearing drawables... can we free the data structure?
2338 if (dr.mShowing[Drawables.TOP] != null) {
2339 dr.mShowing[Drawables.TOP].setCallback(null);
2341 dr.mShowing[Drawables.TOP] = null;
2346 if (dr.mShowing[Drawables.BOTTOM] != null) {
2347 dr.mShowing[Drawables.BOTTOM].setCallback(null);
2349 dr.mShowing[Drawables.BOTTOM] = null;
2358 mDrawables = dr = new Drawables(getContext());
2368 if (dr.mShowing[Drawables.TOP] != top && dr.mShowing[Drawables.TOP] != null) {
2369 dr.mShowing[Drawables.TOP].setCallback(null);
2371 dr.mShowing[Drawables.TOP] = top;
2378 if (dr.mShowing[Drawables.BOTTOM] != bottom && dr.mShowing[Drawables.BOTTOM] != null) {
2379 dr.mShowing[Drawables.BOTTOM].setCallback(null);
2381 dr.mShowing[Drawables.BOTTOM] = bottom;
2436 * Sets the Drawables (if any) to appear to the start of, above, to the end
2438 * Drawables' bounds will be set to their intrinsic bounds.
2440 * Calling this method will overwrite any Drawables previously set using
2465 * Sets the Drawables (if any) to appear to the start of, above, to the end
2467 * there. The Drawables' bounds will be set to their intrinsic bounds.
2469 * Calling this method will overwrite any Drawables previously set using
2497 * Returns drawables for the left, top, right, and bottom borders.
2506 final Drawables dr = mDrawables;
2515 * Returns drawables for the start, top, end, and bottom borders.
2524 final Drawables dr = mDrawables;
2527 dr.mDrawableStart, dr.mShowing[Drawables.TOP],
2528 dr.mDrawableEnd, dr.mShowing[Drawables.BOTTOM]
2536 * Sets the size of the padding between the compound drawables and
2543 Drawables dr = mDrawables;
2550 mDrawables = dr = new Drawables(getContext());
2560 * Returns the padding between the compound drawables and the text.
2565 final Drawables dr = mDrawables;
2570 * Applies a tint to the compound drawables. Does not modify the
2575 * and related methods will automatically mutate the drawables and apply
2587 mDrawables = new Drawables(getContext());
2596 * @return the tint applied to the compound drawables
2607 * drawables. The default mode is {@link PorterDuff.Mode#SRC_IN}.
2617 mDrawables = new Drawables(getContext());
2627 * drawables, if specified.
2630 * drawables
5364 final TextView.Drawables drawables = mDrawables;
5365 if (drawables != null) {
5366 if (drawable == drawables.mShowing[Drawables.LEFT]) {
5372 scrollY += compoundPaddingTop + (vspace - drawables.mDrawableHeightLeft) / 2;
5374 } else if (drawable == drawables.mShowing[Drawables.RIGHT]) {
5379 scrollX += (mRight - mLeft - mPaddingRight - drawables.mDrawableSizeRight);
5380 scrollY += compoundPaddingTop + (vspace - drawables.mDrawableHeightRight) / 2;
5382 } else if (drawable == drawables.mShowing[Drawables.TOP]) {
5387 scrollX += compoundPaddingLeft + (hspace - drawables.mDrawableWidthTop) / 2;
5390 } else if (drawable == drawables.mShowing[Drawables.BOTTOM]) {
5395 drawables.mDrawableWidthBottom) / 2;
5396 scrollY += (mBottom - mTop - mPaddingBottom - drawables.mDrawableSizeBottom);
5582 final Drawables dr = mDrawables;
5594 if (dr.mShowing[Drawables.LEFT] != null) {
5599 dr.mShowing[Drawables.LEFT].draw(canvas);
5605 if (dr.mShowing[Drawables.RIGHT] != null) {
5610 dr.mShowing[Drawables.RIGHT].draw(canvas);
5616 if (dr.mShowing[Drawables.TOP] != null) {
5620 dr.mShowing[Drawables.TOP].draw(canvas);
5626 if (dr.mShowing[Drawables.BOTTOM] != null) {
5631 dr.mShowing[Drawables.BOTTOM].draw(canvas);
6895 final Drawables dr = mDrawables;
7038 final Drawables dr = mDrawables;
9642 // Resolve drawables