Hi!

I am testing how to create a view dinamically, and to draw it in the
(infoWindowOffsetX, infoWindowOffsetY) position of the screen.

The problem I am having is that it always appears at the top left
corner of the screen (0,0).
I have also tested to change LayoutParams to both WRAP_CONTENT and
FILL_PARENT, but nothing happens...

  TextView v = new TextView (mActivity);
   v.setBackgroundResource(R.drawable.icon);
   v.setText(mSelectedMapLocation.getName());
   //v.setLayoutParams(new ViewGroup.LayoutParams
(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
   v.measure(View.MeasureSpec.UNSPECIFIED,
View.MeasureSpec.UNSPECIFIED);
   v.layout (infoWindowOffsetX, infoWindowOffsetY,
               infoWindowOffsetX+ v.getMeasuredWidth(),
infoWindowOffsetY+ v.getMeasuredHeight());
   v.draw (canvas);

Does somebody knows how to show the view in other position of the
screen?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to