How can I place a listview in a listview?

Hello everyone.

I do an application on my website and I would like to have an area featured inside, but I found a big problem when I try to add the recommended area to the main Listview (where the post is loaded).

It is an example of what he would like to see inside my application:

So I want to spend the "Star box" and "Feeding zone" at the same time, when the user tries to scroll vertically.

I tried to use a ScrollView but the priority of scrolling is in vertical listview and the recommended area does not scroll only when the vertical scroll listview is finished.

Could someone give me a suggestion?

See you soon!

I don't think we have an example that does exactly what you want, but basically, you could create a CustomListItem contains inner ListView.  You would need a second source of data for inner ListView or have the first element of your main data source to be another source of data.

The main ListView could choose the ListItem to display based on a type item in the data source main or you could rely on the position. forumThreadList.qml shows how you can override the itemType method to select the type of item (if it is not defined in the original data source).  This example also shows how to use a CustomListItem, but not one that contains a ListView.

Here is another example that shows a part of the implementation.  It would have a horizontal ListView in all the ranks of the main list.  If you combine these two you should be able to get what you are looking for.  Let me know if you have any questions along the way.

import bb.cascades 1.2

// creates one page with a label
Page {
    attachedObjects: [
        //ComponentDefinition doesn't work because DataModel doesn't extend BaseObject
        ArrayDataModel {
            id: dm2
        },
        ArrayDataModel {
            id: dm3
        }
    ]
    Container {
        ListView {
            dataModel: ArrayDataModel {
                id: dm
            }
            listItemComponents: [
                ListItemComponent {
                    Container {
                        layout: StackLayout {
                            orientation: LayoutOrientation.TopToBottom
                        }
                        ListView {
                            preferredHeight: 100
                            //Thankfully the QVariant is a DataModel, so this works :)
                            dataModel: ListItemData
                            layout: StackListLayout {
                                orientation: LayoutOrientation.LeftToRight
                            }
                            listItemComponents: [
                                ListItemComponent {
                                    Container {
                                        layout: StackLayout {
                                            orientation: LayoutOrientation.LeftToRight
                                        }
                                        Label{
                                            text: ListItemData +"\t|\t"
                                        }
                                    }
                                }
                            ]
                        }
                        Divider {}
                    }
                }
            ]
        }
    }
    onCreationCompleted: {
        dm2.append(["This is","another list","inside of","the first one"])
        dm3.append(["<( \" <) <( \" <) <( \" <)","(^\"^) (^\"^) (^\"^)","(> \" )> (> \" )> (> \" )>","(^\"^) (^\"^) (^\"^)","(> \" )><( \" )><( \" <)","(^\"^) (^\"^) (^\"^)","<( \" <) (>\"<) (> \" )>","(v' 'v) (v' 'v) (v' 'v)"])

        dm.append(dm2)
        dm.append(dm3)
    }
}

Tags: BlackBerry Developers

Similar Questions

  • How can I place a STOP button on my toolbar. I would like to stop firefox from loading a page by pressing the STOP button, but I can't find it in the toolbar options.

    How can I place a STOP button on my toolbar. I would like to stop firefox from loading a page by pressing the STOP button, but I can't find it in the toolbar options.

    First of all, if you have the menu bar show. (File-Edit-View-History-Bookmarks-Tools-Help), then you won't see the orange FireFox button because in the new version of FireFox button replaces the menu bar. You can believe that's the way you want by clicking on 'View', then place your cursor over "Toolbars" and check or uncheck menu bar. If you have the display on menu bar, click on 'View' then drag down to "Toolbars", then descend to the right and go to 'customize '; a click on it. Then, when the next screen appears, even if 'Reload' is not displayed on this topic, it appears somewhere upwards in your toolbar. (Mine was above the Google search box). Put your cursor on it and drag-and - drop to the left of your address bar. The "Stop" button should be left more than the button 'recharge' in order to get two separate buttons for these tasks. If the 'Reload' button is further to the left, then you get a single button that performs the tasks at the same time. I hope this helps.

  • My taskbar is vertical on the right side of the screen. How can I place horizontally at the bottom of the screen?

    Original title: taskbar

    My taskbar is vertical on the right side of the screen. How can I place horizontally at the bottom of the screen?

    Right-click on the taskbar and make sure that lock the taskbar is not checked. Now click on taskbar and keep the left button of the mouse down and drag the mouse to the bottom of the screen - possibly the taskbar should move to the bottom of the screen. Right-click on the taskbar and make sure lock taskbar is checked

  • How can I place first CS5 CS6 initially bypassing the CC formula?

    How can I place first CS5 CS6 initially bypassing the CC formula?  I just downloaded first CS6 but need an update of the serial number to use it as I currently have CS5.  Where can I get the CS5, CS6 upgrade?  Thank you.

    Try this phone number +.

    Creative cloud now includes the features of Creative Suite Master Collection and Design Premium

  • How can I place two images on the screen?

    Hello

    I need to compare two images on the screen to see the colors are the same.

    How can I place two or three images on screen from Lightroom?

    Thank you for reading

    Lightroom allows you to use the comparison mode in the library Module, select the two images desired and press c.

    Also in the library Module is mode of investigation where you can select two or more wanted images, then press n.

  • How can I place an illustrator as a background texture in muse?

    need help! How can I place an illustrator as a background texture in muse?

    Export the Illustrator file .svg file and import it in Muse.

  • How can I place a video clip in CS6 in an irregular shape

    How can I place a video clip in CS6 in an irregular shape please

    Do the white and then use a matte.

  • How can I place a text box on the other in the left column of my head?

    Greetings! Below, you will find something that I worked on a link. Now I have to change the left side of the header that contains the text box "Hiring" in a box on top of each other using the same amount of space. I also need to make these 2 boxes pop out when you click them but only one at a time. How can I place a text over another box using the same amount of space without any screwing? I could also use some help getting these images that say 'HIRE' and 'FIELD NEWS' inside boxes instead of above them.

    Thank you in advance. http://www.bestmarketingnames.com/xbanneredit.php

    Despite the CF McBlob comments that I share, I'll try to answer your question immediately. Just add this new markup above your other div scroll like this:

  • How can I place an indd - just the text file?

    Hello.

    This is a snippet of my code.

    var tfiImport = File("C:/Users/Me/Documents/YS/Exported Stories/YS_full_pg.indd");
            tfYS[0].insertionPoints.item(-1).place(tfiImport);
    
    

    I'm trying to import an indd file in a pre-existing text block. The framework becomes excess, because the indd file is placed in actual size.

    The indd is a text file with different styles applied. I just want retrieve this text with styles and place it in my text, auto to flow if necessary.

    How can I do?

    Any help would be appreciated.

    Hi SK,

    you would open the InDesign document and duplicate the text at your insertion point.

    Both documents are open.

    The insertion point where you want to "place" the formatted text is selected.

    There is at least a block of text with a paragraph in the document where you want to duplicate.

    Example:

    var targetDocument = app.documents[0]; // The active document
    var sourceDocument = app.documents[1];
    
    var targetInsertionPoint = app.selection[0].insertionPoints[0];
    
    sourceDocument.textFrames[0].paragraphs[0].duplicate(LocationOptions.AFTER,targetInsertionPoint);
    

    Example:

    To duplicate the whole text of a story where you know a block of text of this story:

    sourceDocument.textFrames[0].parentStory.texts[0].duplicate(LocationOptions.AFTER,targetInsertionPoint);
    

    Search for the text in the documentation for DOM object and its methods.

    Adobe InDesign CS6 (8,0) object model JS: text

    Also app.open () method:

    Adobe InDesign CS6 (8,0) object model JS: Application

    Uwe

  • How can I place a navigation menu in a slide show?

    Hello

    I want to have a widget of empty composition with the scrolling of the images at the top of my home page and in the navigation to sit on top of it. When I placed the items in menu above the image, it seems, until the Gallery moves to the next image and disappears from the navigation. Of course, he sits as part of the image is moved with the image - how can I avoid this happening?

    Any suggestions would be welcome.

    Thank you.

    Hello

    There are two options that you can use.

    Either use a slide show instead of the Composition widget Widget.

    Or you can place first the Menu Widget outside the Widget and then use the arrow keys to move and place it above the widget of Composition.

    I hope this helps.

    Kind regards
    Sachin

  • How can I place a copy of the book of fonts on the desktop

    can I place a copy of the book of fonts on the desktop?

    Never move applications from the Applications folder.

    Instead of launching the book of fonts of your dock.

    The icon of the application book fonts looks like a book with a big F.

  • How can I place locale specified resources?

    for example,.

    There are 2 images, one is for en-US, the other is for zh - CN

    How can I set it so that it will automatically be recognized by cascades?

    Thank you.

    There is no automatic mechanism to do this.
    You can add the path of the image in the translation files or use a standardized name model and replace the images in onlocalechanged.

  • How can I place a captcha before a html code that is displayed when the captcha is finished?

    andrebertel.com/support

    I don't like my Skype appearing automatically... I have block 2 robots... can I place a captcha before a html code that is displayed when the captcha is finished?

    You can add a form with only the email field and the captcha and set up the landing page as the page where the content html is placed, so that users will have to enter captcha to land on this page apart from that, you need to use the coding customized for adding verification captcha to the content of the page.

    Thank you

    Sanjit

  • How can I place image in an .ai file using java?

    I'm working on the Yearbook for my school project. For these past years, we have everything done using python to generate files png for all pages, but now that I discovered the adobe scripts, I wanted to make properly and generate vector files.

    My problem is that I can't place images in the file and references are... not as clear.

    I'd be very happy if someone from the community could help me is by Illustrator scripts or any other means.

    Thank you in advance.

    Sorry missed me parenthesis... also, use before slash ' / '.

    var file = File('c:/temp/abcd.png');
    var idoc = app.activeDocument;
    var iplaced = idoc.placedItems.add();
    iplaced.file = file;
    
  • How can I place window borders above the upper part of the screen in Windows 7 Home Premium?

    I've done this before, but I can't remember how: I would like to be able to resize/place a window outside the limits defined by default in Windows 7. I remember finding a setting somewhere that allowed me to do, but I can not find / remember the location of this setting now.

    The top of the screen is the highest that any window can be placed. That's what I'm trying to change a few settings in the control panel. If I want to do a big window, like a game with high resolution, I might want to hide the title bar of the window so that I can make the game a lot like full screen possible without temporarily lose access to the taskbar and other windows. In my case, I Alt + tab, but which is not the best answer. If anyone can help me find this setting?

    Thank you!

    Hey! I can help you. :) Go to the desktop and right click. Then click on customize. Click windows color. Down, you should see a person who says the advanced Windows settings. Click another box appears. It should be a drop-down list where it gives you a list as icon, scrollbar, active window border etc., click the border of the active windows. Then use the arrows to the right to adjust the size. Then click on apply. :) I hope this helps!

Maybe you are looking for

  • iTunes "side" have to spoil the reading

    Since I updated to iTunes 12.5.1.21, I noticed that if I want to play the songs on an album in order, he often do, playing similar to the current song songs instead or even different songs with similar titles (for example, I have several versions of

  • How to reformat Acer Aspire Revo?

    If I had to keep the Acer restore option (in its hidden partition) is fine.  However, it lacks a reformatting disk option, which I think would be very convenient when you sell a PC to make sensitive or unrecoverable data.  I have three factory reset

  • View 2 pages

    I would like to show 2 pages side by side. Have currently; Hold CTRL and select the 2 buttons on the taskbar. Right-click and choose format. This has not worked for me.

  • Please help.my screen is sideways!

    I accidentally pressed a button on my keyboard now my whole screen is sideways! How can I fix it?

  • BlackBerry provides javascript api to scan QR code?

    We are developing an application using IBM polisher/polisher (HTML5, CSS, Jquery) now QR code analysis we wonder how to integrate the QR code analysis in it?