diff --git a/generate-themes.pl b/generate-themes.pl
index c6fff41d..2179823d 100644
--- a/generate-themes.pl
+++ b/generate-themes.pl
@@ -114,9 +114,10 @@ my $DATA = << "EOF";
- \@color/overlay_background_light
- \@color/overlay_foreground_light
- \@color/material_grey_400
+ - \@color/material_grey_400
- $this->{light}->{colorPrimary}
- $this->{light}->{colorAccent}
- - \@color/material_grey_600
+ - \@color/material_grey_900
- $this->{light}->{colorAccent}
- $this->{light}->{colorAccent}
- $this->{light}->{colorPrimary}
@@ -146,9 +147,10 @@ my $DATA = << "EOF";
- \@color/overlay_background_dark
- \@color/overlay_foreground_dark
- \@color/material_grey_900
+ - \@color/material_grey_700
- $this->{dark}->{colorPrimary}
- $this->{dark}->{colorAccent}
- - \@color/material_grey_600
+ - \@color/material_grey_300
- $this->{dark}->{colorAccent}
- $this->{dark}->{colorAccent}
- $this->{dark}->{colorPrimary}
diff --git a/res/layout/controls.xml b/res/layout/controls.xml
index 3229f777..96bea7d5 100644
--- a/res/layout/controls.xml
+++ b/res/layout/controls.xml
@@ -20,7 +20,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
-
+
#bdbdbd
#ffa3a3a3
#ff757575
+ #61616161
+ #42424242
#ff212121
#ffd6d7d7
#ff5a595b
-
- #ff37474f
- #ff263238
- #ff3e677a
-
@android:color/background_light
diff --git a/res/values-v21/theme-blue.xml b/res/values-v21/theme-blue.xml
index f52606ca..eb903e7b 100644
--- a/res/values-v21/theme-blue.xml
+++ b/res/values-v21/theme-blue.xml
@@ -22,9 +22,10 @@
- @color/overlay_background_light
- @color/overlay_foreground_light
- @color/material_grey_400
+ - @color/material_grey_400
- #FF0277BD
- #FF03A9F4
- - @color/material_grey_600
+ - @color/material_grey_900
- #FF03A9F4
- #FF03A9F4
- #FF0277BD
@@ -54,9 +55,10 @@
- @color/overlay_background_dark
- @color/overlay_foreground_dark
- @color/material_grey_900
+ - @color/material_grey_700
- #FF0277BD
- #FF03A9F4
- - @color/material_grey_600
+ - @color/material_grey_300
- #FF03A9F4
- #FF03A9F4
- #FF0277BD
diff --git a/res/values-v21/theme-greyish.xml b/res/values-v21/theme-greyish.xml
index c659e555..bbda0482 100644
--- a/res/values-v21/theme-greyish.xml
+++ b/res/values-v21/theme-greyish.xml
@@ -22,9 +22,10 @@
- @color/overlay_background_light
- @color/overlay_foreground_light
- @color/material_grey_400
+ - @color/material_grey_400
- #ff212121
- #ff212121
- - @color/material_grey_600
+ - @color/material_grey_900
- #ff212121
- #ff212121
- #ff212121
@@ -54,9 +55,10 @@
- @color/overlay_background_dark
- @color/overlay_foreground_dark
- @color/material_grey_900
+ - @color/material_grey_700
- #ff212121
- #ffececec
- - @color/material_grey_600
+ - @color/material_grey_300
- #ffececec
- #ffececec
- #ff212121
diff --git a/res/values-v21/theme-orange.xml b/res/values-v21/theme-orange.xml
index 136d4178..13ec7ffa 100644
--- a/res/values-v21/theme-orange.xml
+++ b/res/values-v21/theme-orange.xml
@@ -22,9 +22,10 @@
- @color/overlay_background_light
- @color/overlay_foreground_light
- @color/material_grey_400
+ - @color/material_grey_400
- #FFE65100
- #FFF57F17
- - @color/material_grey_600
+ - @color/material_grey_900
- #FFF57F17
- #FFF57F17
- #FFE65100
@@ -54,9 +55,10 @@
- @color/overlay_background_dark
- @color/overlay_foreground_dark
- @color/material_grey_900
+ - @color/material_grey_700
- #FFE65100
- #FFF57F17
- - @color/material_grey_600
+ - @color/material_grey_300
- #FFF57F17
- #FFF57F17
- #FFE65100
diff --git a/res/values-v21/theme-standard.xml b/res/values-v21/theme-standard.xml
index 7add9938..4e56da13 100644
--- a/res/values-v21/theme-standard.xml
+++ b/res/values-v21/theme-standard.xml
@@ -22,9 +22,10 @@
- @color/overlay_background_light
- @color/overlay_foreground_light
- @color/material_grey_400
+ - @color/material_grey_400
- #ff37474f
- #ff3e677a
- - @color/material_grey_600
+ - @color/material_grey_900
- #ff3e677a
- #ff3e677a
- #ff37474f
@@ -54,9 +55,10 @@
- @color/overlay_background_dark
- @color/overlay_foreground_dark
- @color/material_grey_900
+ - @color/material_grey_700
- #ff37474f
- #ff3e677a
- - @color/material_grey_600
+ - @color/material_grey_300
- #ff3e677a
- #ff3e677a
- #ff37474f
diff --git a/res/values-v21/themes-list.xml b/res/values-v21/themes-list.xml
index 937114fc..e9ccade4 100644
--- a/res/values-v21/themes-list.xml
+++ b/res/values-v21/themes-list.xml
@@ -1,27 +1,27 @@
-
- - 0,#ff263238,#fff0f0f0,#ff37474f
- - 1,#ff263238,#ff2a2a2a,#ff37474f
- - 2,#ff090909,#fff0f0f0,#ff212121
- - 3,#ff090909,#ff2a2a2a,#ff212121
- - 4,#FFBF360C,#fff0f0f0,#FFE65100
- - 5,#FFBF360C,#ff2a2a2a,#FFE65100
- - 6,#FF01579B,#fff0f0f0,#FF0277BD
- - 7,#FF01579B,#ff2a2a2a,#FF0277BD
-
+
+ - @style/VanillaBase
+ - @style/Dark.VanillaBase
+ - @style/Greyish.VanillaBase
+ - @style/Greyish.Dark.VanillaBase
+ - @style/Orange.VanillaBase
+ - @style/Orange.Dark.VanillaBase
+ - @style/Blue.VanillaBase
+ - @style/Blue.Dark.VanillaBase
+
-
- - Standard
- - Dark.Standard
- - Greyish
- - Dark.Greyish
- - Orange
- - Dark.Orange
- - Blue
- - Dark.Blue
-
+
+ - @style/Library
+ - @style/Dark.Library
+ - @style/Greyish.Library
+ - @style/Greyish.Dark.Library
+ - @style/Orange.Library
+ - @style/Orange.Dark.Library
+ - @style/Blue.Library
+ - @style/Blue.Dark.Library
+
- @style/PopupDialog
@@ -56,26 +56,26 @@
- @style/Blue.Dark.Playback
-
- - @style/Library
- - @style/Dark.Library
- - @style/Greyish.Library
- - @style/Greyish.Dark.Library
- - @style/Orange.Library
- - @style/Orange.Dark.Library
- - @style/Blue.Library
- - @style/Blue.Dark.Library
-
+
+ - Standard
+ - Dark.Standard
+ - Greyish
+ - Dark.Greyish
+ - Orange
+ - Dark.Orange
+ - Blue
+ - Dark.Blue
+
-
- - @style/VanillaBase
- - @style/Dark.VanillaBase
- - @style/Greyish.VanillaBase
- - @style/Greyish.Dark.VanillaBase
- - @style/Orange.VanillaBase
- - @style/Orange.Dark.VanillaBase
- - @style/Blue.VanillaBase
- - @style/Blue.Dark.VanillaBase
-
+
+ - 0,#ff263238,#fff0f0f0,#ff37474f
+ - 1,#ff263238,#ff2a2a2a,#ff37474f
+ - 2,#ff090909,#fff0f0f0,#ff212121
+ - 3,#ff090909,#ff2a2a2a,#ff212121
+ - 4,#FFBF360C,#fff0f0f0,#FFE65100
+ - 5,#FFBF360C,#ff2a2a2a,#FFE65100
+ - 6,#FF01579B,#fff0f0f0,#FF0277BD
+ - 7,#FF01579B,#ff2a2a2a,#FF0277BD
+
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 5f96e29c..c04321a9 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -6,4 +6,5 @@
+
diff --git a/res/values/theme-standard.xml b/res/values/theme-standard.xml
index bc5a66dc..0bf4da49 100644
--- a/res/values/theme-standard.xml
+++ b/res/values/theme-standard.xml
@@ -26,6 +26,7 @@ THE SOFTWARE.
- #ffb2b2b2
- #f222
+ - #f222
- #ff1e1e1e
- @android:color/holo_blue_dark
- #fff5f5f5
diff --git a/res/values/vib_attrs.xml b/res/values/vib_attrs.xml
new file mode 100644
index 00000000..c3bf2cb9
--- /dev/null
+++ b/res/values/vib_attrs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/src/ch/blinkenlights/android/vanilla/VanillaImageButton.java b/src/ch/blinkenlights/android/vanilla/VanillaImageButton.java
index 5c288fd4..2f06114c 100644
--- a/src/ch/blinkenlights/android/vanilla/VanillaImageButton.java
+++ b/src/ch/blinkenlights/android/vanilla/VanillaImageButton.java
@@ -23,14 +23,17 @@ import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.widget.ImageButton;
+import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorFilter;
+import android.graphics.Paint;
public class VanillaImageButton extends ImageButton {
private Context mContext;
private static int mNormalTint;
private static int mActiveTint;
+ private int mCircleColor;
public VanillaImageButton(Context context) {
this(context, null);
@@ -45,6 +48,13 @@ public class VanillaImageButton extends ImageButton {
mContext = context;
mNormalTint = fetchAttrColor(R.attr.controls_normal);
mActiveTint = fetchAttrColor(R.attr.controls_active);
+
+ if (attrs != null) {
+ TypedArray a = mContext.obtainStyledAttributes(attrs, R.styleable.VanillaImageButton, 0, 0);
+ mCircleColor = a.getColor(R.styleable.VanillaImageButton_backgroundCircleColor, 0);
+ a.recycle();
+ }
+
updateImageTint(-1);
}
@@ -54,6 +64,22 @@ public class VanillaImageButton extends ImageButton {
this.updateImageTint(resId);
}
+ @Override
+ public void onDraw(Canvas canvas) {
+ if (mCircleColor != 0) {
+ // Draw a circle on the background, but only
+ // if the color is set.
+ final int x = getWidth() / 2;
+ final int y = getHeight() / 2;
+ final float r = (x > y ? y : x);
+ Paint paint = new Paint();
+ paint.setColor(mCircleColor);
+ paint.setAntiAlias(true);
+ canvas.drawCircle(x, y, r*0.90f, paint);
+ }
+ super.onDraw(canvas);
+ }
+
private void updateImageTint(int resHint) {
int filterColor = mNormalTint;