当前位置: 首页>>代码示例>>Java>>正文


Java Theme.getColor方法代码示例

本文整理汇总了Java中org.telegram.ui.ActionBar.Theme.getColor方法的典型用法代码示例。如果您正苦于以下问题:Java Theme.getColor方法的具体用法?Java Theme.getColor怎么用?Java Theme.getColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.telegram.ui.ActionBar.Theme的用法示例。


在下文中一共展示了Theme.getColor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onDraw

import org.telegram.ui.ActionBar.Theme; //导入方法依赖的package包/类
@Override
protected void onDraw(Canvas canvas) {
    int x = (canvas.getWidth() - width) / 2;
    int y = AndroidUtilities.dp(4);
    Theme.chat_msgInMediaShadowDrawable.setBounds(x, y, width + x, height + y);
    Theme.chat_msgInMediaShadowDrawable.draw(canvas);
    Theme.chat_msgInMediaDrawable.setBounds(x, y, width + x, height + y);
    Theme.chat_msgInMediaDrawable.draw(canvas);
    Theme.chat_msgTextPaint.setColor(Theme.getColor(Theme.key_chat_messageTextIn));
    Theme.chat_msgTextPaint.linkColor = Theme.getColor(Theme.key_chat_messageLinkIn);
    canvas.save();
    canvas.translate(textX = AndroidUtilities.dp(2 + 9) + x, textY = AndroidUtilities.dp(2 + 9) + y);
    if (pressedLink != null) {
        canvas.drawPath(urlPath, Theme.chat_urlPaint);
    }
    if (textLayout != null) {
        textLayout.draw(canvas);
    }
    canvas.restore();
}
 
开发者ID:DrKLO,项目名称:Telegram,代码行数:21,代码来源:BotHelpCell.java

示例2: onDraw

import org.telegram.ui.ActionBar.Theme; //导入方法依赖的package包/类
@Override
protected void onDraw(Canvas canvas) {
    LocationController.SharingLocationInfo currentInfo = LocationController.getInstance().getSharingLocationInfo(dialogId);
    if (currentInfo == null) {
        return;
    }
    int currentTime = ConnectionsManager.getInstance().getCurrentTime();
    if (currentInfo.stopTime < currentTime) {
        return;
    }

    float progress = Math.abs(currentInfo.stopTime - currentTime) / (float) currentInfo.period;
    if (LocaleController.isRTL) {
        rect.set(AndroidUtilities.dp(13), AndroidUtilities.dp(18), AndroidUtilities.dp(43), AndroidUtilities.dp(48));
    } else {
        rect.set(getMeasuredWidth() - AndroidUtilities.dp(43), AndroidUtilities.dp(18), getMeasuredWidth() - AndroidUtilities.dp(13), AndroidUtilities.dp(48));
    }

    int color = Theme.getColor(Theme.key_location_liveLocationProgress);
    Theme.chat_radialProgress2Paint.setColor(color);
    Theme.chat_livePaint.setColor(color);

    canvas.drawArc(rect, -90, -360 * progress, false, Theme.chat_radialProgress2Paint);

    String text = LocaleController.formatLocationLeftTime(Math.abs(currentInfo.stopTime - currentTime));

    float size = Theme.chat_livePaint.measureText(text);

    canvas.drawText(text, rect.centerX() - size / 2, AndroidUtilities.dp(37), Theme.chat_livePaint);
}
 
开发者ID:DrKLO,项目名称:Telegram,代码行数:31,代码来源:SendLocationCell.java

示例3: ManageChatUserCell

import org.telegram.ui.ActionBar.Theme; //导入方法依赖的package包/类
public ManageChatUserCell(Context context, int padding, boolean needOption) {
    super(context);

    statusColor = Theme.getColor(Theme.key_windowBackgroundWhiteGrayText);
    statusOnlineColor = Theme.getColor(Theme.key_windowBackgroundWhiteBlueText);

    avatarDrawable = new AvatarDrawable();

    avatarImageView = new BackupImageView(context);
    avatarImageView.setRoundRadius(AndroidUtilities.dp(24));
    addView(avatarImageView, LayoutHelper.createFrame(48, 48, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 0 : 7 + padding, 8, LocaleController.isRTL ? 7 + padding : 0, 0));

    nameTextView = new SimpleTextView(context);
    nameTextView.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
    nameTextView.setTextSize(17);
    nameTextView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
    nameTextView.setGravity((LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP);
    addView(nameTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 20, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 28 + 18 : (68 + padding), 11.5f, LocaleController.isRTL ? (68 + padding) : 28 + 18, 0));

    statusTextView = new SimpleTextView(context);
    statusTextView.setTextSize(14);
    statusTextView.setGravity((LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP);
    addView(statusTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 20, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 28 : (68 + padding), 34.5f, LocaleController.isRTL ? (68 + padding) : 28, 0));

    if (needOption) {
        optionsButton = new ImageView(context);
        optionsButton.setFocusable(false);
        optionsButton.setBackgroundDrawable(Theme.createSelectorDrawable(Theme.getColor(Theme.key_stickers_menuSelector)));
        optionsButton.setImageResource(R.drawable.ic_ab_other);
        optionsButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_stickers_menu), PorterDuff.Mode.MULTIPLY));
        optionsButton.setScaleType(ImageView.ScaleType.CENTER);
        addView(optionsButton, LayoutHelper.createFrame(48, 64, (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.TOP));
        optionsButton.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                delegate.onOptionsButtonCheck(ManageChatUserCell.this, true);
            }
        });
    }
}
 
开发者ID:DrKLO,项目名称:Telegram,代码行数:41,代码来源:ManageChatUserCell.java

示例4: RadialProgressView

import org.telegram.ui.ActionBar.Theme; //导入方法依赖的package包/类
public RadialProgressView(Context context) {
    super(context);

    size = AndroidUtilities.dp(40);

    progressColor = Theme.getColor(Theme.key_progressCircle);
    decelerateInterpolator = new DecelerateInterpolator();
    accelerateInterpolator = new AccelerateInterpolator();
    progressPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
    progressPaint.setStyle(Paint.Style.STROKE);
    progressPaint.setStrokeCap(Paint.Cap.ROUND);
    progressPaint.setStrokeWidth(AndroidUtilities.dp(3));
    progressPaint.setColor(progressColor);
}
 
开发者ID:DrKLO,项目名称:Telegram,代码行数:15,代码来源:RadialProgressView.java

示例5: updateColors

import org.telegram.ui.ActionBar.Theme; //导入方法依赖的package包/类
private void updateColors() {
    int inactive = Theme.getColor(Theme.key_fastScrollInactive);
    int active = Theme.getColor(Theme.key_fastScrollActive);
    paint.setColor(inactive);
    letterPaint.setColor(Theme.getColor(Theme.key_fastScrollText));
    colors[0] = Color.red(inactive);
    colors[1] = Color.red(active);
    colors[2] = Color.green(inactive);
    colors[3] = Color.green(active);
    colors[4] = Color.blue(inactive);
    colors[5] = Color.blue(active);
    invalidate();
}
 
开发者ID:DrKLO,项目名称:Telegram,代码行数:14,代码来源:RecyclerListView.java

示例6: updateColors

import org.telegram.ui.ActionBar.Theme; //导入方法依赖的package包/类
public void updateColors() {
    int color = Theme.getColor(Theme.key_avatar_backgroundGroupCreateSpanBlue);
    int back = Theme.getColor(Theme.key_groupcreate_spanBackground);
    int text = Theme.getColor(Theme.key_groupcreate_spanText);
    colors[0] = Color.red(back);
    colors[1] = Color.red(color);
    colors[2] = Color.green(back);
    colors[3] = Color.green(color);
    colors[4] = Color.blue(back);
    colors[5] = Color.blue(color);
    textPaint.setColor(text);
    deleteDrawable.setColorFilter(new PorterDuffColorFilter(text, PorterDuff.Mode.MULTIPLY));
    backPaint.setColor(back);
    avatarDrawable.setColor(AvatarDrawable.getColorForId(5));
}
 
开发者ID:DrKLO,项目名称:Telegram,代码行数:16,代码来源:GroupCreateSpan.java

示例7: setAnimationProgress

import org.telegram.ui.ActionBar.Theme; //导入方法依赖的package包/类
@Keep
public void setAnimationProgress(float progress) {
    animationProgress = progress;
    listView.setAlpha(progress);

    listView.setTranslationX(AndroidUtilities.dp(48) - AndroidUtilities.dp(48) * progress);
    int color = AvatarDrawable.getProfileBackColorForId(user_id != 0 || ChatObject.isChannel(chat_id) && !currentChat.megagroup ? 5 : chat_id);

    int actionBarColor = Theme.getColor(Theme.key_actionBarDefault);
    int r = Color.red(actionBarColor);
    int g = Color.green(actionBarColor);
    int b = Color.blue(actionBarColor);
    int a;

    int rD = (int) ((Color.red(color) - r) * progress);
    int gD = (int) ((Color.green(color) - g) * progress);
    int bD = (int) ((Color.blue(color) - b) * progress);
    int aD;
    topView.setBackgroundColor(Color.rgb(r + rD, g + gD, b + bD));

    color = AvatarDrawable.getIconColorForId(user_id != 0 || ChatObject.isChannel(chat_id) && !currentChat.megagroup ? 5 : chat_id);
    int iconColor = Theme.getColor(Theme.key_actionBarDefaultIcon);
    r = Color.red(iconColor);
    g = Color.green(iconColor);
    b = Color.blue(iconColor);

    rD = (int) ((Color.red(color) - r) * progress);
    gD = (int) ((Color.green(color) - g) * progress);
    bD = (int) ((Color.blue(color) - b) * progress);
    actionBar.setItemsColor(Color.rgb(r + rD, g + gD, b + bD), false);

    color = Theme.getColor(Theme.key_profile_title);
    int titleColor = Theme.getColor(Theme.key_actionBarDefaultTitle);
    r = Color.red(titleColor);
    g = Color.green(titleColor);
    b = Color.blue(titleColor);
    a = Color.alpha(titleColor);

    rD = (int) ((Color.red(color) - r) * progress);
    gD = (int) ((Color.green(color) - g) * progress);
    bD = (int) ((Color.blue(color) - b) * progress);
    aD = (int) ((Color.alpha(color) - a) * progress);
    for (int i = 0; i < 2; i++) {
        if (nameTextView[i] == null) {
            continue;
        }
        nameTextView[i].setTextColor(Color.argb(a + aD, r + rD, g + gD, b + bD));
    }

    color = AvatarDrawable.getProfileTextColorForId(user_id != 0 || ChatObject.isChannel(chat_id) && !currentChat.megagroup ? 5 : chat_id);
    int subtitleColor = Theme.getColor(Theme.key_actionBarDefaultSubtitle);
    r = Color.red(subtitleColor);
    g = Color.green(subtitleColor);
    b = Color.blue(subtitleColor);
    a = Color.alpha(subtitleColor);

    rD = (int) ((Color.red(color) - r) * progress);
    gD = (int) ((Color.green(color) - g) * progress);
    bD = (int) ((Color.blue(color) - b) * progress);
    aD = (int) ((Color.alpha(color) - a) * progress);
    for (int i = 0; i < 2; i++) {
        if (onlineTextView[i] == null) {
            continue;
        }
        onlineTextView[i].setTextColor(Color.argb(a + aD, r + rD, g + gD, b + bD));
    }
    extraHeight = (int) (initialAnimationExtraHeight * progress);
    color = AvatarDrawable.getProfileColorForId(user_id != 0 ? user_id : chat_id);
    int color2 = AvatarDrawable.getColorForId(user_id != 0 ? user_id : chat_id);
    if (color != color2) {
        rD = (int) ((Color.red(color) - Color.red(color2)) * progress);
        gD = (int) ((Color.green(color) - Color.green(color2)) * progress);
        bD = (int) ((Color.blue(color) - Color.blue(color2)) * progress);
        avatarDrawable.setColor(Color.rgb(Color.red(color2) + rD, Color.green(color2) + gD, Color.blue(color2) + bD));
        avatarImage.invalidate();
    }

    needLayout();
}
 
开发者ID:DrKLO,项目名称:Telegram,代码行数:80,代码来源:ProfileActivity.java

示例8: UserCell

import org.telegram.ui.ActionBar.Theme; //导入方法依赖的package包/类
public UserCell(Context context, int padding, int checkbox, boolean admin) {
    super(context);

    statusColor = Theme.getColor(Theme.key_windowBackgroundWhiteGrayText);
    statusOnlineColor = Theme.getColor(Theme.key_windowBackgroundWhiteBlueText);

    avatarDrawable = new AvatarDrawable();

    avatarImageView = new BackupImageView(context);
    avatarImageView.setRoundRadius(AndroidUtilities.dp(24));
    addView(avatarImageView, LayoutHelper.createFrame(48, 48, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 0 : 7 + padding, 8, LocaleController.isRTL ? 7 + padding : 0, 0));

    nameTextView = new SimpleTextView(context);
    nameTextView.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
    nameTextView.setTextSize(17);
    nameTextView.setGravity((LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP);
    addView(nameTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 20, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 28 + (checkbox == 2 ? 18 : 0) : (68 + padding), 11.5f, LocaleController.isRTL ? (68 + padding) : 28 + (checkbox == 2 ? 18 : 0), 0));

    statusTextView = new SimpleTextView(context);
    statusTextView.setTextSize(14);
    statusTextView.setGravity((LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP);
    addView(statusTextView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 20, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 28 : (68 + padding), 34.5f, LocaleController.isRTL ? (68 + padding) : 28, 0));

    imageView = new ImageView(context);
    imageView.setScaleType(ImageView.ScaleType.CENTER);
    imageView.setVisibility(GONE);
    addView(imageView, LayoutHelper.createFrame(LayoutParams.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.CENTER_VERTICAL, LocaleController.isRTL ? 0 : 16, 0, LocaleController.isRTL ? 16 : 0, 0));

    if (checkbox == 2) {
        checkBoxBig = new CheckBoxSquare(context, false);
        addView(checkBoxBig, LayoutHelper.createFrame(18, 18, (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.CENTER_VERTICAL, LocaleController.isRTL ? 19 : 0, 0, LocaleController.isRTL ? 0 : 19, 0));
    } else if (checkbox == 1) {
        checkBox = new CheckBox(context, R.drawable.round_check2);
        checkBox.setVisibility(INVISIBLE);
        checkBox.setColor(Theme.getColor(Theme.key_checkbox), Theme.getColor(Theme.key_checkboxCheck));
        addView(checkBox, LayoutHelper.createFrame(22, 22, (LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT) | Gravity.TOP, LocaleController.isRTL ? 0 : 37 + padding, 38, LocaleController.isRTL ? 37 + padding : 0, 0));
    }

    if (admin) {
        adminImage = new ImageView(context);
        adminImage.setImageResource(R.drawable.admin_star);
        addView(adminImage, LayoutHelper.createFrame(16, 16, (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.TOP, LocaleController.isRTL ? 24 : 0, 13.5f, LocaleController.isRTL ? 0 : 24, 0));
    }
}
 
开发者ID:DrKLO,项目名称:Telegram,代码行数:45,代码来源:UserCell.java

示例9: onDraw

import org.telegram.ui.ActionBar.Theme; //导入方法依赖的package包/类
@Override
protected void onDraw(Canvas canvas) {
    Drawable backgroundDrawable = Theme.getCachedWallpaper();
    int color;
    if (Theme.hasThemeKey(Theme.key_chats_menuTopShadow)) {
        color = Theme.getColor(Theme.key_chats_menuTopShadow);
    } else {
        color = Theme.getServiceMessageColor() | 0xff000000;
    }
    if (currentColor == null || currentColor != color) {
        currentColor = color;
        shadowView.getDrawable().setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY));
    }
    nameTextView.setTextColor(Theme.getColor(Theme.key_chats_menuName));
    if (Theme.isCustomTheme() && backgroundDrawable != null) {
        phoneTextView.setTextColor(Theme.getColor(Theme.key_chats_menuPhone));
        shadowView.setVisibility(VISIBLE);
        if (backgroundDrawable instanceof ColorDrawable) {
            backgroundDrawable.setBounds(0, 0, getMeasuredWidth(), getMeasuredHeight());
            backgroundDrawable.draw(canvas);
        } else if (backgroundDrawable instanceof BitmapDrawable) {
            Bitmap bitmap = ((BitmapDrawable) backgroundDrawable).getBitmap();
            float scaleX = (float) getMeasuredWidth() / (float) bitmap.getWidth();
            float scaleY = (float) getMeasuredHeight() / (float) bitmap.getHeight();
            float scale = scaleX < scaleY ? scaleY : scaleX;
            int width = (int) (getMeasuredWidth() / scale);
            int height = (int) (getMeasuredHeight() / scale);
            int x = (bitmap.getWidth() - width) / 2;
            int y = (bitmap.getHeight() - height) / 2;
            srcRect.set(x, y, x + width, y + height);
            destRect.set(0, 0, getMeasuredWidth(), getMeasuredHeight());
            try {
                canvas.drawBitmap(bitmap, srcRect, destRect, paint);
            } catch (Throwable e) {
                FileLog.e(e);
            }
        }
    } else {
        shadowView.setVisibility(INVISIBLE);
        phoneTextView.setTextColor(Theme.getColor(Theme.key_chats_menuPhoneCats));
        super.onDraw(canvas);
    }
}
 
开发者ID:DrKLO,项目名称:Telegram,代码行数:44,代码来源:DrawerProfileCell.java

示例10: onDraw

import org.telegram.ui.ActionBar.Theme; //导入方法依赖的package包/类
@Override
protected void onDraw(Canvas canvas) {
    if (currentInfo == null && liveLocation == null) {
        return;
    }
    int stopTime;
    int period;
    if (currentInfo != null) {
        stopTime = currentInfo.stopTime;
        period = currentInfo.period;
    } else {
        stopTime = liveLocation.object.date + liveLocation.object.media.period;
        period = liveLocation.object.media.period;
    }
    int currentTime = ConnectionsManager.getInstance().getCurrentTime();
    if (stopTime < currentTime) {
        return;
    }
    float progress = Math.abs(stopTime - currentTime) / (float) period;
    if (LocaleController.isRTL) {
        rect.set(AndroidUtilities.dp(13), AndroidUtilities.dp(distanceTextView != null ? 18 : 12), AndroidUtilities.dp(43), AndroidUtilities.dp(distanceTextView != null ? 48 : 42));
    } else {
        rect.set(getMeasuredWidth() - AndroidUtilities.dp(43), AndroidUtilities.dp(distanceTextView != null ? 18 : 12), getMeasuredWidth() - AndroidUtilities.dp(13), AndroidUtilities.dp(distanceTextView != null ? 48 : 42));
    }

    int color;
    if (distanceTextView == null) {
        color = Theme.getColor(Theme.key_dialog_liveLocationProgress);
    } else {
        color = Theme.getColor(Theme.key_location_liveLocationProgress);
    }
    Theme.chat_radialProgress2Paint.setColor(color);
    Theme.chat_livePaint.setColor(color);

    canvas.drawArc(rect, -90, -360 * progress, false, Theme.chat_radialProgress2Paint);

    String text = LocaleController.formatLocationLeftTime(stopTime - currentTime);

    float size = Theme.chat_livePaint.measureText(text);

    canvas.drawText(text, rect.centerX() - size / 2, AndroidUtilities.dp(distanceTextView != null ? 37 : 31), Theme.chat_livePaint);
}
 
开发者ID:DrKLO,项目名称:Telegram,代码行数:43,代码来源:SharingLiveLocationCell.java

示例11: onDraw

import org.telegram.ui.ActionBar.Theme; //导入方法依赖的package包/类
@Override
protected void onDraw(Canvas canvas) {
    if (getVisibility() != VISIBLE) {
        return;
    }

    float checkProgress;
    float bounceProgress;
    int uncheckedColor = Theme.getColor(isAlert ? Theme.key_dialogCheckboxSquareUnchecked : Theme.key_checkboxSquareUnchecked);
    int color = Theme.getColor(isAlert ? Theme.key_dialogCheckboxSquareBackground : Theme.key_checkboxSquareBackground);
    if (progress <= 0.5f) {
        bounceProgress = checkProgress = progress / 0.5f;
        int rD = (int) ((Color.red(color) - Color.red(uncheckedColor)) * checkProgress);
        int gD = (int) ((Color.green(color) - Color.green(uncheckedColor)) * checkProgress);
        int bD = (int) ((Color.blue(color) - Color.blue(uncheckedColor)) * checkProgress);
        int c = Color.rgb(Color.red(uncheckedColor) + rD, Color.green(uncheckedColor) + gD, Color.blue(uncheckedColor) + bD);
        Theme.checkboxSquare_backgroundPaint.setColor(c);
    } else {
        bounceProgress = 2.0f - progress / 0.5f;
        checkProgress = 1.0f;
        Theme.checkboxSquare_backgroundPaint.setColor(color);
    }
    if (isDisabled) {
        Theme.checkboxSquare_backgroundPaint.setColor(Theme.getColor(isAlert ? Theme.key_dialogCheckboxSquareDisabled : Theme.key_checkboxSquareDisabled));
    }
    float bounce = AndroidUtilities.dp(1) * bounceProgress;
    rectF.set(bounce, bounce, AndroidUtilities.dp(18) - bounce, AndroidUtilities.dp(18) - bounce);

    drawBitmap.eraseColor(0);
    drawCanvas.drawRoundRect(rectF, AndroidUtilities.dp(2), AndroidUtilities.dp(2), Theme.checkboxSquare_backgroundPaint);

    if (checkProgress != 1) {
        float rad = Math.min(AndroidUtilities.dp(7), AndroidUtilities.dp(7) * checkProgress + bounce);
        rectF.set(AndroidUtilities.dp(2) + rad, AndroidUtilities.dp(2) + rad, AndroidUtilities.dp(16) - rad, AndroidUtilities.dp(16) - rad);
        drawCanvas.drawRect(rectF, Theme.checkboxSquare_eraserPaint);
    }

    if (progress > 0.5f) {
        Theme.checkboxSquare_checkPaint.setColor(Theme.getColor(isAlert ? Theme.key_dialogCheckboxSquareCheck : Theme.key_checkboxSquareCheck));
        int endX = (int) (AndroidUtilities.dp(7.5f) - AndroidUtilities.dp(5) * (1.0f - bounceProgress));
        int endY = (int) (AndroidUtilities.dpf2(13.5f) - AndroidUtilities.dp(5) * (1.0f - bounceProgress));
        drawCanvas.drawLine(AndroidUtilities.dp(7.5f), (int) AndroidUtilities.dpf2(13.5f), endX, endY, Theme.checkboxSquare_checkPaint);
        endX = (int) (AndroidUtilities.dpf2(6.5f) + AndroidUtilities.dp(9) * (1.0f - bounceProgress));
        endY = (int) (AndroidUtilities.dpf2(13.5f) - AndroidUtilities.dp(9) * (1.0f - bounceProgress));
        drawCanvas.drawLine((int) AndroidUtilities.dpf2(6.5f), (int) AndroidUtilities.dpf2(13.5f), endX, endY, Theme.checkboxSquare_checkPaint);
    }
    canvas.drawBitmap(drawBitmap, 0, 0, null);
}
 
开发者ID:DrKLO,项目名称:Telegram,代码行数:49,代码来源:CheckBoxSquare.java

示例12: getColorForId

import org.telegram.ui.ActionBar.Theme; //导入方法依赖的package包/类
public static int getColorForId(int id) {
    return Theme.getColor(Theme.keys_avatar_background[getColorIndex(id)]);
}
 
开发者ID:DrKLO,项目名称:Telegram,代码行数:4,代码来源:AvatarDrawable.java

示例13: getButtonColorForId

import org.telegram.ui.ActionBar.Theme; //导入方法依赖的package包/类
public static int getButtonColorForId(int id) {
    return Theme.getColor(Theme.keys_avatar_actionBarSelector[getColorIndex(id)]);
}
 
开发者ID:DrKLO,项目名称:Telegram,代码行数:4,代码来源:AvatarDrawable.java

示例14: getIconColorForId

import org.telegram.ui.ActionBar.Theme; //导入方法依赖的package包/类
public static int getIconColorForId(int id) {
    return Theme.getColor(Theme.keys_avatar_actionBarIcon[getColorIndex(id)]);
}
 
开发者ID:DrKLO,项目名称:Telegram,代码行数:4,代码来源:AvatarDrawable.java

示例15: getProfileColorForId

import org.telegram.ui.ActionBar.Theme; //导入方法依赖的package包/类
public static int getProfileColorForId(int id) {
    return Theme.getColor(Theme.keys_avatar_backgroundInProfile[getColorIndex(id)]);
}
 
开发者ID:DrKLO,项目名称:Telegram,代码行数:4,代码来源:AvatarDrawable.java


注:本文中的org.telegram.ui.ActionBar.Theme.getColor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。