Example usage for android.graphics Typeface BOLD

List of usage examples for android.graphics Typeface BOLD

Introduction

In this page you can find the example usage for android.graphics Typeface BOLD.

Prototype

int BOLD

To view the source code for android.graphics Typeface BOLD.

Click Source Link

Usage

From source file:gr.sepals.eshop.info.gui.ThanksSlidePageFragment.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.fragment_info_thanks, container, false);

    title = (TextView) rootView.findViewById(R.id.info_thanks_title_textview);
    Typeface titleFont = Typeface.createFromAsset(getActivity().getAssets(), "fonts/GFS_Pyrsos.otf");
    title.setTypeface(titleFont, Typeface.BOLD);

    CheckBox hideInfo = (CheckBox) rootView.findViewById(R.id.hide_info_checkBox);
    Typeface descFont = Typeface.createFromAsset(getActivity().getAssets(), "fonts/GFS_Goschen-Italic.otf");
    hideInfo.setTypeface(descFont);/*from   w  w w .  j  a v a 2s.  co m*/
    hideInfo.setOnCheckedChangeListener(this);

    // update the fragment content
    hideInfo.setChecked(Settings.getBoolean(getActivity(), InternalDatabaseKeys.HIDE_INTRO_INFO, false));
    return rootView;
}

From source file:io.github.hidroh.materialistic.widget.PeekabooTouchHelperCallback.java

PeekabooTouchHelperCallback(Context context) {
    super(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT);
    mDefaultTextColor = ContextCompat.getColor(context,
            AppUtils.getThemedResId(context, android.R.attr.textColorPrimary));
    mPaint.setTextSize(context.getResources().getDimensionPixelSize(R.dimen.text_size_small));
    mPaint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));
    mPadding = context.getResources().getDimensionPixelSize(R.dimen.activity_horizontal_margin);
}

From source file:org.mariotaku.twidere.util.HtmlSpanBuilder.java

private static Object createSpan(TagInfo info) {
    switch (info.name.toLowerCase(Locale.US)) {
    case "a": {
        return new URLSpan(info.getAttribute("href"));
    }/*from  www. ja va  2s  . c  o m*/
    case "b":
    case "strong": {
        return new StyleSpan(Typeface.BOLD);
    }
    case "em":
    case "cite":
    case "dfn":
    case "i": {
        return new StyleSpan(Typeface.ITALIC);
    }
    }
    return null;
}

From source file:org.cyanogenmod.theme.chooser.FontPreviewFragment.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mPkgName = getArguments().getString(PKG_EXTRA);

    ThemedTypefaceHelper helper = new ThemedTypefaceHelper();
    helper.load(getActivity(), mPkgName);
    mTypefaceNormal = helper.getTypeface(Typeface.NORMAL);
    mTypefaceBold = helper.getTypeface(Typeface.BOLD);
    mTypefaceItalic = helper.getTypeface(Typeface.ITALIC);
    mTypefaceBoldItalic = helper.getTypeface(Typeface.BOLD_ITALIC);
}

From source file:com.github.chilinh.androidformbuilder.FormTestFragment.java

@Override
protected Form createForm() {
    return new Form.Builder().addSection(new SectionElement("Personal"))
            .addElement(new EditTextElement(null, "Name:").placeholder("Your name here").required(true)
                    .labelTypeface(Typeface.BOLD))
            .addElement(new ComboBoxElement(null, "Genre", "", "Male", "Female"))
            .addElement(new TextElement(null, "For you:").placeholder("N/A").labelTypeface(Typeface.BOLD))
            .addElement(new EditTextElement(null, null).placeholder("Phone number here")
                    .setInputTypeMask(InputType.TYPE_CLASS_PHONE, true).required(true))
            .addSection(new SectionElement("More"))
            .addElement(new DatePickerElement(null, "Birthday: ").date(Calendar.getInstance().getTime()))
            .addElement(new TimePickerElement(null, "Leave: ").time(Calendar.getInstance().getTime()))
            .build(getContext());//  ww w.  j  a  v a  2 s  .c o m
}

From source file:gr.sepals.eshop.info.gui.SyncSlidePageFragment.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.fragment_info_sync, container, false);
    if (getResources().getBoolean(R.bool.isTablet)) {
        title = (TextView) rootView.findViewById(R.id.info_sync_title_textview);
        Typeface titleFont = Typeface.createFromAsset(getActivity().getAssets(), "fonts/GFS_Pyrsos.otf");
        title.setTypeface(titleFont, Typeface.BOLD);
    }//  ww  w. j  a  va2 s.  c om
    desc = (TextView) rootView.findViewById(R.id.info_sync_description_textview);
    Typeface descFont = Typeface.createFromAsset(getActivity().getAssets(), "fonts/GFS_Goschen-Italic.otf");
    desc.setTypeface(descFont);

    memoryOption = (RadioGroup) rootView.findViewById(R.id.memory_radioGroup);
    internal = (RadioButton) rootView.findViewById(R.id.internal_memory_radiobutton);
    internal.setTypeface(descFont);
    internal.setOnClickListener(this);
    embedded = (RadioButton) rootView.findViewById(R.id.embedded_memory_radiobutton);
    embedded.setTypeface(descFont);
    embedded.setOnClickListener(this);
    removable = (RadioButton) rootView.findViewById(R.id.removable_memory_radiobutton);
    //check if there is sdcard port at device
    if (DeviceOptionsHandler.checkAvailableExternalMemory(getActivity()) == -1) {
        memoryOption.removeView(removable);
    } else {
        removable.setTypeface(descFont);
        removable.setOnClickListener(this);
    }

    sync = (Button) rootView.findViewById(R.id.sync_button);
    sync.setOnClickListener(this);
    exit = (Button) rootView.findViewById(R.id.exit_button);
    exit.setOnClickListener(this);

    // update the fragment content
    String selectedStorage = Settings.getString(getActivity(), InternalDatabaseKeys.PRODUCTS_DB_STORAGE_OPTION,
            InternalDatabasePredefinedValues.PRODUCTS_DB_NONE_STORAGE);
    if (selectedStorage.equals(InternalDatabasePredefinedValues.PRODUCTS_DB_INTERNAL_STORAGE)) {
        memoryOption.check(R.id.internal_memory_radiobutton);
        sync.setEnabled(true);
    } else if (selectedStorage.equals(InternalDatabasePredefinedValues.PRODUCTS_DB_EMBEDDED_STORAGE)) {
        memoryOption.check(R.id.embedded_memory_radiobutton);
        sync.setEnabled(true);
    } else if (selectedStorage.equals(InternalDatabasePredefinedValues.PRODUCTS_DB_REMOVABLE_STORAGE)) {
        memoryOption.check(R.id.removable_memory_radiobutton);
        sync.setEnabled(true);
    } else {
        sync.setEnabled(false);
    }
    return rootView;
}

From source file:com.ncatz.yeray.calendarview.CalendarDecorator.CurrentDayDecorator.java

@Override
public void decorate(DayViewFacade view) {
    view.setSelectionDrawable(drawable);
    view.addSpan(new StyleSpan(Typeface.BOLD));
}

From source file:com.ncatz.yeray.calendarview.CalendarDecorator.SelectedDayDecorator.java

@Override
public void decorate(DayViewFacade view) {
    view.addSpan(new StyleSpan(Typeface.BOLD));
    view.addSpan(new RelativeSizeSpan(1.4f));
    view.setSelectionDrawable(drawable);
}

From source file:com.cls.sugutomo.map.ClusterOP.java

public ClusterOP(Resources resources) {
    baseBitmaps = new Bitmap[res.length];
    for (int i = 0; i < res.length; i++) {
        baseBitmaps[i] = BitmapFactory.decodeResource(resources, res[i]);
    }/*w ww  .j  a  v a 2 s  .  c  om*/
    paint.setColor(Color.WHITE);
    paint.setTextAlign(Align.CENTER);
    paint.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
    paint.setTextSize(resources.getDimension(R.dimen.text_size));
}

From source file:app.philm.in.util.TypefaceManager.java

public Typeface getRobotoCondensedBold() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
        return Typeface.create(ROBOTO_CONDENSED_NATIVE_FONT_FAMILY, Typeface.BOLD);
    }/*from w  ww. java  2  s  .com*/
    return getTypeface(ROBOTO_CONDENSED_BOLD_FILENAME);
}