forked from RyanTech/range-bar
-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Released version 1.4.7 and updated code styling
- Loading branch information
Showing
24 changed files
with
165 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.