本文整理汇总了Java中org.telegram.ui.ActionBar.Theme.chat_fileStatesDrawable方法的典型用法代码示例。如果您正苦于以下问题:Java Theme.chat_fileStatesDrawable方法的具体用法?Java Theme.chat_fileStatesDrawable怎么用?Java Theme.chat_fileStatesDrawable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.telegram.ui.ActionBar.Theme
的用法示例。
在下文中一共展示了Theme.chat_fileStatesDrawable方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDrawableForCurrentState
import org.telegram.ui.ActionBar.Theme; //导入方法依赖的package包/类
private Drawable getDrawableForCurrentState() {
if (buttonState == -1) {
return null;
}
radialProgress.setAlphaForPrevious(false);
return Theme.chat_fileStatesDrawable[buttonState + 5][buttonPressed ? 1 : 0];
}
示例2: getDrawableForCurrentState
import org.telegram.ui.ActionBar.Theme; //导入方法依赖的package包/类
private Drawable getDrawableForCurrentState() {
if (documentAttachType == DOCUMENT_ATTACH_TYPE_AUDIO || documentAttachType == DOCUMENT_ATTACH_TYPE_MUSIC) {
if (buttonState == -1) {
return null;
}
radialProgress.setAlphaForPrevious(false);
return Theme.chat_fileStatesDrawable[buttonState + 5][buttonPressed ? 1 : 0];
}
return buttonState == 1 ? Theme.chat_photoStatesDrawables[5][0] : null;
}
示例3: getDrawableForCurrentState
import org.telegram.ui.ActionBar.Theme; //导入方法依赖的package包/类
private Drawable getDrawableForCurrentState() {
if (documentAttachType == DOCUMENT_ATTACH_TYPE_AUDIO || documentAttachType == DOCUMENT_ATTACH_TYPE_MUSIC) {
if (buttonState == -1) {
return null;
}
radialProgress.setAlphaForPrevious(false);
return Theme.chat_fileStatesDrawable[currentMessageObject.isOutOwner() ? buttonState : buttonState + 5][isDrawSelectedBackground() || buttonPressed != 0 ? 1 : 0];
} else {
if (documentAttachType == DOCUMENT_ATTACH_TYPE_DOCUMENT && !drawPhotoImage) {
radialProgress.setAlphaForPrevious(false);
if (buttonState == -1) {
return Theme.chat_fileStatesDrawable[currentMessageObject.isOutOwner() ? 3 : 8][isDrawSelectedBackground() ? 1 : 0];
} else if (buttonState == 0) {
return Theme.chat_fileStatesDrawable[currentMessageObject.isOutOwner() ? 2 : 7][isDrawSelectedBackground() ? 1 : 0];
} else if (buttonState == 1) {
return Theme.chat_fileStatesDrawable[currentMessageObject.isOutOwner() ? 4 : 9][isDrawSelectedBackground() ? 1 : 0];
}
} else {
radialProgress.setAlphaForPrevious(true);
if (buttonState >= 0 && buttonState < 4) {
if (documentAttachType == DOCUMENT_ATTACH_TYPE_DOCUMENT) {
int image = buttonState;
if (buttonState == 0) {
image = currentMessageObject.isOutOwner() ? 7 : 10;
} else if (buttonState == 1) {
image = currentMessageObject.isOutOwner() ? 8 : 11;
}
return Theme.chat_photoStatesDrawables[image][isDrawSelectedBackground() || buttonPressed != 0 ? 1 : 0];
} else {
return Theme.chat_photoStatesDrawables[buttonState][buttonPressed];
}
} else if (buttonState == -1 && documentAttachType == DOCUMENT_ATTACH_TYPE_DOCUMENT) {
return Theme.chat_photoStatesDrawables[currentMessageObject.isOutOwner() ? 9 : 12][isDrawSelectedBackground() ? 1 : 0];
}
}
}
return null;
}
示例4: onDraw
import org.telegram.ui.ActionBar.Theme; //导入方法依赖的package包/类
@Override
protected void onDraw(Canvas canvas) {
if (currentMessageObject == null) {
return;
}
if (!wasLayout) {
requestLayout();
return;
}
setDrawableBounds(Theme.chat_msgInMediaDrawable, 0, 0, getMeasuredWidth(), getMeasuredHeight());
Theme.chat_msgInMediaDrawable.draw(canvas);
if (currentMessageObject == null) {
return;
}
canvas.save();
if (buttonState == 0 || buttonState == 1) {
canvas.translate(seekBarX, seekBarY);
seekBar.draw(canvas);
} else {
canvas.translate(seekBarX + AndroidUtilities.dp(12), seekBarY);
progressView.draw(canvas);
}
canvas.restore();
int state = buttonState + 5;
timePaint.setColor(0xffa1aab3);
Drawable buttonDrawable = Theme.chat_fileStatesDrawable[state][buttonPressed];
int side = AndroidUtilities.dp(36);
int x = (side - buttonDrawable.getIntrinsicWidth()) / 2;
int y = (side - buttonDrawable.getIntrinsicHeight()) / 2;
setDrawableBounds(buttonDrawable, x + buttonX, y + buttonY);
buttonDrawable.draw(canvas);
canvas.save();
canvas.translate(timeX, AndroidUtilities.dp(18));
timeLayout.draw(canvas);
canvas.restore();
}