ProfileActivity.java 文件源码

java
阅读 42 收藏 0 点赞 0 评论 0

项目:PlusGram 作者:
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);
    }

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号