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


Java PaletteUtils.getSolidColor方法代码示例

本文整理汇总了Java中com.github.johnpersano.supertoasts.library.utils.PaletteUtils.getSolidColor方法的典型用法代码示例。如果您正苦于以下问题:Java PaletteUtils.getSolidColor方法的具体用法?Java PaletteUtils.getSolidColor怎么用?Java PaletteUtils.getSolidColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.github.johnpersano.supertoasts.library.utils.PaletteUtils的用法示例。


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

示例1: getColor

import com.github.johnpersano.supertoasts.library.utils.PaletteUtils; //导入方法依赖的package包/类
public static int getColor(Context context) {
    switch (PreferenceManager.getDefaultSharedPreferences(context).getInt(context
            .getResources().getString(R.string.color_title), 0)) {
        case 0: return PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_RED);
        case 1: return PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_PINK);
        case 2: return PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_PURPLE);
        case 3: return PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_DEEP_PURPLE);
        case 4: return PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_INDIGO);
        case 5: return PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_BLUE);
        case 6: return PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_LIGHT_BLUE);
        case 7: return PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_CYAN);
        case 8: return PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_TEAL);
        case 9: return PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_GREEN);
        case 10: return PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_LIGHT_GREEN);
        case 11: return PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_LIME);
        case 12: return PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_YELLOW);
        case 13: return PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_AMBER);
        case 14: return PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_ORANGE);
        case 15: return PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_DEEP_ORANGE);
        case 16: return PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_BROWN);
        case 17: return PaletteUtils.getSolidColor(PaletteUtils.GREY);
        case 18: return PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_BLUE_GREY);
        default: return PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_BLUE_GREY);
    }
}
 
开发者ID:JohnPersano,项目名称:SuperToasts,代码行数:26,代码来源:AttributeUtils.java

示例2: Style

import com.github.johnpersano.supertoasts.library.utils.PaletteUtils; //导入方法依赖的package包/类
/**
 * Public constructor for a new {@link Style}.
 * This constructor will assign a few default values.
 */
public Style() {
    // General SuperToast items
    this.duration = DURATION_MEDIUM;
    this.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_GREY);
    this.gravity = Gravity.BOTTOM | Gravity.CENTER;
    this.yOffset = BackgroundUtils.convertToDIP(64);
    this.width = FrameLayout.LayoutParams.WRAP_CONTENT;
    this.height = FrameLayout.LayoutParams.WRAP_CONTENT;
    this.priorityLevel = PRIORITY_MEDIUM;

    // Message TextView items
    this.messageTypefaceStyle = Typeface.NORMAL;
    this.messageTextColor = PaletteUtils.getSolidColor(PaletteUtils.WHITE);
    this.messageTextSize = TEXTSIZE_SMALL;
    this.messageIconPosition = ICONPOSITION_LEFT;

    // SuperActivityToast Button items
    this.buttonTypefaceStyle = Typeface.BOLD;
    this.buttonTextColor = PaletteUtils.getSolidColor(PaletteUtils.WHITE);
    this.buttonTextSize = TEXTSIZE_VERY_SMALL;
    this.buttonDividerColor = PaletteUtils.getSolidColor(PaletteUtils.WHITE);

    //SuperActivityToast Progress items
    this.progressBarColor = PaletteUtils.getSolidColor(PaletteUtils.WHITE);
    this.progressIndeterminate = true;
}
 
开发者ID:heshshark,项目名称:ToastUI,代码行数:31,代码来源:Style.java

示例3: lime

import com.github.johnpersano.supertoasts.library.utils.PaletteUtils; //导入方法依赖的package包/类
/**
 * Default material lime transparent style for SuperToasts.
 * @return A new Style
 */
public static Style lime() {
    final Style style = new Style();
    style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_LIME);
    style.messageTextColor = PaletteUtils.getSolidColor(PaletteUtils.DARK_GREY);
    style.buttonDividerColor = PaletteUtils.getSolidColor(PaletteUtils.DARK_GREY);
    style.buttonTextColor = PaletteUtils.getSolidColor(PaletteUtils.DARK_GREY);
    return style;
}
 
开发者ID:heshshark,项目名称:ToastUI,代码行数:13,代码来源:Style.java

示例4: yellow

import com.github.johnpersano.supertoasts.library.utils.PaletteUtils; //导入方法依赖的package包/类
/**
 * Default material yellow transparent style for SuperToasts.
 * @return A new Style
 */
public static Style yellow() {
    final Style style = new Style();
    style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_YELLOW);
    style.messageTextColor = PaletteUtils.getSolidColor(PaletteUtils.DARK_GREY);
    style.buttonDividerColor = PaletteUtils.getSolidColor(PaletteUtils.DARK_GREY);
    style.buttonTextColor = PaletteUtils.getSolidColor(PaletteUtils.DARK_GREY);
    return style;
}
 
开发者ID:heshshark,项目名称:ToastUI,代码行数:13,代码来源:Style.java

示例5: rottenBanana

import com.github.johnpersano.supertoasts.library.utils.PaletteUtils; //导入方法依赖的package包/类
/**
 * Default material rotten banana transparent style for SuperToasts.
 * @return A new Style
 */
public static Style rottenBanana() {
    final Style style = new Style();
    style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_YELLOW);
    style.frame = FRAME_LOLLIPOP;
    style.messageTextColor = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_BROWN);
    style.buttonDividerColor = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_BROWN);
    style.buttonTextColor = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_BROWN);
    style.priorityColor = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_BROWN);
    return style;
}
 
开发者ID:heshshark,项目名称:ToastUI,代码行数:15,代码来源:Style.java

示例6: Style

import com.github.johnpersano.supertoasts.library.utils.PaletteUtils; //导入方法依赖的package包/类
/**
 * Public constructor for a new {@link com.github.johnpersano.supertoasts.library.Style}.
 * This constructor will assign a few default values.
 */
public Style() {
    // General SuperToast items
    this.duration = DURATION_MEDIUM;
    this.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_GREY);
    this.gravity = Gravity.BOTTOM | Gravity.CENTER;
    this.yOffset = BackgroundUtils.convertToDIP(64);
    this.width = FrameLayout.LayoutParams.WRAP_CONTENT;
    this.height = FrameLayout.LayoutParams.WRAP_CONTENT;
    this.priorityLevel = PRIORITY_MEDIUM;

    // Message TextView items
    this.messageTypefaceStyle = Typeface.NORMAL;
    this.messageTextColor = PaletteUtils.getSolidColor(PaletteUtils.WHITE);
    this.messageTextSize = TEXTSIZE_SMALL;
    this.messageIconPosition = ICONPOSITION_LEFT;

    // SuperActivityToast Button items
    this.buttonTypefaceStyle = Typeface.BOLD;
    this.buttonTextColor = PaletteUtils.getSolidColor(PaletteUtils.WHITE);
    this.buttonTextSize = TEXTSIZE_VERY_SMALL;
    this.buttonDividerColor = PaletteUtils.getSolidColor(PaletteUtils.WHITE);

    //SuperActivityToast Progress items
    this.progressBarColor = PaletteUtils.getSolidColor(PaletteUtils.WHITE);
    this.progressIndeterminate = true;
}
 
开发者ID:JohnPersano,项目名称:SuperToasts,代码行数:31,代码来源:Style.java

示例7: red

import com.github.johnpersano.supertoasts.library.utils.PaletteUtils; //导入方法依赖的package包/类
/**
 * Default material red transparent style for SuperToasts.
 * @return A new Style
 */
public static Style red() {
    final Style style = new Style();
    style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_RED);
    return style;
}
 
开发者ID:heshshark,项目名称:ToastUI,代码行数:10,代码来源:Style.java

示例8: pink

import com.github.johnpersano.supertoasts.library.utils.PaletteUtils; //导入方法依赖的package包/类
/**
 * Default material pink transparent style for SuperToasts.
 * @return A new Style
 */
public static Style pink() {
    final Style style = new Style();
    style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_PINK);
    return style;
}
 
开发者ID:heshshark,项目名称:ToastUI,代码行数:10,代码来源:Style.java

示例9: purple

import com.github.johnpersano.supertoasts.library.utils.PaletteUtils; //导入方法依赖的package包/类
/**
 * Default material purple transparent style for SuperToasts.
 * @return A new Style
 */
public static Style purple() {
    final Style style = new Style();
    style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_PURPLE);
    return style;
}
 
开发者ID:heshshark,项目名称:ToastUI,代码行数:10,代码来源:Style.java

示例10: deepPurple

import com.github.johnpersano.supertoasts.library.utils.PaletteUtils; //导入方法依赖的package包/类
/**
 * Default material deep purple transparent style for SuperToasts.
 * @return A new Style
 */
public static Style deepPurple() {
    final Style style = new Style();
    style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_DEEP_PURPLE);
    return style;
}
 
开发者ID:heshshark,项目名称:ToastUI,代码行数:10,代码来源:Style.java

示例11: indigo

import com.github.johnpersano.supertoasts.library.utils.PaletteUtils; //导入方法依赖的package包/类
/**
 * Default material indigo transparent style for SuperToasts.
 * @return A new Style
 */
public static Style indigo() {
    final Style style = new Style();
    style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_INDIGO);
    return style;
}
 
开发者ID:heshshark,项目名称:ToastUI,代码行数:10,代码来源:Style.java

示例12: blue

import com.github.johnpersano.supertoasts.library.utils.PaletteUtils; //导入方法依赖的package包/类
/**
 * Default material blue transparent style for SuperToasts.
 * @return A new Style
 */
public static Style blue() {
    final Style style = new Style();
    style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_BLUE);
    return style;
}
 
开发者ID:heshshark,项目名称:ToastUI,代码行数:10,代码来源:Style.java

示例13: lightBlue

import com.github.johnpersano.supertoasts.library.utils.PaletteUtils; //导入方法依赖的package包/类
/**
 * Default material light blue transparent style for SuperToasts.
 * @return A new Style
 */
public static Style lightBlue() {
    final Style style = new Style();
    style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_LIGHT_BLUE);
    return style;
}
 
开发者ID:heshshark,项目名称:ToastUI,代码行数:10,代码来源:Style.java

示例14: cyan

import com.github.johnpersano.supertoasts.library.utils.PaletteUtils; //导入方法依赖的package包/类
/**
 * Default material cyan transparent style for SuperToasts.
 * @return A new Style
 */
public static Style cyan() {
    final Style style = new Style();
    style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_CYAN);
    return style;
}
 
开发者ID:heshshark,项目名称:ToastUI,代码行数:10,代码来源:Style.java

示例15: teal

import com.github.johnpersano.supertoasts.library.utils.PaletteUtils; //导入方法依赖的package包/类
/**
 * Default material teal transparent style for SuperToasts.
 * @return A new Style
 */
public static Style teal() {
    final Style style = new Style();
    style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_TEAL);
    return style;
}
 
开发者ID:heshshark,项目名称:ToastUI,代码行数:10,代码来源:Style.java


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