开发者

FrameLayout + bg-image vs. ImageView

开发者 https://www.devze.com 2023-01-12 11:30 出处:网络
Simple question really: for very simple graphics such as dividers, is it开发者_如何学编程 cheaper in terms of layouting / rendering costs to use a FrameLayout and set the image as a background instea

Simple question really:

for very simple graphics such as dividers, is it开发者_如何学编程 cheaper in terms of layouting / rendering costs to use a FrameLayout and set the image as a background instead of using ImageView? The intuition was that FrameLayout is the simplest of all views (in terms of features), and ImageView does things like scaling and cropping. On the other hand, FrameLayout is a ViewGroup and maintains children, while ImageView does not (although in this case, there are no child views).

Or is it not much to talk about anyway in terms of performance?

0

精彩评论

暂无评论...
验证码 换一张
取 消