R rfsingh81 Member Licensed User Longtime User Jul 8, 2013 #1 Can someone please help me change the color of the seekbar as the slider moves left to right or vice versa. I have Fan defined as a seekbar. I am using this statement B4X: Fan.Color=Colors.Blue in activit create, but it is not showing up as blue, it is still at its default yellow. Thanks
Can someone please help me change the color of the seekbar as the slider moves left to right or vice versa. I have Fan defined as a seekbar. I am using this statement B4X: Fan.Color=Colors.Blue in activit create, but it is not showing up as blue, it is still at its default yellow. Thanks
derez Expert Licensed User Longtime User Jul 8, 2013 #2 You can't change the color of the standard seekbar. You'll have to design one yourself as a class or use one of already published seekbar classes. Upvote 0
You can't change the color of the standard seekbar. You'll have to design one yourself as a class or use one of already published seekbar classes.
R rfsingh81 Member Licensed User Longtime User Jul 8, 2013 #3 Thanks I will look into how to implement a ready made class. Could you help me with this following problem: B4X: Sub Fan_ValueChanged(Value As Int,UserChanged As Boolean) If (UserChanged=True) Then AStream.Write(Value.GetBytes("UTF8")) End If End Sub What am I doing wrong above in getting the value of the seekbar Fan? Last edited: Jul 8, 2013 Upvote 0
Thanks I will look into how to implement a ready made class. Could you help me with this following problem: B4X: Sub Fan_ValueChanged(Value As Int,UserChanged As Boolean) If (UserChanged=True) Then AStream.Write(Value.GetBytes("UTF8")) End If End Sub What am I doing wrong above in getting the value of the seekbar Fan?
derez Expert Licensed User Longtime User Jul 9, 2013 #4 The GetByte is for string, and Value is int. You can use this code, with byteconverter library: B4X: Dim intsarr(1) As Int Dim bycon As ByteConverter Dim buffer() As Byte intsarr(0) = Value buffer = bycon.IntsToBytes(intsarr) AStream.Write(buffer) Or, change the int to string and send it, then on the other side change it back to int. (dim st as string = Value) Last edited: Jul 9, 2013 Upvote 0
The GetByte is for string, and Value is int. You can use this code, with byteconverter library: B4X: Dim intsarr(1) As Int Dim bycon As ByteConverter Dim buffer() As Byte intsarr(0) = Value buffer = bycon.IntsToBytes(intsarr) AStream.Write(buffer) Or, change the int to string and send it, then on the other side change it back to int. (dim st as string = Value)
T Troberg Well-Known Member Licensed User Longtime User Jan 14, 2015 #5 Look at post #30 in this discussion: https://www.b4x.com/android/forum/threads/change-color-of-android-progressbar.12923/ Upvote 0
Look at post #30 in this discussion: https://www.b4x.com/android/forum/threads/change-color-of-android-progressbar.12923/