@Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); if (currentMessageObject.isOutOwner()) { seekBarX = layoutWidth - backgroundWidth + AndroidUtilities.dp(52); buttonX = layoutWidth - backgroundWidth + AndroidUtilities.dp(13); timeX = layoutWidth - backgroundWidth + AndroidUtilities.dp(63); } else { if (isChat && currentMessageObject.messageOwner.from_id > 0) { seekBarX = AndroidUtilities.dp(113); buttonX = AndroidUtilities.dp(74); timeX = AndroidUtilities.dp(124); } else { seekBarX = AndroidUtilities.dp(61); buttonX = AndroidUtilities.dp(22); timeX = AndroidUtilities.dp(72); } } seekBar.width = backgroundWidth - AndroidUtilities.dp(67); seekBar.height = AndroidUtilities.dp(30); seekBarY = AndroidUtilities.dp(26) + namesOffset; buttonY = AndroidUtilities.dp(13) + namesOffset; radialProgress.setProgressRect( buttonX, buttonY, buttonX + AndroidUtilities.dp(40), buttonY + AndroidUtilities.dp(40)); updateProgress(); }
@Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); if (currentMessageObject == null) { return; } int x; if (currentMessageObject.isOutOwner()) { x = layoutWidth - backgroundWidth + AndroidUtilities.dp(8); } else { if (isChat && currentMessageObject.messageOwner.from_id > 0) { x = AndroidUtilities.dp(69); } else { x = AndroidUtilities.dp(16); } } avatarImage.setImageCoords( x, AndroidUtilities.dp(9) + namesOffset, AndroidUtilities.dp(42), AndroidUtilities.dp(42)); }