下面列出了android.widget.Magnifier#org.telegram.messenger.AndroidUtilities 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
private TabSettings()
{
super(TabSettings.class.getName());
tabsToBottom = getBool(TabsToBottom, false);
hideTabs = getBool(HideTabs, false);
hideALl = getBool(HideAll, false);
hideUsers = getBool(HideUsers, false);
hideGroups = getBool(HideGroups, false);
hideSuperGroups = getBool(HideSuperGroups, false);
hideChannels = getBool(HideChannels, false);
hideBots = getBool(HideBots, false);
hideFavorites = getBool(HideFavorites, false);
hideAdmins = getBool(HideAdmins, true);
hideUnreads = getBool(HideUnreads, true);
hideTabsCounters = getBool(HideTabsCounters, false);
tabsCountersCountNotMuted = getBool(TabsCountersCountNotMuted, true);
tabsCountersCountChats = getBool(TabsCountersCountChats, false);
limitTabsCounters = getBool(LimitTabsCounters, false);
tabsShouldExpand = getBool(TabsShouldExpand, true);
chatsTabCounterSize = getInt(ChatsTabCounterSize, AndroidUtilities.isTablet() ? 13 : 11);
tabsTextSize = getInt(TabsTextSize, 14);
tabsHeight = getInt(TabsHeight, 40);
disableTabsScrolling = getBool(DisableTabsScrolling, false);
actionBarCastShadows = storage.getBoolean(ActionBarCastShadowsKey, true);
currentTab = getInt(CurrentTab, 0);
}
private void fixLayoutInternal()
{
if (getParentActivity() == null)
{
return;
}
WindowManager manager = (WindowManager) ApplicationLoader.applicationContext.getSystemService(Activity.WINDOW_SERVICE);
int rotation = manager.getDefaultDisplay().getRotation();
columnsCount = 2;
if (!AndroidUtilities.isTablet() && (rotation == Surface.ROTATION_270 || rotation == Surface.ROTATION_90))
{
columnsCount = 4;
}
listAdapter.notifyDataSetChanged();
}
@Override
public void didUploadPhoto(final TLRPC.InputFile file, final TLRPC.PhotoSize bigSize, final TLRPC.PhotoSize smallSize) {
AndroidUtilities.runOnUIThread(() -> {
if (file != null) {
uploadedAvatar = file;
if (createAfterUpload) {
try {
if (progressDialog != null && progressDialog.isShowing()) {
progressDialog.dismiss();
progressDialog = null;
}
} catch (Exception e) {
FileLog.e(e);
}
donePressed = false;
doneButton.performClick();
}
showAvatarProgress(false, true);
} else {
avatar = smallSize.location;
avatarBig = bigSize.location;
avatarImage.setImage(ImageLocation.getForLocal(avatar), "50_50", avatarDrawable, currentChat);
showAvatarProgress(true, false);
}
});
}
public void search(String text) {
if (reqId != 0) {
ConnectionsManager.getInstance(currentAccount).cancelRequest(reqId, true);
reqId = 0;
}
if (reqId2 != 0) {
ConnectionsManager.getInstance(currentAccount).cancelRequest(reqId2, true);
reqId2 = 0;
}
if (TextUtils.isEmpty(text)) {
searchQuery = null;
localPacks.clear();
emojiStickers.clear();
serverPacks.clear();
delegate.setAdapterVisible(false);
notifyDataSetChanged();
} else {
searchQuery = text.toLowerCase();
}
AndroidUtilities.cancelRunOnUIThread(searchRunnable);
AndroidUtilities.runOnUIThread(searchRunnable, 300);
}
private void openShareLiveLocation() {
if (delegate == null || getParentActivity() == null || myLocation == null) {
return;
}
TLRPC.User user = null;
if ((int) dialogId > 0) {
user = getMessagesController().getUser((int) dialogId);
}
showDialog(AlertsCreator.createLocationUpdateDialog(getParentActivity(), user, param -> {
TLRPC.TL_messageMediaGeoLive location = new TLRPC.TL_messageMediaGeoLive();
location.geo = new TLRPC.TL_geoPoint();
location.geo.lat = AndroidUtilities.fixLocationCoord(myLocation.getLatitude());
location.geo._long = AndroidUtilities.fixLocationCoord(myLocation.getLongitude());
location.period = param;
delegate.didSelectLocation(location, locationType, true, 0);
finishFragment();
}));
}
public ContextProgressView(Context context, int colorType) {
super(context);
innerPaint.setStyle(Paint.Style.STROKE);
innerPaint.setStrokeWidth(AndroidUtilities.dp(2));
outerPaint.setStyle(Paint.Style.STROKE);
outerPaint.setStrokeWidth(AndroidUtilities.dp(2));
outerPaint.setStrokeCap(Paint.Cap.ROUND);
if (colorType == 0) {
innerKey = Theme.key_contextProgressInner1;
outerKey = Theme.key_contextProgressOuter1;
} else if (colorType == 1) {
innerKey = Theme.key_contextProgressInner2;
outerKey = Theme.key_contextProgressOuter2;
} else if (colorType == 2) {
innerKey = Theme.key_contextProgressInner3;
outerKey = Theme.key_contextProgressOuter3;
} else if (colorType == 3) {
innerKey = Theme.key_contextProgressInner4;
outerKey = Theme.key_contextProgressOuter4;
}
updateColors();
}
public ProgressButton(Context context) {
super(context);
setAllCaps(false);
setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14);
setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
setOutlineProvider(null);
}
ViewHelper.setPadding(this, 8, 0, 8, 0);
final int minWidth = AndroidUtilities.dp(60);
setMinWidth(minWidth);
setMinimumWidth(minWidth);
progressRect = new RectF();
progressPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
progressPaint.setStrokeCap(Paint.Cap.ROUND);
progressPaint.setStyle(Paint.Style.STROKE);
progressPaint.setStrokeWidth(AndroidUtilities.dp(2));
}
private void drawStage2(Canvas canvas, float progress) {
final Rect bounds = getBounds();
progress = interpolator.getInterpolation(progress);
tempRect.left = (int) (AndroidUtilities.dp(2) * scaleX);
tempRect.bottom = bounds.bottom - ((int) (AndroidUtilities.dp(6) * scaleY));
tempRect.right = bounds.right - tempRect.left;
tempRect.top = tempRect.bottom - ((int) (AndroidUtilities.dp(4) * scaleY));
tempRect.offset(0, AndroidUtilities.dp(AndroidUtilities.lerp(0, -8, progress)));
secondaryRectDrawable.setBounds(tempRect);
secondaryRectDrawable.draw(canvas);
tempRect.left = (int) (AndroidUtilities.dpf2(AndroidUtilities.lerp(1, 2, progress)) * scaleX);
tempRect.top = (int) (AndroidUtilities.dpf2(AndroidUtilities.lerp(5, 6, progress)) * scaleY);
tempRect.right = bounds.right - tempRect.left;
tempRect.bottom = tempRect.top + (int) (AndroidUtilities.dpf2(AndroidUtilities.lerp(6, 4, progress)) * scaleY);
tempRect.offset(0, AndroidUtilities.dp(AndroidUtilities.lerp(0, 8, progress)));
primaryRectDrawable.setBounds(tempRect);
primaryRectDrawable.setAlpha(255);
primaryRectDrawable.draw(canvas);
}
public ShareDialogCell(Context context) {
super(context);
imageView = new BackupImageView(context);
imageView.setRoundRadius(AndroidUtilities.dp(27));
addView(imageView, LayoutHelper.createFrame(54, 54, Gravity.TOP | Gravity.CENTER_HORIZONTAL, 0, 7, 0, 0));
nameTextView = new TextView(context);
nameTextView.setTextColor(Theme.getColor(Theme.key_dialogTextBlack));
nameTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 12);
nameTextView.setMaxLines(2);
nameTextView.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL);
nameTextView.setLines(2);
nameTextView.setEllipsize(TextUtils.TruncateAt.END);
addView(nameTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP, 6, 64, 6, 0));
checkBox = new CheckBox(context, R.drawable.round_check2);
checkBox.setSize(24);
checkBox.setCheckOffset(AndroidUtilities.dp(1));
checkBox.setVisibility(VISIBLE);
checkBox.setColor(Theme.getColor(Theme.key_dialogRoundCheckBox), Theme.getColor(Theme.key_dialogRoundCheckBoxCheck));
addView(checkBox, LayoutHelper.createFrame(24, 24, Gravity.CENTER_HORIZONTAL | Gravity.TOP, 17, 39, 0, 0));
}
public TextPriceCell(Context context) {
super(context);
setWillNotDraw(false);
textView = new TextView(context);
textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16);
textView.setLines(1);
textView.setMaxLines(1);
textView.setSingleLine(true);
textView.setEllipsize(TextUtils.TruncateAt.END);
textView.setGravity((LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.CENTER_VERTICAL);
addView(textView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, 21, 0, 21, 0));
valueTextView = new TextView(context);
valueTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16);
valueTextView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
valueTextView.setLines(1);
valueTextView.setMaxLines(1);
valueTextView.setSingleLine(true);
valueTextView.setEllipsize(TextUtils.TruncateAt.END);
valueTextView.setGravity((LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.CENTER_VERTICAL);
addView(valueTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.TOP, 21, 0, 21, 0));
}
public void setSticker(TLRPC.Document document, int side) {
if (document != null && document.thumb != null) {
imageView.setImage(document.thumb.location, null, "webp", null);
}
sticker = document;
if (side == -1) {
setBackgroundResource(R.drawable.stickers_back_left);
setPadding(AndroidUtilities.dp(7), 0, 0, 0);
} else if (side == 0) {
setBackgroundResource(R.drawable.stickers_back_center);
setPadding(0, 0, 0, 0);
} else if (side == 1) {
setBackgroundResource(R.drawable.stickers_back_right);
setPadding(0, 0, AndroidUtilities.dp(7), 0);
} else if (side == 2) {
setBackgroundResource(R.drawable.stickers_back_all);
setPadding(AndroidUtilities.dp(3), 0, AndroidUtilities.dp(3), 0);
}
Drawable background = getBackground();
if (background != null) {
background.setAlpha(230);
background.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_stickersHintPanel), PorterDuff.Mode.MULTIPLY));
}
}
public void search(String text) {
if (reqId2 != 0) {
ConnectionsManager.getInstance(currentAccount).cancelRequest(reqId2, true);
reqId2 = 0;
}
if (TextUtils.isEmpty(text)) {
searchQuery = null;
localPacks.clear();
emojiStickers.clear();
if (gridView.getAdapter() != stickersGridAdapter) {
gridView.setAdapter(stickersGridAdapter);
}
notifyDataSetChanged();
} else {
searchQuery = text.toLowerCase();
}
AndroidUtilities.cancelRunOnUIThread(searchRunnable);
AndroidUtilities.runOnUIThread(searchRunnable, 300);
}
@JavascriptInterface
public void postEvent(final String eventName, final String eventData) {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public void run() {
switch (eventName) {
case "loaded":
progressBar.setVisibility(View.INVISIBLE);
progressBarBlackBackground.setVisibility(View.INVISIBLE);
pipButton.setEnabled(true);
pipButton.setAlpha(1.0f);
showOrHideYoutubeLogo(false);
break;
}
}
});
}
public void removeFragmentFromStack(BaseFragment fragment)
{
if (useAlphaAnimations && fragmentsStack.size() == 1 && AndroidUtilities.isTablet())
{
closeLastFragment(true);
}
else
{
removeFragmentFromStackInternal(fragment);
}
}
public static void onLogout(final int currentAccount)
{
AndroidUtilities.runOnUIThread(() ->
{
if (UserConfig.getInstance(currentAccount).getClientUserId() != 0)
{
UserConfig.getInstance(currentAccount).clearConfig();
MessagesController.getInstance(currentAccount).performLogout(0);
}
});
}
public PullForegroundDrawable(String pullText, String releaseText) {
tooltipTextPaint.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
tooltipTextPaint.setTextAlign(Paint.Align.CENTER);
tooltipTextPaint.setTextSize(AndroidUtilities.dp(16));
final ViewConfiguration vc = ViewConfiguration.get(ApplicationLoader.applicationContext);
touchSlop = vc.getScaledTouchSlop();
pullTooltip = pullText;
releaseTooltip = releaseText;
}
private ImageButton createOverflowButton() {
final ImageButton overflowButton = new ImageButton(mContext);
overflowButton.setLayoutParams(new ViewGroup.LayoutParams(AndroidUtilities.dp(56), AndroidUtilities.dp(48)));
overflowButton.setPaddingRelative(AndroidUtilities.dp(16), AndroidUtilities.dp(12), AndroidUtilities.dp(16), AndroidUtilities.dp(12));
overflowButton.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
overflowButton.setImageDrawable(mOverflow);
int color;
if (currentStyle == STYLE_DIALOG) {
color = Theme.getColor(Theme.key_dialogTextBlack);
overflowButton.setBackgroundDrawable(Theme.createSelectorDrawable(Theme.getColor(Theme.key_listSelector), 1));
} else if (currentStyle == STYLE_BLACK) {
color = 0xfffafafa;
overflowButton.setBackgroundDrawable(Theme.createSelectorDrawable(0x40ffffff, 1));
} else {
color = Theme.getColor(Theme.key_windowBackgroundWhiteBlackText);
overflowButton.setBackgroundDrawable(Theme.createSelectorDrawable(Theme.getColor(Theme.key_listSelector), 1));
}
mOverflow.setTint(color);
mArrow.setTint(color);
mToArrow.setTint(color);
mToOverflow.setTint(color);
overflowButton.setOnClickListener(v -> {
if (mIsOverflowOpen) {
overflowButton.setImageDrawable(mToOverflow);
mToOverflow.start();
closeOverflow();
} else {
overflowButton.setImageDrawable(mToArrow);
mToArrow.start();
openOverflow();
}
});
return overflowButton;
}
public int getTabForPosition(int position) {
if (position == 0) {
position = 1;
}
if (stickersPerRow == 0) {
int width = getMeasuredWidth();
if (width == 0) {
width = AndroidUtilities.displaySize.x;
}
stickersPerRow = width / AndroidUtilities.dp(72);
}
int row = positionToRow.get(position, Integer.MIN_VALUE);
if (row == Integer.MIN_VALUE) {
return stickerSets.size() - 1 + stickersTabOffset;
}
Object pack = rowStartPack.get(row);
if (pack instanceof String) {
if ("recent".equals(pack)) {
return recentTabBum;
} else {
return favTabBum;
}
} else {
TLRPC.TL_messages_stickerSet set = (TLRPC.TL_messages_stickerSet) pack;
int idx = stickerSets.indexOf(set);
return idx + stickersTabOffset;
}
}
public void onUIForegroundStateChanged(boolean isForeground) {
if (currentState == STATE_WAITING_INCOMING) {
if (isForeground) {
stopForeground(true);
} else {
if (!((KeyguardManager) getSystemService(KEYGUARD_SERVICE)).inKeyguardRestrictedInputMode()) {
if(NotificationManagerCompat.from(this).areNotificationsEnabled())
showIncomingNotification(ContactsController.formatName(user.first_name, user.last_name), null, user, null, 0, VoIPActivity.class);
else
declineIncomingCall(DISCARD_REASON_LINE_BUSY, null);
} else {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public void run() {
Intent intent = new Intent(VoIPService.this, VoIPActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
try {
PendingIntent.getActivity(VoIPService.this, 0, intent, 0).send();
} catch (PendingIntent.CanceledException e) {
if (BuildVars.LOGS_ENABLED) {
FileLog.e("error restarting activity", e);
}
declineIncomingCall(DISCARD_REASON_LINE_BUSY, null);
}
if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.O){
showNotification();
}
}
}, 500);
}
}
}
}
public void draw(Canvas canvas) {
switch (type) {
case 0: {
particlePaint.setAlpha((int) (255 * alpha));
canvas.drawPoint(x, y, particlePaint);
break;
}
case 1:
default: {
particleThinPaint.setAlpha((int) (255 * alpha));
float angle = (float) -Math.PI / 2;
float px = AndroidUtilities.dpf2(2.0f) * 2 * scale;
float px1 = -AndroidUtilities.dpf2(0.57f) * 2 * scale;
float py1 = AndroidUtilities.dpf2(1.55f) * 2 * scale;
for (int a = 0; a < 6; a++) {
float x1 = (float) Math.cos(angle) * px;
float y1 = (float) Math.sin(angle) * px;
float cx = x1 * 0.66f;
float cy = y1 * 0.66f;
canvas.drawLine(x, y, x + x1, y + y1, particleThinPaint);
float angle2 = (float) (angle - Math.PI / 2);
x1 = (float) (Math.cos(angle2) * px1 - Math.sin(angle2) * py1);
y1 = (float) (Math.sin(angle2) * px1 + Math.cos(angle2) * py1);
canvas.drawLine(x + cx, y + cy, x + x1, y + y1, particleThinPaint);
x1 = (float) (-Math.cos(angle2) * px1 - Math.sin(angle2) * py1);
y1 = (float) (-Math.sin(angle2) * px1 + Math.cos(angle2) * py1);
canvas.drawLine(x + cx, y + cy, x + x1, y + y1, particleThinPaint);
angle += angleDiff;
}
break;
}
}
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType)
{
View view = new ShareDialogCell(context);
view.setLayoutParams(new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT, AndroidUtilities.dp(100)));
return new RecyclerListView.Holder(view);
}
private void setAnimationProgress(float value) {
animationProgress = value;
float rad = Math.max(lastTouchX, getMeasuredWidth() - lastTouchX) + AndroidUtilities.dp(40);
float cx = lastTouchX;
int cy = getMeasuredHeight() / 2;
float animatedRad = rad * animationProgress;
checkBox.setOverrideColorProgress(cx, cy, animatedRad);
}
private boolean onItemLongClick(MessageObject item, View view, int a) {
if (actionBar.isActionModeShowed() || getParentActivity() == null) {
return false;
}
AndroidUtilities.hideKeyboard(getParentActivity().getCurrentFocus());
selectedFiles[item.getDialogId() == dialog_id ? 0 : 1].put(item.getId(), item);
if (!item.canDeleteMessage(false, null)) {
cantDeleteMessagesCount++;
}
actionBar.createActionMode().getItem(delete).setVisibility(cantDeleteMessagesCount == 0 ? View.VISIBLE : View.GONE);
if (gotoItem != null) {
gotoItem.setVisibility(View.VISIBLE);
}
selectedMessagesCountTextView.setNumber(1, false);
AnimatorSet animatorSet = new AnimatorSet();
ArrayList<Animator> animators = new ArrayList<>();
for (int i = 0; i < actionModeViews.size(); i++) {
View view2 = actionModeViews.get(i);
AndroidUtilities.clearDrawableAnimation(view2);
animators.add(ObjectAnimator.ofFloat(view2, View.SCALE_Y, 0.1f, 1.0f));
}
animatorSet.playTogether(animators);
animatorSet.setDuration(250);
animatorSet.start();
scrolling = false;
if (view instanceof SharedDocumentCell) {
((SharedDocumentCell) view).setChecked(true, true);
} else if (view instanceof SharedPhotoVideoCell) {
((SharedPhotoVideoCell) view).setChecked(a, true, true);
} else if (view instanceof SharedLinkCell) {
((SharedLinkCell) view).setChecked(true, true);
} else if (view instanceof SharedAudioCell) {
((SharedAudioCell) view).setChecked(true, true);
}
if (!actionBar.isActionModeShowed()) {
actionBar.showActionMode(null, actionModeBackground, null, null, null, 0);
resetScroll();
}
return true;
}
public void notifyHeightChanged() {
if (delegate != null) {
keyboardHeight = getKeyboardHeight();
final boolean isWidthGreater = AndroidUtilities.displaySize.x > AndroidUtilities.displaySize.y;
post(new Runnable() {
@Override
public void run() {
if (delegate != null) {
delegate.onSizeChanged(keyboardHeight, isWidthGreater);
}
}
});
}
}
public void setDrawBackgroundAsArc(int type) {
drawBackgroundAsArc = type;
if (type == 4 || type == 5) {
backgroundPaint.setStrokeWidth(AndroidUtilities.dp(1.9f));
if (type == 5) {
checkPaint.setStrokeWidth(AndroidUtilities.dp(1.5f));
}
} else if (type == 3) {
backgroundPaint.setStrokeWidth(AndroidUtilities.dp(1.2f));
} else if (type != 0) {
backgroundPaint.setStrokeWidth(AndroidUtilities.dp(1.5f));
}
}
@Override
protected void onTransitionAnimationEnd(boolean isOpen, boolean backward) {
if (isOpen) {
AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid);
AndroidUtilities.setAdjustResizeToNothing(getParentActivity(), classGuid);
}
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
int action = ev.getActionMasked();
float x = ev.getX();
if (action == MotionEvent.ACTION_DOWN) {
prevX = x;
if (rotationListener != null)
rotationListener.onStart();
} else if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_CANCEL) {
if (rotationListener != null)
rotationListener.onEnd(this.rotation);
} else if (action == MotionEvent.ACTION_MOVE) {
float delta = prevX - x;
float newAngle = this.rotation + (float)(delta / AndroidUtilities.density / Math.PI / 1.65f);
newAngle = Math.max(-MAX_ANGLE, Math.min(MAX_ANGLE, newAngle));
if (Math.abs(newAngle - this.rotation) > 0.001) {
if (Math.abs(newAngle) < 0.05)
newAngle = 0;
setRotation(newAngle, false);
if (rotationListener != null)
rotationListener.onChange(this.rotation);
prevX = x;
}
}
return true;
}
@Override
protected void onTransitionAnimationEnd(boolean isOpen, boolean backward) {
if (isOpen && !backward && addingNewProxy) {
inputFields[FIELD_IP].requestFocus();
AndroidUtilities.showKeyboard(inputFields[FIELD_IP]);
}
}
public ChatActionCell(Context context)
{
super(context);
imageReceiver = new ImageReceiver(this);
imageReceiver.setRoundRadius(AndroidUtilities.dp(32));
avatarDrawable = new AvatarDrawable();
}
private void updatePlayButton() {
controlsView.checkNeedHide();
AndroidUtilities.cancelRunOnUIThread(progressRunnable);
if (!videoPlayer.isPlaying()) {
if (isCompleted) {
playButton.setImageResource(isInline ? R.drawable.ic_againinline : R.drawable.ic_again);
} else {
playButton.setImageResource(isInline ? R.drawable.ic_playinline : R.drawable.ic_play);
}
} else {
playButton.setImageResource(isInline ? R.drawable.ic_pauseinline : R.drawable.ic_pause);
AndroidUtilities.runOnUIThread(progressRunnable, 500);
checkAudioFocus();
}
}