Skip to content

Commit

Permalink
Released version 1.4.7 and updated code styling
Browse files Browse the repository at this point in the history
  • Loading branch information
krazykira committed Oct 28, 2019
1 parent e2754bd commit 86c1fe1
Show file tree
Hide file tree
Showing 24 changed files with 165 additions and 165 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Developers can customize the following attributes (both via XML and programatica

### Change Log
```
1.4.7 - Fixed selector bpundary cut-off issue
1.4.6 - Added tick colors, Added Left,Right and Default Selector Color. Added Touch Started /Touch Ended events to Rangebar. Fixed rangebar so that it behaves correctly inside scrollview. Also fixed Selected Tick label color issue.
1.4.5 - Added TOP and BOTTOM tick labels properties and drag only option. Also updated Gradle and screenshots.
1.4.4 - Added List of colors for connecting line and fix pins invisibility issue.
Expand Down Expand Up @@ -236,15 +237,15 @@ allprojects {

```groovy
dependencies {
implementation 'com.appyvet:materialrangebar:1.4.6'
implementation 'com.appyvet:materialrangebar:1.4.7'
}
```


**if you are already using android support library inside your project and run into multiple version issues related to android support library then modify the gradle path like this**
```groovy
dependencies {
compile ('com.appyvet:materialrangebar:1.4.6') {
compile ('com.appyvet:materialrangebar:1.4.7') {
exclude module: 'support-compat'
}
}
Expand Down
2 changes: 1 addition & 1 deletion RangeBarSample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.application'

dependencies {
implementation project(':materialrangebar')
// implementation 'com.appyvet:materialrangebar:1.4.6'
// implementation 'com.appyvet:materialrangebar:1.4.7'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
Expand Down
6 changes: 3 additions & 3 deletions RangeBarSample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.appyvet.rangebarsample"
android:versionCode="11"
android:versionName="1.3">
android:versionName="1.4.7">

<application
android:allowBackup="true"
Expand All @@ -20,9 +20,9 @@
</activity>
<activity
android:name=".RecyclerViewActivity"
android:theme="@style/AppTheme"
android:label="@string/title_recyclerview"
android:parentActivityName=".MainActivity" />
android:parentActivityName=".MainActivity"
android:theme="@style/AppTheme" />
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
* @author deric
*/
public enum Component {
BAR_COLOR, CONNECTING_LINE_COLOR, PIN_COLOR, THUMB_COLOR_PRESSED, SELECTOR_COLOR,SELECTOR_BOUNDARY_COLOR,
BAR_COLOR, CONNECTING_LINE_COLOR, PIN_COLOR, THUMB_COLOR_PRESSED, SELECTOR_COLOR, SELECTOR_BOUNDARY_COLOR,
TICK_COLOR, TEXT_COLOR, TICK_LABEL_COLOR, TICK_LABEL_SELECTED_COLOR
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public ColorPickerDialog() {
}

public static ColorPickerDialog newInstance(int titleResId, int[] colors, int selectedColor,
int columns, int size, Component component) {
int columns, int size, Component component) {
ColorPickerDialog ret = new ColorPickerDialog();
ret.initialize(titleResId, colors, selectedColor, columns, size, component);
return ret;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private static void addSwatchToRow(TableRow row, View swatch, int rowNumber) {
* will arrange them for accessibility purposes.
*/
private void setSwatchDescription(int rowNumber, int index, int rowElements, boolean selected,
View swatch) {
View swatch) {
int accessibilityIndex;
if (rowNumber % 2 == 0) {
// We're in a regular-ordered row
Expand Down Expand Up @@ -174,8 +174,8 @@ private ImageView createBlankSpace() {
/**
* Creates a color swatch.
*/
private ColorPickerSwatch createColorSwatch(int color, int selectedColor) {
ColorPickerSwatch view = new ColorPickerSwatch(getContext(), color,
private ColorPickerSwatch createColorSwatch(int color, int selectedColor) {
ColorPickerSwatch view = new ColorPickerSwatch(getContext(), color,
color == selectedColor, mOnSwatchColorSelectedListener);
TableRow.LayoutParams params = new TableRow.LayoutParams(mSwatchLength, mSwatchLength);
params.setMargins(mMarginSize, mMarginSize, mMarginSize, mMarginSize);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public interface OnSwatchColorSelectedListener {
}

public ColorPickerSwatch(Context context, int color, boolean checked,
OnSwatchColorSelectedListener listener) {
OnSwatchColorSelectedListener listener) {
super(context);
mColor = color;
mOnSwatchColorSelectedListener = listener;
Expand All @@ -66,7 +66,7 @@ public ColorPickerSwatch(Context context, int color, boolean checked,
protected void setColor(int color) {
Drawable[] colorDrawable = new Drawable[]
{ContextCompat.getDrawable(getContext(), R.drawable.color_picker_swatch)};
mSwatchImage.setImageDrawable(new ColorStateDrawable(colorDrawable, color));
mSwatchImage.setImageDrawable(new ColorStateDrawable(colorDrawable, color));
}

private void setChecked(boolean checked) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,54 +21,52 @@
import android.graphics.Color;

import com.appyvet.rangebarsample.R;

/**
*
* @author Gabriele Mariotti ([email protected])
*
*/
public class Utils {


/**
* Utility class for colors
*
* @author Gabriele Mariotti ([email protected])
*
*/
public static class ColorUtils{

/**
* Create an array of int with colors
*
* @param context
* @return
*/
public static int[] colorChoice(Context context){

int[] mColorChoices=null;
String[] color_array = context.getResources().getStringArray(R.array.default_color_choice_values);

if (color_array!=null && color_array.length>0) {
mColorChoices = new int[color_array.length];
for (int i = 0; i < color_array.length; i++) {
mColorChoices[i] = Color.parseColor(color_array[i]);
}
}
return mColorChoices;
}

/**
* Parse whiteColor
*
* @return
*/
public static int parseWhiteColor(){
return Color.parseColor("#FFFFFF");
}

}

public static boolean isTablet(Context context) {

/**
* Utility class for colors
*
* @author Gabriele Mariotti ([email protected])
*/
public static class ColorUtils {

/**
* Create an array of int with colors
*
* @param context
* @return
*/
public static int[] colorChoice(Context context) {

int[] mColorChoices = null;
String[] color_array = context.getResources().getStringArray(R.array.default_color_choice_values);

if (color_array != null && color_array.length > 0) {
mColorChoices = new int[color_array.length];
for (int i = 0; i < color_array.length; i++) {
mColorChoices[i] = Color.parseColor(color_array[i]);
}
}
return mColorChoices;
}

/**
* Parse whiteColor
*
* @return
*/
public static int parseWhiteColor() {
return Color.parseColor("#FFFFFF");
}

}

public static boolean isTablet(Context context) {
return (context.getResources().getConfiguration().screenLayout
& Configuration.SCREENLAYOUT_SIZE_MASK)
>= Configuration.SCREENLAYOUT_SIZE_LARGE;
Expand Down
3 changes: 2 additions & 1 deletion RangeBarSample/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/mylayout"
Expand All @@ -19,7 +20,7 @@
android:textColor="@color/white"
android:textSize="40sp" />

<com.appyvet.materialrangebar.RangeBar xmlns:app="http://schemas.android.com/apk/res-auto"
<com.appyvet.materialrangebar.RangeBar
android:id="@+id/rangebar1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down
7 changes: 3 additions & 4 deletions RangeBarSample/src/main/res/layout/color_picker_dialog.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -17,14 +16,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center" >
android:gravity="center">

<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center"
android:padding="28dp" >
android:padding="28dp">

<ProgressBar
android:id="@android:id/progress"
Expand Down
7 changes: 4 additions & 3 deletions RangeBarSample/src/main/res/layout/color_picker_swatch.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -14,15 +13,17 @@
limitations under the License.
-->
<merge xmlns:android="http://schemas.android.com/apk/res/android">

<ImageView
android:id="@+id/color_picker_swatch"
android:layout_width="match_parent"
android:layout_height="match_parent" />

<ImageView
android:id="@+id/color_picker_checkmark"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/ic_colorpicker_swatch_selected"
android:scaleType="fitXY"
android:src="@drawable/ic_colorpicker_swatch_selected"
android:visibility="gone" />
</merge>
17 changes: 8 additions & 9 deletions RangeBarSample/src/main/res/layout/divider.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="9dp"
android:background="@color/white">
android:layout_width="fill_parent"
android:layout_height="9dp"
android:background="@color/white">

<FrameLayout
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="@color/divider"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp">
</FrameLayout>
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:background="@color/divider"></FrameLayout>
</RelativeLayout>
33 changes: 16 additions & 17 deletions RangeBarSample/src/main/res/layout/recyclerview_item.xml
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
<FrameLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android">
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<com.appyvet.materialrangebar.RangeBar
xmlns:app="http://schemas.android.com/apk/res-auto"
<com.appyvet.materialrangebar.RangeBar xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/rangebar1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"
app:mrb_connectingLineColors="@array/connecting_colors"
app:mrb_pinColor="#6c3f6a"
app:mrb_pinMaxFont="15sp"
app:mrb_pinMinFont="12sp"
app:mrb_pinRadius="14dp"
app:mrb_pinTextColor="@color/white"
app:mrb_rangeBar="true"
app:mrb_rangeBarPaddingBottom="30dp"
app:mrb_rangeBar_rounded="true"
app:mrb_selectorBoundaryColor="@color/accent"
app:mrb_selectorBoundarySize="2dp"
app:mrb_pinTextColor="@color/white"
app:mrb_temporaryPins="true"
app:mrb_selectorSize="10dp"
app:mrb_tickLabelColor="@color/indigo500"
app:mrb_tickLabelSelectedColor="@color/accent"
app:mrb_temporaryPins="true"
app:mrb_tickBottomLabels="@array/ticks_labels"
app:mrb_tickTopLabels="@array/ticks_labels"
app:mrb_tickDefaultLabel="label"
app:mrb_tickLabelSize="4sp"
app:mrb_tickEnd="10"
app:mrb_tickHeight="4dp"
app:mrb_tickInterval="1"
app:mrb_tickLabelColor="@color/indigo500"
app:mrb_tickLabelSelectedColor="@color/accent"
app:mrb_tickLabelSize="4sp"
app:mrb_tickStart="5"
app:mrb_tickHeight="4dp"
app:mrb_pinRadius="14dp"
app:mrb_rangeBar_rounded="true"
app:mrb_connectingLineColors="@array/connecting_colors"
app:mrb_rangeBar="true"
app:mrb_pinColor="#6c3f6a"/>
app:mrb_tickTopLabels="@array/ticks_labels" />

</FrameLayout>
7 changes: 4 additions & 3 deletions RangeBarSample/src/main/res/menu/main.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android">

<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>
android:title="@string/action_settings"
app:showAsAction="never" />

</menu>
6 changes: 3 additions & 3 deletions RangeBarSample/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -65,7 +64,8 @@

<!-- Default padding for list items. This should match the action bar
content inset so that ListActivity items line up correctly. -->
<dimen name="list_item_padding_horizontal_material">@dimen/action_bar_content_inset_material</dimen>
<dimen name="list_item_padding_horizontal_material">@dimen/action_bar_content_inset_material
</dimen>
<dimen name="list_item_padding_start_material">@dimen/action_bar_content_inset_material</dimen>
<dimen name="list_item_padding_end_material">@dimen/action_bar_content_inset_material</dimen>

Expand Down
2 changes: 1 addition & 1 deletion RangeBarSample/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<string name="top_tick_labels">Top tick labels</string>
<string name="bottom_tick_labels">Bottom tick labels</string>
<string name="recyclerview_text">Rangebar Recyclerview Implementation</string>
<string-array translatable="false" name="default_color_choice_values">
<string-array name="default_color_choice_values" translatable="false">
<item>#33b5e5</item>
<item>#aa66cc</item>
<item>#99cc00</item>
Expand Down
2 changes: 1 addition & 1 deletion materialrangebar/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ext {
siteUrl = 'https://github.com/oli107/material-range-bar'
gitUrl = 'https://github.com/oli107/material-range-bar.git'

libraryVersion = '1.4.6'
libraryVersion = '1.4.7'

developerId = 'krazykira'
developerName = 'Sheraz Ahmed Khilji'
Expand Down
Loading

0 comments on commit 86c1fe1

Please sign in to comment.