Lines Matching refs:asset
241 * a suitable drawable from an asset and a horizontal repeating tile, use
255 * Set the illustration of the layout, which will be created asset and the horizontal tile as
256 * suitable. On phone layouts (not sw600dp), the asset will be scaled, maintaining aspect ratio.
258 * illustration area that the asset doesn't fill will be covered by the horizontalTile.
260 * @param asset Resource ID of the illustration asset.
263 public void setIllustration(int asset, int horizontalTile) {
267 final Drawable illustrationDrawable = getIllustration(asset, horizontalTile);
272 private void setIllustration(Drawable asset, Drawable horizontalTile) {
276 final Drawable illustrationDrawable = getIllustration(asset, horizontalTile);
343 private Drawable getIllustration(int asset, int horizontalTile) {
345 final Drawable assetDrawable = context.getResources().getDrawable(asset);
351 private Drawable getIllustration(Drawable asset, Drawable horizontalTile) {
359 if (asset instanceof BitmapDrawable) {
361 ((BitmapDrawable) asset).setGravity(Gravity.TOP | Gravity.LEFT);
364 new LayerDrawable(new Drawable[] { horizontalTile, asset });
372 asset.setAutoMirrored(true);
374 return asset;