For Each p As SkuDetails In Products
ii=ii+1
' Log(p.Sku)
' Log(p.Title)
' Log(p.Description)
' Log("<--" & p.Price & "-->")
' Log("================")
Dim pnl As B4XView
pnl = xui.CreatePanel("")
pnl.Tag = ii
pnl.SetLayoutAnimated(0, 0, 0, clv.AsView.Width, 150dip)
pnl.Color = Colors.Transparent
Dim sPrice As String
If p.Price = "" Then
Dim offers As List = p.As(JavaObject).RunMethod("getSubscriptionOfferDetails", Null)
Dim offer As JavaObject = offers.Get(0)
Dim PricingPhases As JavaObject
PricingPhases = offer.RunMethod("getPricingPhases", Null)
Dim l As List = PricingPhases.RunMethod("getPricingPhaseList", Null)
Dim PricingPhase As JavaObject
PricingPhase = l.Get(0)
sPrice = PricingPhase.RunMethod("getFormattedPrice", Null)
Else
sPrice = p.Price
End If
Log(sPrice)
clv.Add(pnl, CreateCards(p.Sku, p.Title, p.Description, sPrice))
Next