Overlay over an ImageView on Android

后端 未结 4 2034
灰色年华
灰色年华 2021-02-02 16:50

So I have a list of images that come from the web, I don\'t know which color are they and I want to place a text over the ImageView.

My idea is to place the ImageView, a

4条回答
  •  野性不改
    2021-02-02 17:00

    You do not have to use a gradient drawable file or set it in your xml.. you can do this pragmatically using GradientDrawable Class as explained in this related Question (Create a radial gradient programmatically) then set it as a background for a layout that covers your ImageView, this gives you ability to use different colors and orientations

提交回复
热议问题