R Richard Peck Member Licensed User Longtime User Jan 12, 2014 #221 Hi All, I have 2 CustomLisView and I need to copy some of the entries from one to the other. So does anyone know the fastest way to copy a entry from one Clv to another. Thanks
Hi All, I have 2 CustomLisView and I need to copy some of the entries from one to the other. So does anyone know the fastest way to copy a entry from one Clv to another. Thanks
Erel B4X founder Staff member Licensed User Longtime User Jan 12, 2014 #222 How are you building the items? It will be easier to use the same method to create new items in the second list.
How are you building the items? It will be easier to use the same method to create new items in the second list.
R Richard Peck Member Licensed User Longtime User Jan 12, 2014 #223 Erel said: How are you building the items? It will be easier to use the same method to create new items in the second list. Click to expand... It's for a file compare for multiple file (greater than 100). It take a long time to create the original clv structure. What I'm trying to do is to use a second clv to display different views like: right file missing, left file missing or equal. I've place a tag in the original clv entries so I can copy only the correct ones to the second clv. So I'm looking for a method to copy the original entry to the second one. Thanks for any help
Erel said: How are you building the items? It will be easier to use the same method to create new items in the second list. Click to expand... It's for a file compare for multiple file (greater than 100). It take a long time to create the original clv structure. What I'm trying to do is to use a second clv to display different views like: right file missing, left file missing or equal. I've place a tag in the original clv entries so I can copy only the correct ones to the second clv. So I'm looking for a method to copy the original entry to the second one. Thanks for any help
junglejet Active Member Licensed User Longtime User Jan 26, 2014 #224 Just for the records. Designer created file with HorizontalAnchor = BOTH does not work in CustomListView. Size is not auto adjusted and there are strange gaps when panels are added. When using LEFT and clv1.asview.width=100%x all things are well -- Andy
Just for the records. Designer created file with HorizontalAnchor = BOTH does not work in CustomListView. Size is not auto adjusted and there are strange gaps when panels are added. When using LEFT and clv1.asview.width=100%x all things are well -- Andy
Erel B4X founder Staff member Licensed User Longtime User Jan 29, 2014 #225 CustomListView is not a view. You can make sv variable (ScrollView) public and then add the gesture to CustList1.sv.
CustomListView is not a view. You can make sv variable (ScrollView) public and then add the gesture to CustList1.sv.
Erel B4X founder Staff member Licensed User Longtime User Jan 30, 2014 #226 CustomListView is a standard class. It is not a real Android View. If you check the code you see that there is a global variable named sv inside. This is the ScrollView. You should make sv public and then you will be able to add the gesture to sv.
CustomListView is a standard class. It is not a real Android View. If you check the code you see that there is a global variable named sv inside. This is the ScrollView. You should make sv public and then you will be able to add the gesture to sv.
Erel B4X founder Staff member Licensed User Longtime User Feb 12, 2014 #228 Not sure that I understand...
elitevenkat Active Member Licensed User Longtime User Feb 12, 2014 #229 Erel said: Not sure that I understand... Click to expand... I think If there are 10 rows 1 to 10 displayed Can a row be inserted above no 1 ?. Yes if you sort the list !
Erel said: Not sure that I understand... Click to expand... I think If there are 10 rows 1 to 10 displayed Can a row be inserted above no 1 ?. Yes if you sort the list !
Erel B4X founder Staff member Licensed User Longtime User Feb 13, 2014 #230 You can use CLV.InsertAt or InsertTextAt to add the item wherever you like.
ThePuiu Active Member Licensed User Longtime User Feb 28, 2014 #231 How to automatically resize a button added to the list depending on screen size? I try like this: Code: Copy Dim b As Button b.Initialize("button") b.Text = "Select" panel.AddView(b, Width - 140dip, 25dip, 140dip * Scale, 50dip * Scale) but the result was unsatisfactory.
How to automatically resize a button added to the list depending on screen size? I try like this: Code: Copy Dim b As Button b.Initialize("button") b.Text = "Select" panel.AddView(b, Width - 140dip, 25dip, 140dip * Scale, 50dip * Scale) but the result was unsatisfactory.
GMan Well-Known Member Licensed User Longtime User Mar 1, 2014 #232 Joi, better U use the DesignerScripts in the Designer (second Tab). Here an example with a simple TabHost: Code: Copy TabHost1.SetLeftAndRight (0,100%x) TabHost1.SetTopAndBottom (0,60dip)
Joi, better U use the DesignerScripts in the Designer (second Tab). Here an example with a simple TabHost: Code: Copy TabHost1.SetLeftAndRight (0,100%x) TabHost1.SetTopAndBottom (0,60dip)
G gdeppi Member Licensed User Longtime User Mar 21, 2014 #233 Inman said: Thanks man. While that didn't work simply by replacing the drawable's name in the class's code, I was able to get it work with AndroidResources library and now I get the correct holo blue color. Click to expand... Hi can someone pls post an example on how to get the correct holo blue color on pressed items? Rgds. Last edited: Mar 21, 2014
Inman said: Thanks man. While that didn't work simply by replacing the drawable's name in the class's code, I was able to get it work with AndroidResources library and now I get the correct holo blue color. Click to expand... Hi can someone pls post an example on how to get the correct holo blue color on pressed items? Rgds.
Erel B4X founder Staff member Licensed User Longtime User Mar 23, 2014 #234 The correct color for Android 4+ is not blue. It is light gray. See the two attached 9 patch images. You can load them with the code posted here: Nine patch images tutorial Attachments list_selector_pressed_holo_light.9.png 187 bytes · Views: 526 list_selector_pressed_holo_dark.9.png 191 bytes · Views: 533
The correct color for Android 4+ is not blue. It is light gray. See the two attached 9 patch images. You can load them with the code posted here: Nine patch images tutorial
G gdeppi Member Licensed User Longtime User Apr 8, 2014 #235 Hi Erel, it is possible to add to the CustomListView a Section Header (Only Text) not cklickable ? Rgrds.
Hi Erel, it is possible to add to the CustomListView a Section Header (Only Text) not cklickable ? Rgrds.
Erel B4X founder Staff member Licensed User Longtime User Apr 8, 2014 #236 Add a transparent panel over the "header" item and handle its Click event. This way the event will not reach CustomListView and the color will not change.
Add a transparent panel over the "header" item and handle its Click event. This way the event will not reach CustomListView and the color will not change.
AscySoft Active Member Licensed User Longtime User Apr 16, 2014 #237 'Set the new value at the specified index. Public Sub SetValue(Index As Int, NewValue As Object ) As Boolean Try items.Set (Index, NewValue) Return True Catch Return False End Try End Sub
'Set the new value at the specified index. Public Sub SetValue(Index As Int, NewValue As Object ) As Boolean Try items.Set (Index, NewValue) Return True Catch Return False End Try End Sub
AscySoft Active Member Licensed User Longtime User Apr 16, 2014 #238 'Return last item bottom position in custom list. Public Sub GetBottom As Float If items.Size =0 Then Return 0 Dim p As Panel p=panels.Get (items.Size -1) Return p.Top+p.Height +dividerHeight End Sub
'Return last item bottom position in custom list. Public Sub GetBottom As Float If items.Size =0 Then Return 0 Dim p As Panel p=panels.Get (items.Size -1) Return p.Top+p.Height +dividerHeight End Sub
AscySoft Active Member Licensed User Longtime User Apr 16, 2014 #239 'longClick addition Private Sub Panel_LongClick If SubExists(CallBack, EventName & "_ItemLongClick") Then Dim v As View v = Sender CallSub3(CallBack, EventName & "_ItemLongClick", v.Tag, items.Get(v.Tag)) End If End Sub
'longClick addition Private Sub Panel_LongClick If SubExists(CallBack, EventName & "_ItemLongClick") Then Dim v As View v = Sender CallSub3(CallBack, EventName & "_ItemLongClick", v.Tag, items.Get(v.Tag)) End If End Sub
B bluedude Well-Known Member Licensed User Longtime User Apr 16, 2014 #240 I think that would be a nice option because after a while I really don't know anymore which views I added in which sequence. I think the designer should have an option to show the internal index number of a view. Like a toggle switch that would show a number on the view. Sure, would even be better in the properties of the designer.
I think that would be a nice option because after a while I really don't know anymore which views I added in which sequence. I think the designer should have an option to show the internal index number of a view. Like a toggle switch that would show a number on the view. Sure, would even be better in the properties of the designer.