iOS Question ImageSlider Source

Discussion in 'iOS Questions' started by ykucuk, Sep 11, 2018.

  1. ykucuk

    ykucuk Active Member Licensed User

    I added 20 panels into xCustomListView.
    Each panel has an imageslider view inside with different photos.
    My questions :
    1- is gesture working with imageslider?
    2- how can i set getimage function for all this imagesliders ?

    My code
    Code:
    Sub AddPosts
    pnlRoot.LoadLayout(
    "LayoutListview")

    For i = 1 To 20
    Listview1.Add(CreatePost(
    Rnd(0xFF0000000xFFFFFFFF),  i), "")
    Next
    End Sub

    Sub CreatePost(clr As Int, Title As StringAs B4XView

    ExpandedHeight =
    55dip + (screenWidth*1.12-6dip)
    Dim p As B4XView = xui.CreatePanel("")
    p.SetLayoutAnimated(
    000, Listview1.AsView.Width, ExpandedHeight)
    p.LoadLayout(
    "LayoutPost")
    imgUser.Bitmap= 
    LoadBitmap(File.DirAssets,"user" & Rnd(1,4) & ".jpg")

    PanelContainer.Width=screenWidth
    PanelContainer.Height=screenWidth*
    1.3
    PanelContainer.LoadLayout(
    "LayoutPostMedia")

    '**** PostImageSlider1  = Image Slider View

    Dim srcImageSlider As List
    srcImageSlider.Initialize

    For i = 1 To Rnd(1,7)
    srcImageSlider.Add(
    "s" & i & ".jpg")
    Next

    '**** How to set srcImageSlider for  PostImageSlider1(Image Slider View)

    Return p

    End Sub
     

    Attached Files:

  2. Erel

    Erel Administrator Staff Member Licensed User

    1. Gestures are no implemented in ImageSlider. You can add it with: https://www.b4x.com/android/forum/t...zer-native-uigesturerecognizer.52836/#content

    Start with a single ImageSlider.

    2. There are several options here. Where do the images come from? How are the images organized?
    Don't be afraid to modify ImageSlider. You can implement GetImage in such a way that it doesn't raise an event and instead returns the image immediately.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice