安卓视图背景使适合中心



我正在使用此代码来设置背景,是否可以使其适合中心或防止拉伸

toolbar_layout = (CollapsingToolbarLayout)findViewById(R.id.toolbar_layout);
toolbar_layout.setBackground(new BitmapDrawable(bitmap));

如果您想在折叠工具栏中应用图像,那么您应该看到他们的材料设计官方网站。 只要通过它,你就会得到一个想法。

最新更新