mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Add construtor that accepts color. (#88)
This commit is contained in:
@@ -2,12 +2,17 @@ package org.nativescript.widgets;
|
|||||||
|
|
||||||
import android.graphics.Paint;
|
import android.graphics.Paint;
|
||||||
import android.graphics.drawable.ColorDrawable;
|
import android.graphics.drawable.ColorDrawable;
|
||||||
|
import android.support.annotation.ColorInt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by hhristov on 2/23/17.
|
* Created by hhristov on 2/23/17.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class SegmentedBarColorDrawable extends ColorDrawable {
|
public class SegmentedBarColorDrawable extends ColorDrawable {
|
||||||
|
public SegmentedBarColorDrawable(@ColorInt int color) {
|
||||||
|
super(color);
|
||||||
|
}
|
||||||
|
|
||||||
public void draw(android.graphics.Canvas canvas) {
|
public void draw(android.graphics.Canvas canvas) {
|
||||||
Paint p = new Paint();
|
Paint p = new Paint();
|
||||||
p.setColor(this.getColor());
|
p.setColor(this.getColor());
|
||||||
|
|||||||
Reference in New Issue
Block a user