Tabnine Logo
IconView
Code IndexAdd Tabnine to your IDE (free)

How to use
IconView
in
cn.yan.library

Best Java code snippets using cn.yan.library.IconView (Showing top 3 results out of 315)

origin: yanbober/DreamDrawable

public IconView(Context context, AttributeSet attrs) {
  super(context, attrs);
  init();
}
origin: yanbober/DreamDrawable

private void init() {
  setLayerType(LAYER_TYPE_SOFTWARE, null);
  mDrawable = new IconDrawable();
}
origin: yanbober/DreamDrawable

  private void handleIconDrawable() {
    IconView imageView8 = (IconView) this.findViewById(R.id.imageview8);
    IconDrawable drawable = imageView8.getIconDrawable();
    drawable.setBackgroundColor(Color.GREEN);
    drawable.setTextLabel("M");

    IconView imageView9 = (IconView) this.findViewById(R.id.imageview9);
    IconDrawable drawable1 = imageView9.getIconDrawable();
    drawable1.setBackgroundColor(Color.YELLOW);
    drawable1.setTextColor(Color.DKGRAY);
    drawable1.setTextLabel("王");

    IconView imageView10 = (IconView) this.findViewById(R.id.imageview10);
    IconDrawable drawable2 = imageView10.getIconDrawable();
    drawable2.setIconLabel(BitmapFactory.decodeResource(getResources(), R.drawable.timg));

    IconView imageView11 = (IconView) this.findViewById(R.id.imageview11);
    IconDrawable drawable3 = imageView11.getIconDrawable();
    drawable3.setIconLabel(BitmapFactory.decodeResource(getResources(), R.drawable.timg1));
  }
}
cn.yan.libraryIconView

Javadoc

类似 Flyme 6.0 联系人 Icon 的 Drawable 的 View。 当设置图片后显示联系人图片,当设置一个字母或者一个汉字时显示字符图。 TODO 该 View 仅仅为了表明自定义 Drawable 结合 View 的一种用法。

Most used methods

  • getIconDrawable
  • init
  • setLayerType

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • onRequestPermissionsResult (Fragment)
  • runOnUiThread (Activity)
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now