Posision A View (imageview) Programatically In Android
This problem might seem very basic but I couldn't find an answer to it. I need to place an imageView in a special position in the screen. Suppose, I need it to be three tenth from
Solution 1:
You can easily position one or more views in your screen, using LinearLayout and RelativeLayout, at any position you desire.
while using LinearLayout, use its properties like gravity and weight in corresponding xml to adjust your views.
while using RelativeLayout you can use align, margin and XXTo where XX maybe left, right, top, below of any existing views.
If did't got your answer please be specific where and how many views you want to place.
Solution 2:
It was like this:
AbsoluteLayout.LayoutParams lp=new AbsoluteLayout.LayoutParams(width,height,x,y);
myImageView.setLayoutParams(lp);
Post a Comment for "Posision A View (imageview) Programatically In Android"