android - Scaling and overlapping ImageViews -
i bit of android noob, , have been struggling problem far long.
what i'm aiming for: 2 imageviews
. first width of screen, , drawn match proportions of src image (so far easy). second imageview
needs scaled, width fixed multiple (between 0 , 1) of first image. need able touch-drag second smaller image around on top of first, fixed image, although part not point of question.
this done programmatically, src images , scale multiple not known until runtime.
what i've tried: can overlay 2 imageviews
in relativelayout
, using alignparenttop
, on. works fine, can't see how scale images in case.
i can alternatively scale 2 imageviews
using linearlayout
, setting layout_weights
1 , scale multiple respectively. in case can't images overlapping (not strictly true - have managed negative margins, hacky solution , make impossible implement movement of top image later).
so question is: there way fix either of 2 solutions have tried implement? or there perhaps better way approach problem? (i'm not looking answer in code, approach should take)
Comments
Post a Comment