forked from upstream-mirrors/quik
User vector assets for all icons
This commit is contained in:
@@ -18,12 +18,12 @@ public class ListviewHelper {
|
||||
public static void applyCustomScrollbar(Context context, ListView listView) {
|
||||
if (context != null && listView != null) {
|
||||
try {
|
||||
Drawable drawable = ContextCompat.getDrawable(context, R.drawable.ic_scrollbar);
|
||||
Drawable drawable = ContextCompat.getDrawable(context, R.drawable.scrollbar);
|
||||
drawable.setColorFilter(Color.argb(64,
|
||||
Color.red(ThemeManager.getTextOnBackgroundSecondary()),
|
||||
Color.green(ThemeManager.getTextOnBackgroundSecondary()),
|
||||
Color.blue(ThemeManager.getTextOnBackgroundSecondary())),
|
||||
PorterDuff.Mode.MULTIPLY);
|
||||
PorterDuff.Mode.SRC_ATOP);
|
||||
|
||||
Field mScrollCacheField = View.class.getDeclaredField("mScrollCache");
|
||||
mScrollCacheField.setAccessible(true);
|
||||
|
||||
@@ -4,7 +4,6 @@ import android.app.ProgressDialog;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.PorterDuffColorFilter;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
@@ -99,7 +98,7 @@ public abstract class QKActivity extends ActionBarActivity {
|
||||
// Toolbar navigation icon
|
||||
Drawable navigationIcon = getToolbar().getNavigationIcon();
|
||||
if (navigationIcon != null) {
|
||||
navigationIcon.setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
|
||||
navigationIcon.setColorFilter(color, PorterDuff.Mode.SRC_ATOP);
|
||||
getToolbar().setNavigationIcon(navigationIcon);
|
||||
}
|
||||
|
||||
@@ -131,7 +130,7 @@ public abstract class QKActivity extends ActionBarActivity {
|
||||
if (mOverflowButton != null) {
|
||||
// We already have the overflow button, so just color it.
|
||||
Drawable icon = mOverflowButton.getDrawable();
|
||||
icon.setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
|
||||
icon.setColorFilter(color, PorterDuff.Mode.SRC_ATOP);
|
||||
// Have to clear the image drawable first or else it won't take effect
|
||||
mOverflowButton.setImageDrawable(null);
|
||||
mOverflowButton.setImageDrawable(icon);
|
||||
|
||||
@@ -34,7 +34,7 @@ public class ConversationListAdapter extends RecyclerCursorAdapter<ConversationL
|
||||
super(context);
|
||||
mPrefs = mContext.getPrefs();
|
||||
|
||||
mMuted = ContextCompat.getDrawable(context, R.drawable.ic_mute);
|
||||
mMuted = ContextCompat.getDrawable(context, R.drawable.ic_notifications_muted);
|
||||
mUnread = ContextCompat.getDrawable(context, R.drawable.ic_unread_indicator);
|
||||
mError = ContextCompat.getDrawable(context, R.drawable.ic_error);
|
||||
|
||||
@@ -127,9 +127,9 @@ public class ConversationListAdapter extends RecyclerCursorAdapter<ConversationL
|
||||
|
||||
@Override
|
||||
public void refresh() {
|
||||
mMuted.setColorFilter(ThemeManager.getColor(), PorterDuff.Mode.MULTIPLY);
|
||||
mUnread.setColorFilter(ThemeManager.getColor(), PorterDuff.Mode.MULTIPLY);
|
||||
mError.setColorFilter(ThemeManager.getColor(), PorterDuff.Mode.MULTIPLY);
|
||||
mMuted.setColorFilter(ThemeManager.getColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
mUnread.setColorFilter(ThemeManager.getColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
mError.setColorFilter(ThemeManager.getColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
+5
-8
@@ -8,7 +8,6 @@ import android.content.Loader;
|
||||
import android.content.SharedPreferences;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.PorterDuffColorFilter;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
@@ -20,7 +19,8 @@ import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import butterknife.Bind;
|
||||
import butterknife.ButterKnife;
|
||||
import com.melnykov.fab.FloatingActionButton;
|
||||
import com.moez.QKSMS.R;
|
||||
import com.moez.QKSMS.common.BlockedConversationHelper;
|
||||
@@ -40,9 +40,6 @@ import com.moez.QKSMS.ui.base.RecyclerCursorAdapter;
|
||||
import com.moez.QKSMS.ui.compose.ComposeFragment;
|
||||
import com.moez.QKSMS.ui.settings.SettingsFragment;
|
||||
|
||||
import butterknife.Bind;
|
||||
import butterknife.ButterKnife;
|
||||
|
||||
import java.util.Observable;
|
||||
import java.util.Observer;
|
||||
|
||||
@@ -100,7 +97,7 @@ public class ConversationListFragment extends QKFragment implements LoaderManage
|
||||
mFab.setColorNormal(ThemeManager.getColor());
|
||||
mFab.setColorPressed(ColorUtils.lighten(ThemeManager.getColor()));
|
||||
mFab.attachToRecyclerView(mRecyclerView);
|
||||
mFab.getDrawable().setColorFilter(new PorterDuffColorFilter(ThemeManager.getTextOnColorPrimary(), PorterDuff.Mode.MULTIPLY));
|
||||
mFab.setColorFilter(ThemeManager.getTextOnColorPrimary());
|
||||
mFab.setOnClickListener(v -> {
|
||||
if (mAdapter.isInMultiSelectMode()) {
|
||||
mAdapter.disableMultiSelectMode(true);
|
||||
@@ -165,7 +162,7 @@ public class ConversationListFragment extends QKFragment implements LoaderManage
|
||||
|
||||
menu.findItem(R.id.menu_block).setVisible(mPrefs.getBoolean(SettingsFragment.BLOCKED_ENABLED, false));
|
||||
|
||||
menu.findItem(R.id.menu_mark_read).setIcon(getUnreadWeight() >= 0 ? R.drawable.ic_read : R.drawable.ic_unread);
|
||||
menu.findItem(R.id.menu_mark_read).setIcon(getUnreadWeight() >= 0 ? R.drawable.ic_mark_read : R.drawable.ic_mark_unread);
|
||||
menu.findItem(R.id.menu_mark_read).setTitle(getUnreadWeight() >= 0 ? R.string.menu_mark_read : R.string.menu_mark_unread);
|
||||
menu.findItem(R.id.menu_block).setTitle(getBlockedWeight() > 0 ? R.string.menu_unblock_conversations : R.string.menu_block_conversations);
|
||||
menu.findItem(R.id.menu_delete_failed).setVisible(doSomeHaveErrors());
|
||||
@@ -312,7 +309,7 @@ public class ConversationListFragment extends QKFragment implements LoaderManage
|
||||
|
||||
mFab.setColorNormal(ThemeManager.getColor());
|
||||
mFab.setColorPressed(ColorUtils.lighten(ThemeManager.getColor()));
|
||||
mFab.getDrawable().setColorFilter(new PorterDuffColorFilter(ThemeManager.getTextOnColorPrimary(), PorterDuff.Mode.MULTIPLY));
|
||||
mFab.getDrawable().setColorFilter(ThemeManager.getTextOnColorPrimary(), PorterDuff.Mode.SRC_ATOP);
|
||||
|
||||
mEmptyStateIcon.setColorFilter(ThemeManager.getTextOnBackgroundPrimary());
|
||||
}
|
||||
|
||||
@@ -28,22 +28,22 @@ public class BubblePreferenceDialog extends QKDialog {
|
||||
|
||||
final QKTextView in1 = (QKTextView) view.findViewById(R.id.in_1);
|
||||
in1.setBackgroundResource(ThemeManager.getReceivedBubbleRes());
|
||||
in1.getBackground().setColorFilter(ThemeManager.getReceivedBubbleColor(), PorterDuff.Mode.MULTIPLY);
|
||||
in1.getBackground().setColorFilter(ThemeManager.getReceivedBubbleColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
in1.setOnColorBackground(ThemeManager.getReceivedBubbleColor() == ThemeManager.getColor());
|
||||
|
||||
final QKTextView in2 = (QKTextView) view.findViewById(R.id.in_2);
|
||||
in2.setBackgroundResource(ThemeManager.getReceivedBubbleAltRes());
|
||||
in2.getBackground().setColorFilter(ThemeManager.getReceivedBubbleColor(), PorterDuff.Mode.MULTIPLY);
|
||||
in2.getBackground().setColorFilter(ThemeManager.getReceivedBubbleColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
in2.setOnColorBackground(ThemeManager.getReceivedBubbleColor() == ThemeManager.getColor());
|
||||
|
||||
final QKTextView out1 = (QKTextView) view.findViewById(R.id.out_1);
|
||||
out1.setBackgroundResource(ThemeManager.getSentBubbleRes());
|
||||
out1.getBackground().setColorFilter(ThemeManager.getSentBubbleColor(), PorterDuff.Mode.MULTIPLY);
|
||||
out1.getBackground().setColorFilter(ThemeManager.getSentBubbleColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
out1.setOnColorBackground(ThemeManager.getSentBubbleColor() == ThemeManager.getColor());
|
||||
|
||||
final QKTextView out2 = (QKTextView) view.findViewById(R.id.out_2);
|
||||
out2.setBackgroundResource(ThemeManager.getSentBubbleAltRes());
|
||||
out2.getBackground().setColorFilter(ThemeManager.getSentBubbleColor(), PorterDuff.Mode.MULTIPLY);
|
||||
out2.getBackground().setColorFilter(ThemeManager.getSentBubbleColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
out2.setOnColorBackground(ThemeManager.getSentBubbleColor() == ThemeManager.getColor());
|
||||
|
||||
Preference.OnPreferenceClickListener onPreferenceClickListener = new Preference.OnPreferenceClickListener() {
|
||||
@@ -54,35 +54,35 @@ public class BubblePreferenceDialog extends QKDialog {
|
||||
case SettingsFragment.BUBBLES_NEW:
|
||||
ThemeManager.setBubbleStyleNew(((QKSwitchPreference) preference).isChecked());
|
||||
in1.setBackgroundResource(ThemeManager.getReceivedBubbleRes());
|
||||
in1.getBackground().setColorFilter(ThemeManager.getReceivedBubbleColor(), PorterDuff.Mode.MULTIPLY);
|
||||
in1.getBackground().setColorFilter(ThemeManager.getReceivedBubbleColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
in1.setOnColorBackground(ThemeManager.getReceivedBubbleColor() == ThemeManager.getColor());
|
||||
|
||||
in2.setBackgroundResource(ThemeManager.getReceivedBubbleAltRes());
|
||||
in2.getBackground().setColorFilter(ThemeManager.getReceivedBubbleColor(), PorterDuff.Mode.MULTIPLY);
|
||||
in2.getBackground().setColorFilter(ThemeManager.getReceivedBubbleColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
in2.setOnColorBackground(ThemeManager.getReceivedBubbleColor() == ThemeManager.getColor());
|
||||
|
||||
out1.setBackgroundResource(ThemeManager.getSentBubbleRes());
|
||||
out1.getBackground().setColorFilter(ThemeManager.getSentBubbleColor(), PorterDuff.Mode.MULTIPLY);
|
||||
out1.getBackground().setColorFilter(ThemeManager.getSentBubbleColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
out1.setOnColorBackground(ThemeManager.getSentBubbleColor() == ThemeManager.getColor());
|
||||
|
||||
out2.setBackgroundResource(ThemeManager.getSentBubbleAltRes());
|
||||
out2.getBackground().setColorFilter(ThemeManager.getSentBubbleColor(), PorterDuff.Mode.MULTIPLY);
|
||||
out2.getBackground().setColorFilter(ThemeManager.getSentBubbleColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
out2.setOnColorBackground(ThemeManager.getSentBubbleColor() == ThemeManager.getColor());
|
||||
return true;
|
||||
|
||||
case SettingsFragment.COLOUR_RECEIVED:
|
||||
ThemeManager.setReceivedBubbleColored(((QKSwitchPreference) preference).isChecked());
|
||||
in1.getBackground().setColorFilter(ThemeManager.getReceivedBubbleColor(), PorterDuff.Mode.MULTIPLY);
|
||||
in1.getBackground().setColorFilter(ThemeManager.getReceivedBubbleColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
in1.setOnColorBackground(ThemeManager.getReceivedBubbleColor() == ThemeManager.getColor());
|
||||
in2.getBackground().setColorFilter(ThemeManager.getReceivedBubbleColor(), PorterDuff.Mode.MULTIPLY);
|
||||
in2.getBackground().setColorFilter(ThemeManager.getReceivedBubbleColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
in2.setOnColorBackground(ThemeManager.getReceivedBubbleColor() == ThemeManager.getColor());
|
||||
return true;
|
||||
|
||||
case SettingsFragment.COLOUR_SENT:
|
||||
ThemeManager.setSentBubbleColored(((QKSwitchPreference) preference).isChecked());
|
||||
out1.getBackground().setColorFilter(ThemeManager.getSentBubbleColor(), PorterDuff.Mode.MULTIPLY);
|
||||
out1.getBackground().setColorFilter(ThemeManager.getSentBubbleColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
out1.setOnColorBackground(ThemeManager.getSentBubbleColor() == ThemeManager.getColor());
|
||||
out2.getBackground().setColorFilter(ThemeManager.getSentBubbleColor(), PorterDuff.Mode.MULTIPLY);
|
||||
out2.getBackground().setColorFilter(ThemeManager.getSentBubbleColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
out2.setOnColorBackground(ThemeManager.getSentBubbleColor() == ThemeManager.getColor());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -132,8 +132,8 @@ public class MessageListAdapter extends RecyclerCursorAdapter<MessageListViewHol
|
||||
// set up colors
|
||||
holder.mBodyTextView.setOnColorBackground(ThemeManager.getSentBubbleColor() == ThemeManager.getColor());
|
||||
holder.mDateView.setOnColorBackground(false);
|
||||
holder.mDeliveredIndicator.setColorFilter(ThemeManager.getTextOnBackgroundSecondary(), PorterDuff.Mode.MULTIPLY);
|
||||
holder.mLockedIndicator.setColorFilter(ThemeManager.getTextOnBackgroundSecondary(), PorterDuff.Mode.MULTIPLY);
|
||||
holder.mDeliveredIndicator.setColorFilter(ThemeManager.getTextOnBackgroundSecondary(), PorterDuff.Mode.SRC_ATOP);
|
||||
holder.mLockedIndicator.setColorFilter(ThemeManager.getTextOnBackgroundSecondary(), PorterDuff.Mode.SRC_ATOP);
|
||||
|
||||
// set up avatar
|
||||
holder.mAvatarView.setImageDrawable(Contact.getMe(true).getAvatar(mContext, null));
|
||||
@@ -147,8 +147,8 @@ public class MessageListAdapter extends RecyclerCursorAdapter<MessageListViewHol
|
||||
// set up colors
|
||||
holder.mBodyTextView.setOnColorBackground(ThemeManager.getReceivedBubbleColor() == ThemeManager.getColor());
|
||||
holder.mDateView.setOnColorBackground(false);
|
||||
holder.mDeliveredIndicator.setColorFilter(ThemeManager.getTextOnBackgroundSecondary(), PorterDuff.Mode.MULTIPLY);
|
||||
holder.mLockedIndicator.setColorFilter(ThemeManager.getTextOnBackgroundSecondary(), PorterDuff.Mode.MULTIPLY);
|
||||
holder.mDeliveredIndicator.setColorFilter(ThemeManager.getTextOnBackgroundSecondary(), PorterDuff.Mode.SRC_ATOP);
|
||||
holder.mLockedIndicator.setColorFilter(ThemeManager.getTextOnBackgroundSecondary(), PorterDuff.Mode.SRC_ATOP);
|
||||
|
||||
// set up avatar
|
||||
if (mPrefs.getBoolean(SettingsFragment.HIDE_AVATAR_RECEIVED, false)) {
|
||||
@@ -307,9 +307,9 @@ public class MessageListAdapter extends RecyclerCursorAdapter<MessageListViewHol
|
||||
ThemeManager.getSentBubbleAltRes() : ThemeManager.getReceivedBubbleAltRes()));
|
||||
|
||||
if (messageItem.isMe()) {
|
||||
holder.mBodyTextView.getBackground().setColorFilter(ThemeManager.getSentBubbleColor(), PorterDuff.Mode.MULTIPLY);
|
||||
holder.mBodyTextView.getBackground().setColorFilter(ThemeManager.getSentBubbleColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
} else {
|
||||
holder.mBodyTextView.getBackground().setColorFilter(ThemeManager.getReceivedBubbleColor(), PorterDuff.Mode.MULTIPLY);
|
||||
holder.mBodyTextView.getBackground().setColorFilter(ThemeManager.getReceivedBubbleColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
}
|
||||
|
||||
if (messageItem.isMe() && !mPrefs.getBoolean(SettingsFragment.HIDE_AVATAR_SENT, true)) {
|
||||
|
||||
@@ -782,7 +782,7 @@ public class MessageListFragment extends QKContentFragment implements ActivityLa
|
||||
menu.findItem(R.id.menu_notifications).setTitle(conversationPrefs.getNotificationsEnabled() ?
|
||||
R.string.menu_notifications : R.string.menu_notifications_off);
|
||||
menu.findItem(R.id.menu_notifications).setIcon(conversationPrefs.getNotificationsEnabled() ?
|
||||
R.drawable.ic_notifications : R.drawable.ic_notifications_off);
|
||||
R.drawable.ic_notifications : R.drawable.ic_notifications_muted);
|
||||
|
||||
super.onCreateOptionsMenu(menu, inflater);
|
||||
}
|
||||
|
||||
@@ -258,10 +258,10 @@ public class AvatarView extends ImageView implements View.OnClickListener, LiveV
|
||||
|
||||
Bitmap roundBitmap = ImageUtils.getCircleBitmap(bitmap, w);
|
||||
super.setImageDrawable(new BitmapDrawable(getResources(), roundBitmap));
|
||||
getBackground().setColorFilter(0x00000000, PorterDuff.Mode.MULTIPLY);
|
||||
getBackground().setColorFilter(0x00000000, PorterDuff.Mode.SRC_ATOP);
|
||||
} else {
|
||||
super.setImageDrawable(TextUtils.isEmpty(mInitial) ? mDefaultDrawable : null);
|
||||
getBackground().setColorFilter(ThemeManager.getColor(), PorterDuff.Mode.MULTIPLY);
|
||||
getBackground().setColorFilter(ThemeManager.getColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -285,7 +285,7 @@ public class AvatarView extends ImageView implements View.OnClickListener, LiveV
|
||||
if (getBackground() == null) {
|
||||
setBackgroundResource(R.drawable.circle);
|
||||
}
|
||||
getBackground().setColorFilter(ThemeManager.getColor(), PorterDuff.Mode.MULTIPLY);
|
||||
getBackground().setColorFilter(ThemeManager.getColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
}
|
||||
|
||||
private class QueryHandler extends AsyncQueryHandler {
|
||||
|
||||
@@ -950,24 +950,24 @@ public class ComposeView extends LinearLayout implements View.OnClickListener, L
|
||||
|
||||
@Override
|
||||
public void refresh() {
|
||||
mButtonBackground.setColorFilter(ThemeManager.getColor(), PorterDuff.Mode.MULTIPLY);
|
||||
mButtonBar1.setColorFilter(ThemeManager.getTextOnColorPrimary(), PorterDuff.Mode.MULTIPLY);
|
||||
mButtonBar2.setColorFilter(ThemeManager.getTextOnColorPrimary(), PorterDuff.Mode.MULTIPLY);
|
||||
mButtonBackground.setColorFilter(ThemeManager.getColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
mButtonBar1.setColorFilter(ThemeManager.getTextOnColorPrimary(), PorterDuff.Mode.SRC_ATOP);
|
||||
mButtonBar2.setColorFilter(ThemeManager.getTextOnColorPrimary(), PorterDuff.Mode.SRC_ATOP);
|
||||
mAttachmentPanel.setBackgroundColor(ThemeManager.getColor());
|
||||
mAttach.setColorFilter(ThemeManager.getTextOnColorPrimary(), PorterDuff.Mode.MULTIPLY);
|
||||
mCamera.setColorFilter(ThemeManager.getTextOnColorPrimary(), PorterDuff.Mode.MULTIPLY);
|
||||
mAttach.setColorFilter(ThemeManager.getTextOnColorPrimary(), PorterDuff.Mode.SRC_ATOP);
|
||||
mCamera.setColorFilter(ThemeManager.getTextOnColorPrimary(), PorterDuff.Mode.SRC_ATOP);
|
||||
updateDelayButton();
|
||||
mProgress.setUnfinishedStrokeColor(ThemeManager.getTextOnColorSecondary());
|
||||
mProgress.setFinishedStrokeColor(ThemeManager.getTextOnColorPrimary());
|
||||
if (ThemeManager.getSentBubbleRes() != 0) mReplyText.setBackgroundResource(ThemeManager.getSentBubbleRes());
|
||||
mReplyText.getBackground().setColorFilter(ThemeManager.getNeutralBubbleColor(), PorterDuff.Mode.MULTIPLY);
|
||||
mReplyText.getBackground().setColorFilter(ThemeManager.getNeutralBubbleColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
mReplyText.refresh();
|
||||
getBackground().setColorFilter(ThemeManager.getBackgroundColor(), PorterDuff.Mode.MULTIPLY);
|
||||
getBackground().setColorFilter(ThemeManager.getBackgroundColor(), PorterDuff.Mode.SRC_ATOP);
|
||||
}
|
||||
|
||||
private void updateDelayButton() {
|
||||
mDelay.setColorFilter(mDelayedMessagingEnabled ?
|
||||
ThemeManager.getTextOnColorPrimary() : ThemeManager.getTextOnColorSecondary(),
|
||||
PorterDuff.Mode.MULTIPLY);
|
||||
PorterDuff.Mode.SRC_ATOP);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ public class QKLinearLayout extends LinearLayout {
|
||||
@TargetApi(16)
|
||||
@Override
|
||||
public void setBackground(Drawable background) {
|
||||
background.mutate().setColorFilter(mBackgroundTint, PorterDuff.Mode.MULTIPLY);
|
||||
background.mutate().setColorFilter(mBackgroundTint, PorterDuff.Mode.SRC_ATOP);
|
||||
super.setBackground(background);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBackgroundDrawable(Drawable background) {
|
||||
background.mutate().setColorFilter(mBackgroundTint, PorterDuff.Mode.MULTIPLY);
|
||||
background.mutate().setColorFilter(mBackgroundTint, PorterDuff.Mode.SRC_ATOP);
|
||||
super.setBackgroundDrawable(background);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ public class StarredContactsView extends LinearLayout implements LoaderManager.L
|
||||
|
||||
@Override
|
||||
public void refresh() {
|
||||
mIndicator.setColorFilter(ThemeManager.getTextOnBackgroundSecondary(), PorterDuff.Mode.MULTIPLY);
|
||||
mIndicator.setColorFilter(ThemeManager.getTextOnBackgroundSecondary(), PorterDuff.Mode.SRC_ATOP);
|
||||
mFavoritesBackground.setBackgroundColor(ThemeManager.getBackgroundColor());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public class WelcomeActivity extends QKActivity implements ViewPager.OnPageChang
|
||||
public void tintIndicators(int color) {
|
||||
if (mIndicators != null) {
|
||||
for (ImageView indicator : mIndicators) {
|
||||
indicator.setColorFilter(color, PorterDuff.Mode.MULTIPLY);
|
||||
indicator.setColorFilter(color, PorterDuff.Mode.SRC_ATOP);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,11 +93,11 @@ public class WelcomeActivity extends QKActivity implements ViewPager.OnPageChang
|
||||
}
|
||||
|
||||
if (mPrevious != null) {
|
||||
mPrevious.setColorFilter(color, PorterDuff.Mode.MULTIPLY);
|
||||
mPrevious.setColorFilter(color, PorterDuff.Mode.SRC_ATOP);
|
||||
}
|
||||
|
||||
if (mNext != null) {
|
||||
mNext.setColorFilter(color, PorterDuff.Mode.MULTIPLY);
|
||||
mNext.setColorFilter(color, PorterDuff.Mode.SRC_ATOP);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ public class WelcomeNightFragment extends BaseWelcomeFragment implements BaseWel
|
||||
|
||||
if (mNightHint != null) {
|
||||
mNightHint.setTextColor(colorBackground);
|
||||
mNightHint.getBackground().setColorFilter(colorAccent, PorterDuff.Mode.MULTIPLY);
|
||||
mNightHint.getBackground().setColorFilter(colorAccent, PorterDuff.Mode.SRC_ATOP);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user