Android Question Match View

Alexander Stolte

Expert
Licensed User
Longtime User
Hello Community,

I have a simple question. With which view can I realize this? And is there an example of this?

Matching001.PNG

Matching004.PNG

Matching003.PNG


Thanks for any reply, I have unfortunately no idea how I should realize it.
 

Attachments

  • Matching002.PNG
    Matching002.PNG
    132.7 KB · Views: 160

MarcoRome

Expert
Licensed User
Longtime User
Wrapper / JavaObject
More information is needed ... this is a project on Gitlab ?
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
You don't need a wrapper for those views (at least for the first one you linked, I have not looked at the other).

You just need to add more than one panel to your project, use the Gesture Detector library, check if the user moves the top panel out of screen and remove it (or hide it).

(you could add an animation to move the panel, using NineOldAndroids)
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
B4X:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

    Private SwipeCard As SwipeCardView
    Dim cs As CSBuilder
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("Layout1")
    Dim cards As List
    cards.Initialize
    Dim c1 As Card
    'cs.Initialize.Typeface(Typeface.FONTAWESOME).Color(0xFF01FF20).Size(40).Append(Chr(0xF17B)).popall

    c1.Initialize(cs.Initialize.Typeface(Typeface.FONTAWESOME).Size(20).Color(0xFF01FF20).Append(Chr(0xF17B)).Append(" rulez!").PopAll,"androidapple", Colors.Black, Colors.Gray)
    cards.Add(c1)
    Dim c2 As Card
    c2.Initialize("Face 1","faces1", Colors.White, Colors.Black)
    cards.Add(c2)
    Dim c3 As Card
    c3.Initialize("Face 2","faces2", Colors.Black, Colors.White)
    cards.Add(c3)
    Dim c4 As Card
    c4.Initialize("Face 3","faces3", Colors.Black, Colors.White)
    cards.Add(c4)
    Dim c5 As Card
    c5.Initialize("Face 4","faces4", Colors.Black, Colors.White)
    cards.Add(c5)
    Dim c6 As Card
    c6.Initialize("Face 5","faces5", Colors.Black, Colors.White)
    cards.Add(c6)
    Dim c7 As Card
    c7.Initialize("Face 6","faces6", Colors.Black, Colors.White)
    cards.Add(c7)
    Dim c8 As Card
    c8.Initialize("Face 7","faces7", Colors.Black, Colors.White)
    cards.Add(c8)
    Dim c9 As Card
    c9.Initialize("Face 8","faces8", Colors.Black, Colors.White)
    cards.Add(c9)
    Dim c10 As Card
    c10.Initialize("Face 9","faces9", Colors.Black, Colors.White)
    cards.Add(c10)
    Dim c11 As Card
    c11.Initialize("Face 10","faces10", Colors.Black, Colors.White)
    cards.Add(c11)
    Dim c12 As Card
    c12.Initialize("Face 11","faces11", Colors.Black, Colors.White)
    cards.Add(c12)
    SwipeCard.setAdapterItems(cards)
    SwipeCard.addListener
   
   
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub


Sub SwipeCard_onItemClicked(position As Int, dataObject As Object)
    Log($"SwipeCard_onItemClicked(${position})"$)
End Sub
Sub SwipeCard_onCardExit(position As String, dataObject As Object)
    Log($"SwipeCard_onCardExit(${position})"$)
End Sub
Sub SwipeCard_onAdapterAboutToEmpty(itemsInAdapter As Int)
    Log($"SwipeCard_onAdapterAboutToEmpty(${itemsInAdapter})"$)
    If itemsInAdapter = 0 Then
        SwipeCard.restart
    End If
End Sub
Sub SwipeCard_onScroll(scrollProgressPercent As Float)
    'Log($"SwipeCard_onScroll(${scrollProgressPercent})"$)
End Sub

You can find a Donate button in my signature :)
 

Attachments

  • SwipeCardEx.zip
    414.7 KB · Views: 191
Upvote 0

MarcoRome

Expert
Licensed User
Longtime User
B4X:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

    Private SwipeCard As SwipeCardView
    Dim cs As CSBuilder
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("Layout1")
    Dim cards As List
    cards.Initialize
    Dim c1 As Card
    'cs.Initialize.Typeface(Typeface.FONTAWESOME).Color(0xFF01FF20).Size(40).Append(Chr(0xF17B)).popall

    c1.Initialize(cs.Initialize.Typeface(Typeface.FONTAWESOME).Size(20).Color(0xFF01FF20).Append(Chr(0xF17B)).Append(" rulez!").PopAll,"androidapple", Colors.Black, Colors.Gray)
    cards.Add(c1)
    Dim c2 As Card
    c2.Initialize("Face 1","faces1", Colors.White, Colors.Black)
    cards.Add(c2)
    Dim c3 As Card
    c3.Initialize("Face 2","faces2", Colors.Black, Colors.White)
    cards.Add(c3)
    Dim c4 As Card
    c4.Initialize("Face 3","faces3", Colors.Black, Colors.White)
    cards.Add(c4)
    Dim c5 As Card
    c5.Initialize("Face 4","faces4", Colors.Black, Colors.White)
    cards.Add(c5)
    Dim c6 As Card
    c6.Initialize("Face 5","faces5", Colors.Black, Colors.White)
    cards.Add(c6)
    Dim c7 As Card
    c7.Initialize("Face 6","faces6", Colors.Black, Colors.White)
    cards.Add(c7)
    Dim c8 As Card
    c8.Initialize("Face 7","faces7", Colors.Black, Colors.White)
    cards.Add(c8)
    Dim c9 As Card
    c9.Initialize("Face 8","faces8", Colors.Black, Colors.White)
    cards.Add(c9)
    Dim c10 As Card
    c10.Initialize("Face 9","faces9", Colors.Black, Colors.White)
    cards.Add(c10)
    Dim c11 As Card
    c11.Initialize("Face 10","faces10", Colors.Black, Colors.White)
    cards.Add(c11)
    Dim c12 As Card
    c12.Initialize("Face 11","faces11", Colors.Black, Colors.White)
    cards.Add(c12)
    SwipeCard.setAdapterItems(cards)
    SwipeCard.addListener
  
  
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub


Sub SwipeCard_onItemClicked(position As Int, dataObject As Object)
    Log($"SwipeCard_onItemClicked(${position})"$)
End Sub
Sub SwipeCard_onCardExit(position As String, dataObject As Object)
    Log($"SwipeCard_onCardExit(${position})"$)
End Sub
Sub SwipeCard_onAdapterAboutToEmpty(itemsInAdapter As Int)
    Log($"SwipeCard_onAdapterAboutToEmpty(${itemsInAdapter})"$)
    If itemsInAdapter = 0 Then
        SwipeCard.restart
    End If
End Sub
Sub SwipeCard_onScroll(scrollProgressPercent As Float)
    'Log($"SwipeCard_onScroll(${scrollProgressPercent})"$)
End Sub

You can find a Donate button in my signature :)
Is fantastic as usual
 
Upvote 0

ykucuk

Well-Known Member
Licensed User
Longtime User
Hello @DonManfred ,

i was busy with another project (html5) and didnt check here long time. I see only now.

Im ready to keep my promise.

Thank you for your work.

I really do not like it when someone offer to pay but then NOTHING HAPPEN, @ykucuk!

@Alexander Stolte already paid 25 Euros for it. On the day i uploded the Lib here in the Thread.
 
Upvote 0
Top