Android⼀如何读取相册将选择的图动态设置为应用背景

2025-04-06 03:49:55
推荐回答(1个)
回答1:

Bitmap bitmap = BitmapFactory.decodeFile(String path);
linearlayout.setBackground(new BitmapDrawable(bitmap));