GenericPopoverDrawable

Additional

Language
Java
Version
N/A
Created
May 10, 2014
Updated
Jul 21, 2015 (Retired)
Owner
Laimonas Turauskas (Laimiux)
Contributor
Laimonas Turauskas (Laimiux)
1
Activity
Badge
Generate
Download
Source code

GenericPopoverDrawable

A generic popover drawable for Android views.

Installation

  • Copy popover folder as a module to your project
  • Add include ':popover' in your settings.gradle

Code Sample

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        int backgroundColor = getResources().getColor(R.color.popover_background);
        int borderColor = getResources().getColor(R.color.popover_border);

        GenericPopoverDrawable popoverDrawable = new GenericPopoverDrawable(backgroundColor, borderColor);
        findViewById(R.id.popover_button).setBackground(popoverDrawable);
    }