private void updateTheme(){
SharedPreferences themePrefs = ApplicationLoader.applicationContext.getSharedPreferences(AndroidUtilities.THEME_PREFS, AndroidUtilities.THEME_PREFS_MODE);
int def = themePrefs.getInt("themeColor", AndroidUtilities.defColor);
try{
Drawable floatingDrawableWhite = getParentActivity().getResources().getDrawable(R.drawable.floating_white);
if(floatingDrawableWhite != null)floatingDrawableWhite.setColorFilter(themePrefs.getInt("chatsFloatingBGColor", def), PorterDuff.Mode.MULTIPLY);
floatingButton.setBackgroundDrawable(floatingDrawableWhite);
Drawable pencilDrawableWhite = getParentActivity().getResources().getDrawable(R.drawable.ic_float_sms);
if(pencilDrawableWhite != null)pencilDrawableWhite.setColorFilter(themePrefs.getInt("chatsFloatingPencilColor", 0xffffffff), PorterDuff.Mode.MULTIPLY);
floatingButton.setImageDrawable(pencilDrawableWhite);
} catch (NullPointerException e) {
FileLog.e("tmessages", e);
}
}
ProfileActivity.java 文件源码
java
阅读 42
收藏 0
点赞 0
评论 0
项目:PlusGram
作者:
评论列表
文章目录