Search in sources :

Example 1 with ChoosingStickerStatusDrawable

use of org.telegram.ui.Components.ChoosingStickerStatusDrawable in project Telegram-FOSS by Telegram-FOSS-Team.

the class Theme method getChatStatusDrawable.

public static StatusDrawable getChatStatusDrawable(int type) {
    if (type < 0 || type > 5) {
        return null;
    }
    StatusDrawable statusDrawable = chat_status_drawables[type];
    if (statusDrawable != null) {
        return statusDrawable;
    }
    switch(type) {
        case 0:
            chat_status_drawables[0] = new TypingDotsDrawable(true);
            break;
        case 1:
            chat_status_drawables[1] = new RecordStatusDrawable(true);
            break;
        case 2:
            chat_status_drawables[2] = new SendingFileDrawable(true);
            break;
        case 3:
            chat_status_drawables[3] = new PlayingGameDrawable(true, null);
            break;
        case 4:
            chat_status_drawables[4] = new RoundStatusDrawable(true);
            break;
        case 5:
            chat_status_drawables[5] = new ChoosingStickerStatusDrawable(true);
            break;
    }
    statusDrawable = chat_status_drawables[type];
    statusDrawable.start();
    statusDrawable.setColor(getColor(key_chats_actionMessage));
    return statusDrawable;
}
Also used : ChoosingStickerStatusDrawable(org.telegram.ui.Components.ChoosingStickerStatusDrawable) RecordStatusDrawable(org.telegram.ui.Components.RecordStatusDrawable) RoundStatusDrawable(org.telegram.ui.Components.RoundStatusDrawable) PlayingGameDrawable(org.telegram.ui.Components.PlayingGameDrawable) StatusDrawable(org.telegram.ui.Components.StatusDrawable) RoundStatusDrawable(org.telegram.ui.Components.RoundStatusDrawable) ChoosingStickerStatusDrawable(org.telegram.ui.Components.ChoosingStickerStatusDrawable) RecordStatusDrawable(org.telegram.ui.Components.RecordStatusDrawable) SendingFileDrawable(org.telegram.ui.Components.SendingFileDrawable) TypingDotsDrawable(org.telegram.ui.Components.TypingDotsDrawable)

Aggregations

ChoosingStickerStatusDrawable (org.telegram.ui.Components.ChoosingStickerStatusDrawable)1 PlayingGameDrawable (org.telegram.ui.Components.PlayingGameDrawable)1 RecordStatusDrawable (org.telegram.ui.Components.RecordStatusDrawable)1 RoundStatusDrawable (org.telegram.ui.Components.RoundStatusDrawable)1 SendingFileDrawable (org.telegram.ui.Components.SendingFileDrawable)1 StatusDrawable (org.telegram.ui.Components.StatusDrawable)1 TypingDotsDrawable (org.telegram.ui.Components.TypingDotsDrawable)1