use of org.telegram.ui.Cells.GroupCallTextCell in project Telegram-FOSS by Telegram-FOSS-Team.
the class UsersAlertBase method setColorProgress.
protected void setColorProgress(float progress) {
colorProgress = progress;
backgroundColor = AndroidUtilities.getOffsetColor(Theme.getColor(keyInviteMembersBackground), Theme.getColor(keyListViewBackground), progress, 1.0f);
shadowDrawable.setColorFilter(new PorterDuffColorFilter(backgroundColor, PorterDuff.Mode.MULTIPLY));
frameLayout.setBackgroundColor(backgroundColor);
navBarColor = backgroundColor;
listView.setGlowColor(backgroundColor);
int color = AndroidUtilities.getOffsetColor(Theme.getColor(keyLastSeenTextUnscrolled), Theme.getColor(keyLastSeenText), progress, 1.0f);
//
int color2 = AndroidUtilities.getOffsetColor(Theme.getColor(keySearchIconUnscrolled), Theme.getColor(keySearchIcon), progress, 1.0f);
for (int a = 0, N = listView.getChildCount(); a < N; a++) {
View child = listView.getChildAt(a);
if (child instanceof GroupCallTextCell) {
GroupCallTextCell cell = (GroupCallTextCell) child;
cell.setColors(color, color);
} else if (child instanceof GroupCallUserCell) {
GroupCallUserCell cell = (GroupCallUserCell) child;
cell.setGrayIconColor(shadow.getTag() != null ? keySearchIcon : keySearchIconUnscrolled, color2);
}
}
containerView.invalidate();
listView.invalidate();
container.invalidate();
}
use of org.telegram.ui.Cells.GroupCallTextCell in project Telegram-FOSS by Telegram-FOSS-Team.
the class GroupCallActivity method setColorProgress.
private void setColorProgress(float progress) {
colorProgress = progress;
float finalColorProgress = colorProgress;
float finalColorProgress2 = Math.max(colorProgress, renderersContainer == null ? 0 : renderersContainer.progressToFullscreenMode);
backgroundColor = AndroidUtilities.getOffsetColor(Theme.getColor(Theme.key_voipgroup_actionBarUnscrolled), Theme.getColor(Theme.key_voipgroup_actionBar), finalColorProgress, 1.0f);
actionBarBackground.setBackgroundColor(backgroundColor);
otherItem.redrawPopup(0xff232A33);
shadowDrawable.setColorFilter(new PorterDuffColorFilter(backgroundColor, PorterDuff.Mode.MULTIPLY));
navBarColor = AndroidUtilities.getOffsetColor(Theme.getColor(Theme.key_voipgroup_actionBarUnscrolled), Theme.getColor(Theme.key_voipgroup_actionBar), finalColorProgress2, 1.0f);
int color = AndroidUtilities.getOffsetColor(Theme.getColor(Theme.key_voipgroup_listViewBackgroundUnscrolled), Theme.getColor(Theme.key_voipgroup_listViewBackground), finalColorProgress, 1.0f);
listViewBackgroundPaint.setColor(color);
listView.setGlowColor(color);
if (muteButtonState == MUTE_BUTTON_STATE_CONNECTING || isGradientState(muteButtonState)) {
muteButton.invalidate();
}
if (buttonsBackgroundGradientView != null) {
gradientColors[0] = backgroundColor;
gradientColors[1] = Color.TRANSPARENT;
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.Q) {
buttonsBackgroundGradient.setColors(gradientColors);
} else {
buttonsBackgroundGradientView.setBackground(buttonsBackgroundGradient = new GradientDrawable(GradientDrawable.Orientation.BOTTOM_TOP, gradientColors));
}
buttonsBackgroundGradientView2.setBackgroundColor(gradientColors[0]);
}
color = AndroidUtilities.getOffsetColor(Theme.getColor(Theme.key_voipgroup_leaveButton), Theme.getColor(Theme.key_voipgroup_leaveButtonScrolled), finalColorProgress, 1.0f);
leaveButton.setBackgroundColor(color, color);
color = AndroidUtilities.getOffsetColor(Theme.getColor(Theme.key_voipgroup_lastSeenTextUnscrolled), Theme.getColor(Theme.key_voipgroup_lastSeenText), finalColorProgress, 1.0f);
int color2 = AndroidUtilities.getOffsetColor(Theme.getColor(Theme.key_voipgroup_mutedIconUnscrolled), Theme.getColor(Theme.key_voipgroup_mutedIcon), finalColorProgress, 1.0f);
for (int a = 0, N = listView.getChildCount(); a < N; a++) {
View child = listView.getChildAt(a);
if (child instanceof GroupCallTextCell) {
GroupCallTextCell cell = (GroupCallTextCell) child;
cell.setColors(color2, color);
} else if (child instanceof GroupCallUserCell) {
GroupCallUserCell cell = (GroupCallUserCell) child;
cell.setGrayIconColor(actionBar.getTag() != null ? Theme.key_voipgroup_mutedIcon : Theme.key_voipgroup_mutedIconUnscrolled, color2);
} else if (child instanceof GroupCallInvitedCell) {
GroupCallInvitedCell cell = (GroupCallInvitedCell) child;
cell.setGrayIconColor(actionBar.getTag() != null ? Theme.key_voipgroup_mutedIcon : Theme.key_voipgroup_mutedIconUnscrolled, color2);
}
}
containerView.invalidate();
listView.invalidate();
container.invalidate();
}
Aggregations