mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Fix async crash.
This commit is contained in:
parent
94091bb4e6
commit
0ab0d615bb
1 changed files with 6 additions and 2 deletions
|
@ -99,8 +99,12 @@ public class UIUtils {
|
||||||
// attempting to add padding will silently fail.
|
// attempting to add padding will silently fail.
|
||||||
int iconSize = getActionBarHeight(activity);
|
int iconSize = getActionBarHeight(activity);
|
||||||
Bitmap scaledIcon = Bitmap.createScaledBitmap(icon, iconSize, iconSize, false);
|
Bitmap scaledIcon = Bitmap.createScaledBitmap(icon, iconSize, iconSize, false);
|
||||||
BitmapDrawable draw = new BitmapDrawable(activity.getResources(), scaledIcon);
|
final BitmapDrawable draw = new BitmapDrawable(activity.getResources(), scaledIcon);
|
||||||
activity.getActionBar().setLogo(draw);
|
activity.runOnUiThread(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
activity.getActionBar().setLogo(draw);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue