summaryrefslogtreecommitdiffhomepage
path: root/app/src
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2018-06-01 00:01:02 +0530
committerJason A. Donenfeld <Jason@zx2c4.com>2018-06-01 03:19:26 +0200
commit752e61d1c74ac12d59d55c623804fe39187179c0 (patch)
tree9c14b8e72045be4d2a347e59155f850b2c1cb3b8 /app/src
parent125f725a03d5205fe86ebcb7db4992b90d81a445 (diff)
fab: default to app theme colors
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/com/wireguard/android/widget/fab/FloatingActionButton.java12
-rw-r--r--app/src/main/java/com/wireguard/android/widget/fab/FloatingActionsMenu.java9
2 files changed, 14 insertions, 7 deletions
diff --git a/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionButton.java b/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionButton.java
index c905ca3a..3395ae44 100644
--- a/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionButton.java
+++ b/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionButton.java
@@ -57,10 +57,14 @@ public class FloatingActionButton extends AppCompatImageButton {
}
void init(final Context context, final AttributeSet attributeSet) {
- final TypedArray attr = context.obtainStyledAttributes(attributeSet, R.styleable.FloatingActionButton, 0, 0);
- mColorNormal = attr.getColor(R.styleable.FloatingActionButton_fab_colorNormal, getColor(android.R.color.holo_blue_dark));
- mColorPressed = attr.getColor(R.styleable.FloatingActionButton_fab_colorPressed, getColor(android.R.color.holo_blue_light));
- mColorDisabled = attr.getColor(R.styleable.FloatingActionButton_fab_colorDisabled, getColor(android.R.color.darker_gray));
+ final TypedArray attr = context.obtainStyledAttributes(attributeSet,
+ R.styleable.FloatingActionButton, 0, 0);
+ mColorNormal = attr.getColor(R.styleable.FloatingActionButton_fab_colorNormal,
+ getColor(R.color.color_accent));
+ mColorPressed = attr.getColor(R.styleable.FloatingActionButton_fab_colorPressed,
+ getColor(R.color.color_accent_dark));
+ mColorDisabled = attr.getColor(R.styleable.FloatingActionButton_fab_colorDisabled,
+ getColor(android.R.color.darker_gray));
mSize = attr.getInt(R.styleable.FloatingActionButton_fab_size, SIZE_NORMAL);
mIcon = attr.getResourceId(R.styleable.FloatingActionButton_fab_icon, 0);
mTitle = attr.getString(R.styleable.FloatingActionButton_fab_title);
diff --git a/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionsMenu.java b/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionsMenu.java
index a2152c64..02546e13 100644
--- a/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionsMenu.java
+++ b/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionsMenu.java
@@ -96,9 +96,12 @@ public class FloatingActionsMenu extends ViewGroup {
setTouchDelegate(mTouchDelegateGroup);
final TypedArray attr = context.obtainStyledAttributes(attributeSet, R.styleable.FloatingActionsMenu, 0, 0);
- mAddButtonPlusColor = attr.getColor(R.styleable.FloatingActionsMenu_fab_addButtonPlusIconColor, getColor(android.R.color.white));
- mAddButtonColorNormal = attr.getColor(R.styleable.FloatingActionsMenu_fab_addButtonColorNormal, getColor(android.R.color.holo_blue_dark));
- mAddButtonColorPressed = attr.getColor(R.styleable.FloatingActionsMenu_fab_addButtonColorPressed, getColor(android.R.color.holo_blue_light));
+ mAddButtonPlusColor = attr.getColor(R.styleable.FloatingActionsMenu_fab_addButtonPlusIconColor,
+ getColor(android.R.color.white));
+ mAddButtonColorNormal = attr.getColor(R.styleable.FloatingActionsMenu_fab_addButtonColorNormal,
+ getColor(R.color.color_accent));
+ mAddButtonColorPressed = attr.getColor(R.styleable.FloatingActionsMenu_fab_addButtonColorPressed,
+ getColor(R.color.color_accent_dark));
mAddButtonSize = attr.getInt(R.styleable.FloatingActionsMenu_fab_addButtonSize, FloatingActionButton.SIZE_NORMAL);
mAddButtonStrokeVisible = attr.getBoolean(R.styleable.FloatingActionsMenu_fab_addButtonStrokeVisible, true);
mExpandDirection = attr.getInt(R.styleable.FloatingActionsMenu_fab_expandDirection, EXPAND_UP);