0

I want to scale a view inside a RemoteView. How can I do it?

I tried views.setFloat(R.id.progressFL, "setScaleY", scaleY); but it doesn't work but this works views.setInt(R.id.progressFL, "setBackgroundColor", 0xffff05f3); and it does work, how to know which methods work and which does not.

RHS.Dev
  • 412
  • 6
  • 18
  • 2
    Check this: https://stackoverflow.com/questions/28031296/setrotation-of-textview-in-remoteviews-app-widget. – Николай Гольцев Dec 06 '20 at 12:22
  • Thank you very much. I think making N version of any layout is not a good idea. Can canvas API draw anything? – RHS.Dev Dec 07 '20 at 13:05
  • I don't think it's a good idea to use Canvas API as alternative. Scale view in notification directly is not a good approach. Can you describe why do you need this? – Николай Гольцев Dec 07 '20 at 13:25
  • I'm creating a widget for my app in which I have a circular progressbar. So I was thinking if I can scale a view then I can show widget with single layout file to any possible tile combination of tiles (1x1, 2x2, 3x3, 4x4). Few custom launchers even support upto 7x7 grid system. And I dont think creating that many xml files is a good approach. – RHS.Dev Dec 08 '20 at 14:09

0 Answers0