Example usage for android.content.pm ShortcutInfo getShortLabel

List of usage examples for android.content.pm ShortcutInfo getShortLabel

Introduction

In this page you can find the example usage for android.content.pm ShortcutInfo getShortLabel.

Prototype

@Nullable
public CharSequence getShortLabel() 

Source Link

Document

Return the short description of a shortcut.

Usage

From source file:com.farmerbb.taskbar.activity.ContextMenuActivity.java

@TargetApi(Build.VERSION_CODES.N_MR1)
private CharSequence getShortcutTitle(ShortcutInfo shortcut) {
    CharSequence longLabel = shortcut.getLongLabel();
    if (longLabel != null && longLabel.length() > 0 && longLabel.length() <= 20)
        return longLabel;
    else/*from  w ww.ja  va2 s.  c  o  m*/
        return shortcut.getShortLabel();
}