// an imageview with scaling...
ImageView topIcon = new ImageView(ctx);
topIcon.setImageResource(R.drawable.stlogo);
topIcon.setAdjustViewBounds(true);
topIcon.setMaxHeight(TopIconMaxHeight);
topIcon.setMaxWidth(TopIconMaxWidth);
topIcon.setScaleType(ScaleType.FIT_CENTER);
topIcon.setAlpha(TopIconAlpha);
topIcon.setLayoutParams(
new LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT));
// clocks...
AnalogClock clock = new AnalogClock(ctx);
clock.setBackground(topIcon.getDrawable());
Full topic is here : http://developerlife.com/tutorials/?p=312
Комментариев нет:
Отправить комментарий