Android custom shape

后端 未结 4 494
小鲜肉
小鲜肉 2021-01-14 11:04

I know it is possible to make a shape looking something like this: \"enter

But I don\'

4条回答
  •  天涯浪人
    2021-01-14 12:01

    You can define it in xml in a shapes file, but it may be a lot easier to make a simple 9 patch graphic, then you can easily customise how and where the curved and straight segments will be stretched.

    See http://developer.android.com/tools/help/draw9patch.html for more info

    EDIT

    For more info on shapes see here: http://developer.android.com/guide/topics/resources/drawable-resource.html#Shape

提交回复
热议问题