Git Product home page Git Product logo

xamarin-range-slider's People

Contributors

alxlnk avatar cbramleycf247 avatar charlesroddie avatar halkar avatar magic73 avatar maikub avatar mikew1986 avatar viridovics avatar wislon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

xamarin-range-slider's Issues

Can't use in PCL project

Could not install package 'Xamarin.RangeSlider 0.5.7'.
You are trying to install this package into a project that targets
'.NETPortable,Version=v4.5,Profile=Profile78', but the package
does not contain any assembly references or content files that
are compatible with that framework. For more information,
contact the package author.

I believe that should not be a problem to provide PCL assembly for Xamarin.RangeSlider.Forms

Error with Nuget Package on Xamarin iOS

I'm using the nuget package on Xamarin iOS and I've added a Range Slider Control to one of my View Controller in the storyboard. Each time I have to change the view controller containing the slider, the designer file of my view is changed and write:
[GeneratedCode ("iOS Designer", "1.0")] Xamarin.RangeSlider.RangeSeekBar MyRange { get; set; }

This cause the error "Xamarin.RangeSlider.RangeSeekBar is inaccessible due to its protection level". To fix the problem, I have to change the "RangeSeekBar" to "RangeSliderControl" in the designer file, but I need to do this everything the designer is changed.

Is there any fix for this?
Thanks.

Compile error

I added the library by NuGet but I get compilation errors.

snip_20160907091325

Does not work properly in IOS master detail page

Issue 1.
The control is really nice but I have some issues. On android if you put this control in the detail of a master detail page it works all fine. This is because you have to slide open the menu from the left side. On IOS however you can slide open the master menu from any place in the screen by swiping to the right. So if you swipe the slider to the right it will move a small portion. Then it locks and the menu starts appearing and moving to the right. It seems that the swiping gesture of the menu has preference above the swiping on your control and this is wrong. With a normal slider in the detail it does work fine though.
Issue 2.
I need one slider but I want the number above the slider. So I show the number above and hide the min thumb. The min thumb is hidden but the number above it is still visible in IOS. I would expect that if you hide a thumb the number above it is hidden too.

Could not add Xamarin.RangeSlider 0.5.7

Could not install package 'Xamarin.RangeSlider 0.5.7'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile7', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Windows 8.1 projects with rangeslider do not compile

Please repro with the previously submitted project

Make the Windows 8.1. project the current project and build. You will get these build errors:

The type or namespace name 'ExportRendererAttribute' does not exist in the namespace 'Xamarin.Forms' (are you missing an assembly reference?)
The type or namespace name 'ExportRenderer' does not exist in the namespace 'Xamarin.Forms' (are you missing an assembly reference?)

BR PV

Moving slider rapidly crashes the app

Hi,

I'm currently using this slider in my app, and moving the slider rapidly seems to crash the iOS version of the app. The android version is fine.

The crash seems to occur when the values get set in the element,

    public void OnLowerValueChanged(float value)
    {
        LowerValue = value;
        LowerValueChanged?.Invoke(this, EventArgs.Empty);
    }

    public void OnUpperValueChanged(float value)
    {
        UpperValue = value;
        UpperValueChanged?.Invoke(this, EventArgs.Empty);
    }

If I comment out the assignment,

    public void OnLowerValueChanged(float value)
    {
        //LowerValue = value;
        LowerValueChanged?.Invoke(this, EventArgs.Empty);
    }

    public void OnUpperValueChanged(float value)
    {
        //UpperValue = value;
        UpperValueChanged?.Invoke(this, EventArgs.Empty);
    }

it doesn't crash, but the labels don't get updated.

Any help with this will be greatly appreciated.

Lowervalue & Uppervalue -> thumb wrong position

When setting lowervalue and uppervalue, thumb position is not correct

var slider = new RangeSlider()
            {
                HorizontalOptions = LayoutOptions.FillAndExpand,
                BarHeight = 6,
                ShowTextAboveThumbs = true,
                MinimumValue = 0,
                MaximumValue = 10,
                StepValue = 1,
                LowerValue = 0,
                UpperValue = 5
            };

sin titulo

Implement step value

Typically sliders would have an increment setting so that you can force increments of a defined amount. I.e. the selection would jump by a step value e.g. value of 25. Therefore a min value of 100 and max value of 200 would have 5 steps in total... 100, 125, 150, 175, 200.

Lower value is incorrect when MinimumValue is not 0

The control is currently useless, since the system will not work with Minimum values greater than 0. Say the minimum value property is 40 and you set the Lower value to 50, the reading is set to 90, not 50, since 90 = 40 + 50.

This is not true for the UpperValue, in which case it would be consistent, at least. You can see this behavior in the attached project. It simply defines a page with a slider on it, and sets up a trivial Viewmodel, does two way binding to it.

I hope this is enough to fix the problem.

XlabRangeSlidertTest.zip

Range Slider in UWP

Hi,

I meet a problem when using it.
In UWP, when the page appearing, if the lower value is not equal to the minvalue, the upper value is always equal to the lower value.

Firstly I thought there was something wrong when binding, but then I try this:

                                  <forms:RangeSlider Grid.Row="0" 
                                 ShowTextAboveThumbs="True"  MinimumValue="0" MaximumValue="100"
                                 LowerValue="50"
                                 UpperValue="75" >

Both LowerValue and UpperValue are set as 50 when the page is appearing.
Only in UWP.

Can you help me on this?
Thank you.

System.Reflection.TargetInvocationException on iPhone

Hi,
tried to run an app using your Range-Slider on an iPhone today. Unfortunately caused the package an error at runtime:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Xamarin.Forms.Xaml.XamlParseException: Position 110:10. Type forms:RangeSlider not found in xmlns clr-namespace:Xamarin.RangeSlider.Forms;assembly=Xamarin.RangeSlider.Forms\n at Xamarin.Forms.Xaml.CreateValuesVisitor.Visit (Xamarin.Forms.Xaml.ElementNode node, Xamarin.Forms.Xaml.INode parentNode) [0x00040]
Namespace declaration:
xmlns:forms="clr-namespace:Xamarin.RangeSlider.Forms;assembly=Xamarin.RangeSlider.Forms"
Used the latest version 0.6.4 of the Xamarin.Forms.RangeSlider and Xamarin.RangeSlider.
Can you use the RangeSlider on an iOS device? Do I need to add the ExportRendererAttribute to my iOS AppDelegate class, like in your example?
Thanks for your help

Request: Circular slider

Hello,
could be nice to have a circular slider,

do you think will be possibile in next releases?
Thanks

System.ObjectDisposedException: Cannot access a disposed object.

Hi,
Getting below error

Xamarin caused by: android.runtime.JavaProxyThrowable: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Android.Graphics.RectF'.
Java.Interop.JniPeerMembers.AssertSelf(IJavaPeerable self)<283b4b1e03f54fee85a79f83eb627def>:0
Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualVoidMethod(string encodedMember, IJavaPeerable self, JniArgumentValue* parameters)<283b4b1e03f54fee85a79f83eb627def>:0
Android.Graphics.RectF.Set(float left, float top, float right, float bottom):0
RangeSlider.RangeSliderView.OnDraw(Canvas canvas):0
Android.Views.View.n_OnDraw_Landroid_graphics_Canvas_(IntPtr jnienv, IntPtr native__this, IntPtr native_canvas):0
at (wrapper dynamic-method) System.Object:85810f79-2a65-4a16-aa84-6fa1c465f516 (intptr,intptr,intptr)
md567636376cf6977936eff72a239369451.RangeSliderView.n_onDraw(Native Method)
md567636376cf6977936eff72a239369451.RangeSliderView.onDraw()RangeSliderView.java:72

Show min and max values

Hi.
How can i show min and max value labes when RangeSlider are shown for the first time and min and max values is selected?

[iOS] Problem with setting the UpperValue and LowerValue programmatically

Setting the UpperValue and LowerValue programmatically after the View is appeared does not update the control until it receives a touch event in the View area.

In my XIB I have a UIView where I set the class to RangeSlider and setting initial values, works great! Strange issue is after the View appears I set the LowerValue and UpperValue programmatically again but nothing happens until the RangeSlider receives a touch event, just by tap on the view it moves the slider knobs according to what I set it to.

Any idea?

Installed 0.2.0 from Nuget for Droid project but assembly does not match code?

Having installed Xamarin.RangeSlider 0.2.0 into my Xamarin Droid project (Xamarin.RangeSlider.Droid) I can't see properties such as 'DefaultColor', 'ShowLabels', 'ThumbImage' etc. in intellisense. Looking at Xamarin.RangeSlider.Droid in the Assembly Browser and the RangeSliderControl class doesn't seem to match the latest code here on GitHub. The only public property seems to be 'NotifyWhileDragging'.

I have also tried version 0.1.6 and this too seems to be the same older version?

I have downloaded and built latest and all works fine so it does seem as the Nuget packages are using older versions of code/assemblies.

Rendering rangeslider on UWP results in an exception

Please reuse the repro project I submitted for a previous problem.

When running the form with UWP an exception is thrown:

Could not load file or assembly 'System.Runtime.WindowsRuntime.UI.Xaml, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

rendering the control unfunctional.

How to change the Thumb color using a PlatformEffect?

Hi,
how is it possible to change the color of the thumb using a PlatformEffect on Android and iOS?
For the normal Slider (Android SeekBar; iOS UISlider) it is very simple:
https://blog.xamarin.com/customizing-xamarin-forms-controls-with-effects/

Changing the ActiveColor of the RangeSlider is also easy but the thumb of the RangeSlider is a Bitmap and not a Drawable. Do you have a suggestion how the color of the Thumb can be easily changed?

Thank you

Is not visible in UWP

The entire component is gone. Works in Android.
Running latest version of the slider.

Feature request: allow to add culture variant textformat

Hi, this is an improvement request. For now, with the textFormat, it is possible the use "C" to specify currency, but we cannot specify which culture to use (e.g. american dollar, canadian dollar, etc.) It would be great to have a field to specify which culture to use in the format :)

Thanks!

iOS 9.0 - slider is not visible

I use the code below to display the range slider, but except the background color (pink, as set) I can not see any elements on that slider.

var ageSlider = new RangeSlider
   		{
   			MinimumValue = 17,
   			MaximumValue = 70,
   			LowerValue = 1,
   			UpperValue = 70,
   			ShowTextAboveThumbs = true,
   			StepValue = 1,
   			HeightRequest = 80,
   			BackgroundColor = Color.Pink
   		};

I see that the images are inside the "Resources" folder, but my app uses "Images" folder, however, I think that this does not explain why the textfields are not visible...

Any ideas on this issue?

Thumb vector drawable crashed app.

I set vector drawable for thumb, normal, pressed, disabled a XML drawable.
I want to use my shapes, maybe vectorDrawable.

var thumbNormal = Resource.Drawable.thumb_normal;

drawable/thumb_normal.xml :

<?xml version="1.0" encoding="UTF-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <solid android:color="#bada55"/> <stroke android:width="10dp" android:color="#fff" /> <corners android:radius="10dp"/> <padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp" /> </shape>

Error when i open activity widh slider:
System.NullReferenceException: Object reference not set to an instance of an object.

Android : LowerValue binding not correct

I tried to bind the values to the lower value and the upper value but the lower value is not shown the right value. My model have 5 as lower value but the range slider will display 4. The upper value seems fine though.

Android: Not able build the application.

Hi Artur,
I am facing a issue like "showLabels" already defined when I am trying to build the application in android. I am using telerik dlls in my application to create some charts and your RangeSlider to select a time period. Now inside "attr.xaml" there is a attribute named "showLabels", which is making a issue for me. Need your help sir.

Attribute already defined issue.

Hi,

I am getting following error:

"Attribute Showlabel" is already been defined.

I am using telerik in my project and whenever I add Range slider in my package and compile the project I get the above mentioned error for android.

Can you please help me in resolving the issue.

Regards,
Nisha

Android: can't build

Hello,

I tried to build the Xamarin.Forms Droid sample but it didn't work.

I get some errors in the "values.xml" file, as we can see in this screenshot.

Would you have any explanation? For iOS and UWP I get no problem...

LowerValueChanged and UpperValueChanged events are not fired on Android

LowerValueChanged and UpperValueChanged events are not fired, if NotifyWhileDragging is false.
The probable cause of it relies in OnTouchEvent's MotionEventActions.Up case, where _pressedThumb is set to null, before the checks on events, so they will be never raised.

The mentioned code piece:

_pressedThumb = null;
Invalidate();
if (_pressedThumb == Thumb.Min)
    OnLowerValueChanged();
if (_pressedThumb == Thumb.Max)
    OnUpperValueChanged();

If possible only set _pressedThumb to null after the events where checked and fired.

The rangeslider does not render on windows phone

The windows phone version of the rangeslider does not render. Repro: Build a simple page with a range slider (you may repro with the sample I already provided for another problem). The WP screen will be blank, and not show a range slider.

I suspect the problem is that the correct assemblies are not installed as part of the nuget install. I only see references to:

xamarin.rangeslider.common
xamarin.rangeslider..Forms

in the windows phone project, whereas the Droid version in addition references

xamarin.rangeslider.Droid
xamarin.rangeslider.Forms.Droid

in which the renderer is contained.

Linking Assemblies doesn't work

After Add Xamarin.RangeSlider to Xamarin.Android project, i have problem with copilate realese version (Link SDK Assemblies):

Severity	Code	Description	Project	File	Line	Suppression State
Error		The "LinkAssemblies" task failed unexpectedly.
Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'Android.Graphics.Color Android.Content.Res.Resources::GetColor(System.Int32,Android.Content.Res.Resources/Theme)' (defined in 'Xamarin.RangeSlider.Droid, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') from 'Xamarin.RangeSlider.Droid, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' could not be resolved. ---> Mono.Cecil.ResolutionException: Failed to resolve Android.Graphics.Color Android.Content.Res.Resources::GetColor(System.Int32,Android.Content.Res.Resources/Theme)
   at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
   at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
   at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
   at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
   at Mono.Linker.Steps.MarkStep.ProcessQueue()
   at Mono.Linker.Steps.MarkStep.Process()
   at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
   at Mono.Linker.Pipeline.Process(LinkContext context)
   at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context)
   at Xamarin.Android.Tasks.LinkAssemblies.Execute()
   --- End of inner exception stack trace ---
   at Xamarin.Android.Diagnostic.Error(Int32 code, Exception innerException, String message, Object[] args)
   at Xamarin.Android.Tasks.LinkAssemblies.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()	Samson_Lenses.Droid

Can you help me?

Great control but could do with some more customisation options.

A couple of things that would be really useful (commonly so).

  1. Typically sliders would have an increment setting so that you can force increments of a defined amount. I.e. the selection would jump by a step value e.g. value of 25. Therefore a min value of 100 and max value of 200 would have 5 steps in total... 100, 125, 150, 175, 200. This is very much required for me.
  2. I really need to be able to define text formatting for the text above the slider handles... for example, I would like to have the selected value be represented as a currency. I.e. ยฃ75
  3. Thickness of slider's line (and/or make a drawable). I would like to be able to have the line be thicker i.e. 6dp in height.

Anything you could do to implement the above would be massively appreciated?!... I await you feedback. ย ๐Ÿ‘๐Ÿผ

UWP Compiler Warning 'Detected package downgrade'

The Xamarin.Forms.RangeSlider package causes compiler warnings in VisualStudio 2015 when using it in an UWP-App:
Warning: Detected package downgrade: Xamarin.Forms from 0.0.0 to 2.3.3.175
App.UWP (>= 1.0.0) -> Xamarin.Forms.RangeSlider (>= 0.6.8) -> Xamarin.Forms
App.UWP (>= 1.0.0) -> Xamarin.Forms (>= 2.3.3.175)

[iOS] Trouble with step value on Xamarin.iOS

Hi, I'm using the Xamarin nuget package on Android and iOS (not Forms). I want a slider with a step value of 10 going from 0 to 100 and I want to be able to freely changed the value of the slider and the snap to step value occurs only when I let go.

On Android, it is working nicely, but I have trouble on iOS. Even without step value, the slider control is "jittering", it is hardly moving freely and always stops in the movement, I wonder why is that?

When using the step value, I can stop between two steps too... This is how I set up the slider:
Slider.MinimumValue = 0.0f; Slider.MaximumValue = 100.0f; Slider.ShowTextAboveThumbs = true; Slider.StepVAlue = 10.0f; Slider.StepValueContinuously = false;

Do you have any ideas what is causing these problems on iOS?

Thanks for your help!

[iOS] Getting "Unknown class RangeSlider in Interface Builder file."

After creating a new Universal Single View Xamarin.iOS app project on Visual Studio 2015, I installed RangeSliderControl using the nuget package.

I was able to drag the control from the toolbox to the storyboard and configure all settings.

When I try to run the project, I get this message: "Unknown class RangeSlider in Interface Builder file". The component does not show on the emulator when running the app.

Is there any extra step to use it via interface builder?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.