What is drawable

I have come acrossed the word drawable many times in android, but I don't know what is means,can someone please explain me what is a drawable

You can take a look on official docs
it is just a class

yes i had a look, but i didn't understand much, are any of the components in our builders drawable?

Yes the Kio4gradient extension or Decoration component in kodular also beautify component in niotron

so basically what does the drawable class do?

Not only 1 thing there are so many classes in android.graphics.drawable like shape drawable or gradient drawable

1 Like

I was looking at clipdrawable and found that it requires a drawable parameter, but i wanted to create a clipdrawable in an arrangement so is it possible?
ClipDrawable(Drawable drawable, int gravity, int orientation)

Nominally, a Drawable is something that can be drawn. You can have "primitive" drawables, such as BitmapDrawable that draw their contents (i.e., a bitmap), or you can have "composed" drawables, such as the ClipDrawable. The latter has no meaning on its own but is applied to another drawable. Which drawable you pass to its constructor will ultimately depend on what you're trying to achieve.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.