Building a 9 patch drawable at runtime

后端 未结 4 1255
伪装坚强ぢ
伪装坚强ぢ 2020-12-08 23:10

I am successfully building a 9patch drawable at runtime on Android 3.0+ using the excellent gist provided by Brian Griffey (found here).

Essentially I load the raw (

4条回答
  •  一个人的身影
    2020-12-08 23:35

    Not really an answer to the question, but a useful workaround...

    I've always found working with 9-patch files at runtime to be hairy. I have been successfully able to use FrameLayouts and automatic resizing of text to accomplish my desired effects. If your app will just be using this 9-patch, and not specifically allowing the user to download it as an image (an android 9-patch image generator, so to speak), I would advise you to look into that.

提交回复
热议问题