getBundleInfo(bitmap); // 創(chuàng)建一個 Pallette 對象 mImagePalette = Palette.from(bitmap).generate(); // 使用 Palette 設(shè)置背景顏色 mContainer.setBackgroundColor( mImagePalette.getVibrantColor(ContextCompat.getColor(this, android.R.color.black))); } 在12行,通過設(shè)置 Margin 的形式來確定圖片的位置...
www.dbjr.com.cn/article/949...htm 2025-5-26