0

I'm writing an app that I can drag, scale, rotate text (StaticLayout) and sticker (Bitmap) like Instagram Story. I use a custom view to draw objects in onDraw(), detect gesture using MotionEvent in onTouchEvent().

But I can't find the bounds which fit these objects, because the bound I use is Rect, and it doesn't fit text/bitmap when I rotate.

Does anyone know how to get the bound that fit these object, or how does Instagram draw text and sticker in Story? OpenGL?

Nam Nô
  • 31
  • 6

1 Answers1

3

Have you checked this Signal-Android repository? They have implemented exactly this feature here. If you are new to this repo and find yourself in trouble running this project, you can use the playstore app to see how it functions and explore the codebase parallelly.