tonguetech / Android-StickerView

Apache License 2.0
123 stars 41 forks source link

Cant get the exact location of the textview within it's parent. #3

Open JoseMiralles opened 8 years ago

JoseMiralles commented 8 years ago

Is there anyway of finding the exact x,y coordinates of the stickerTextView.tvmain inside of it's parent? In my case, the parent is a RelativeLayout.

I am trying to use drawText() to draw the text at the same location and with the same rotation as the stickerTextview is within it's parent. However, StickerTextView.Bottom and StickerTextView.Right returns the same value regardless of the position of the StickerTextView.

I also tried StickerTextView.getx and StickerTextView.getY after sticking the parent relativeLayout to the top and left corner of the scree. This only works when the textview reaches a certain size only. Otherwise, if the textview is too small, then it is drawn below where it should be.

ashishsakarkar2020 commented 7 years ago

Did you find any solution??? Please help

JoseMiralles commented 5 years ago

@ashishsakarkar2020 I know that you posted that comment 2 years ago, but somehow I saw it until now. So I'm sorry for answering until now. I ended up having to move on to another project, and was unable to find a solution.