use of org.telegram.ui.Cells.PhotoPickerPhotoCell in project Telegram-FOSS by Telegram-FOSS-Team.
the class PhotoViewer method updateColors.
public void updateColors() {
int color = getThemedColor(Theme.key_dialogFloatingButton);
if (pickerViewSendButton != null) {
Drawable drawable = pickerViewSendButton.getBackground();
Theme.setSelectorDrawableColor(drawable, color, false);
Theme.setSelectorDrawableColor(drawable, getThemedColor(Build.VERSION.SDK_INT >= 21 ? Theme.key_dialogFloatingButtonPressed : Theme.key_dialogFloatingButton), true);
pickerViewSendButton.setColorFilter(new PorterDuffColorFilter(getThemedColor(Theme.key_dialogFloatingIcon), PorterDuff.Mode.MULTIPLY));
}
if (checkImageView != null) {
checkImageView.setColor(getThemedColor(Theme.key_dialogFloatingButton), 0xffffffff);
}
PorterDuffColorFilter filter = new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY);
if (timeItem != null && timeItem.getColorFilter() != null) {
timeItem.setColorFilter(filter);
}
if (paintItem != null && paintItem.getColorFilter() != null) {
paintItem.setColorFilter(filter);
}
if (cropItem != null && cropItem.getColorFilter() != null) {
cropItem.setColorFilter(filter);
}
if (tuneItem != null && tuneItem.getColorFilter() != null) {
tuneItem.setColorFilter(filter);
}
if (rotateItem != null && rotateItem.getColorFilter() != null) {
rotateItem.setColorFilter(filter);
}
if (mirrorItem != null && mirrorItem.getColorFilter() != null) {
mirrorItem.setColorFilter(filter);
}
if (editorDoneLayout != null) {
editorDoneLayout.doneButton.setTextColor(color);
}
if (qualityPicker != null) {
qualityPicker.doneButton.setTextColor(color);
}
if (photoPaintView != null) {
photoPaintView.updateColors();
}
if (photoFilterView != null) {
photoFilterView.updateColors();
}
if (captionEditText != null) {
captionEditText.updateColors();
}
if (videoTimelineView != null) {
videoTimelineView.invalidate();
}
if (selectedPhotosListView != null) {
int count = selectedPhotosListView.getChildCount();
for (int a = 0; a < count; a++) {
View view = selectedPhotosListView.getChildAt(a);
if (view instanceof PhotoPickerPhotoCell) {
((PhotoPickerPhotoCell) view).updateColors();
}
}
}
if (masksAlert != null) {
masksAlert.updateColors(true);
}
}
Aggregations