Doesn't work, I have the view that now is 30x30 pixels, but on the top
left of the screen and my drawable gets cutted off.
--
Luca Bedogni
Freelance Web Developer
http://www.lucabedogni.it
On Tue, Mar 23, 2010 at 3:11 AM, murali raju manutd...@gmail.com wrote:
use h.setLayoutParams(new
Mmm, I investigated a bit and i think this is not the problem. I'm
making a new object every time.
Beside that, I noticed that the view added has the dimensions of the
screen, and not 30 pixels as I want. How can I avoid that?
Thanks
--
Luca Bedogni
Freelance Web Developer
use h.setLayoutParams(new ViewGroup.LayoutParams(
30,30));
On Mon, Mar 22, 2010 at 11:49 AM, Luca Bedogni bedogni.l...@gmail.comwrote:
Mmm, I investigated a bit and i think this is not the problem. I'm
making a new object every time.
Beside that, I noticed that the view
coz you are using the same view object to all the shapes. so only the most
recently created view will have listener. use an arraylist and add the view
to it when ever a shape is created.
and check which view is clicked by using view.isPressed().
On Sun, Mar 21, 2010 at 1:26 AM, Luca Bedogni
Hi
I have the following code:
int x = (int)Math.round(Math.random()*200);
int y = (int)Math.round(Math.random()*300);
View h = new CustomDrawableView(c,x,y);
h.setLayoutParams(new ViewGroup.LayoutParams(
5 matches
Mail list logo