From 167157e100bf7e32ddbad698e1729d2e0b96c9d0 Mon Sep 17 00:00:00 2001 From: Tom Orth Date: Sun, 16 Oct 2016 10:42:08 -0400 Subject: [PATCH] Updated with better named variables --- .../holocolorpicker/ColorPicker.java | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/libary/src/main/java/com/larswerkman/holocolorpicker/ColorPicker.java b/libary/src/main/java/com/larswerkman/holocolorpicker/ColorPicker.java index ee1fd3e..2c145e0 100644 --- a/libary/src/main/java/com/larswerkman/holocolorpicker/ColorPicker.java +++ b/libary/src/main/java/com/larswerkman/holocolorpicker/ColorPicker.java @@ -319,33 +319,33 @@ public OnColorSelectedListener getOnColorSelectedListener() { private int oldSelectedListenerColor; private void init(AttributeSet attrs, int defStyle) { - final TypedArray a = getContext().obtainStyledAttributes(attrs, + final TypedArray tRes = getContext().obtainStyledAttributes(attrs, R.styleable.ColorPicker, defStyle, 0); - final Resources b = getContext().getResources(); + final Resources res = getContext().getResources(); - mColorWheelThickness = a.getDimensionPixelSize( + mColorWheelThickness = tRes.getDimensionPixelSize( R.styleable.ColorPicker_color_wheel_thickness, - b.getDimensionPixelSize(R.dimen.color_wheel_thickness)); - mColorWheelRadius = a.getDimensionPixelSize( + res.getDimensionPixelSize(R.dimen.color_wheel_thickness)); + mColorWheelRadius = tRes.getDimensionPixelSize( R.styleable.ColorPicker_color_wheel_radius, - b.getDimensionPixelSize(R.dimen.color_wheel_radius)); + res.getDimensionPixelSize(R.dimen.color_wheel_radius)); mPreferredColorWheelRadius = mColorWheelRadius; - mColorCenterRadius = a.getDimensionPixelSize( + mColorCenterRadius = tRes.getDimensionPixelSize( R.styleable.ColorPicker_color_center_radius, - b.getDimensionPixelSize(R.dimen.color_center_radius)); + res.getDimensionPixelSize(R.dimen.color_center_radius)); mPreferredColorCenterRadius = mColorCenterRadius; - mColorCenterHaloRadius = a.getDimensionPixelSize( + mColorCenterHaloRadius = tRes.getDimensionPixelSize( R.styleable.ColorPicker_color_center_halo_radius, - b.getDimensionPixelSize(R.dimen.color_center_halo_radius)); + res.getDimensionPixelSize(R.dimen.color_center_halo_radius)); mPreferredColorCenterHaloRadius = mColorCenterHaloRadius; - mColorPointerRadius = a.getDimensionPixelSize( + mColorPointerRadius = tRes.getDimensionPixelSize( R.styleable.ColorPicker_color_pointer_radius, - b.getDimensionPixelSize(R.dimen.color_pointer_radius)); - mColorPointerHaloRadius = a.getDimensionPixelSize( + res.getDimensionPixelSize(R.dimen.color_pointer_radius)); + mColorPointerHaloRadius = tRes.getDimensionPixelSize( R.styleable.ColorPicker_color_pointer_halo_radius, - b.getDimensionPixelSize(R.dimen.color_pointer_halo_radius)); + res.getDimensionPixelSize(R.dimen.color_pointer_halo_radius)); - a.recycle(); + tRes.recycle(); mAngle = (float) (-Math.PI / 2);