File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
app/src/main/java/com/getcode/view/main/bill Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -115,20 +115,20 @@ object CashBillAssets {
115
115
116
116
// create bitmap from drawable
117
117
var bit: Bitmap ? = runCatching {
118
- BitmapFactory .decodeResource(
119
- context.resources,
120
- drawable,
121
- BitmapFactory .Options ().apply {
122
- inJustDecodeBounds = false
123
- inPreferredConfig = Bitmap .Config .RGB_565
124
- }
118
+ Bitmap .createBitmap(
119
+ db!! .intrinsicWidth, db.intrinsicHeight, Bitmap .Config .ARGB_8888
125
120
)
126
121
}.getOrNull()
127
122
128
123
if (bit == null ) {
129
124
bit = runCatching {
130
- Bitmap .createBitmap(
131
- db!! .intrinsicWidth, db.intrinsicHeight, Bitmap .Config .RGB_565
125
+ BitmapFactory .decodeResource(
126
+ context.resources,
127
+ drawable,
128
+ BitmapFactory .Options ().apply {
129
+ inJustDecodeBounds = false
130
+ inPreferredConfig = Bitmap .Config .RGB_565
131
+ }
132
132
)
133
133
}.getOrNull()
134
134
}
You can’t perform that action at this time.
0 commit comments