Background of adjustment to ListView together instead of each ListItem

I have successfully put a background image of nine slices for a ListView. My problem is that it repeats on each ListItem, when I want only that it contains the entire list once without repeating. Does anyone know how?

// Tabbed Pane project template
import bb.cascades 1.0

NavigationPane {
    id: circuitsPane
    backButtonsVisible: true
    Page {
        id: circuitsList
        Container {
            background: background.imagePaint
            leftPadding: 20.0
            rightPadding: 20.0
            Container {

            }
            ListView {

                function getBackground() {
                    return background2.imagePaint
                }

                dataModel: XmlDataModel {
                    source: "models/circuits2.xml"
                }

                listItemComponents: [

                    ListItemComponent {
                        type: "header"
                        Container {
                            background: Color.Transparent
                            preferredHeight: 30.0
                        }
                    },
                    ListItemComponent {
                        type: "listItem"
                        Container {
                            leftPadding: 20.0
                            rightPadding: 20.0
                            StandardListItem {
                                title: "" + ListItemData.circuitCountry + ""
                                description: "" + ListItemData.circuitTrack + ""
                                status: "" + ListItemData.circuitDate + ""
                                imageSource: ListItemData.circuitFlag
                            }
                        }
                    },
                    ListItemComponent {
                        type: "ListView"
                        Container {
                            background: ListItem.view.getBackground()
                        }
                    }
                ]

                onTriggered: {
                    clearSelection();
                    select(indexPath);
                    var selectedItem = dataModel.data(indexPath);
                    var page = circuitsInfo.createObject();
                    circuitsPane.push(page);
                    page.circuitPhoto = selectedItem.circuitPhoto
                    page.circuitDiagram = selectedItem.circuitDiagram
                    page.circuitHistory = "" + selectedItem.circuitHistory + ""
                    page.circuitCountry = "" + selectedItem.circuitCountry + ""
                    page.circuitTrack = "" + selectedItem.circuitTrack + ""
                    page.circuitDate = "" + selectedItem.circuitDate + ""
                    page.circuitFlag = selectedItem.circuitFlag
                    page.circuitStats = selectedItem.circuitStats
                }
            } // End of ListView
        } // End of Container
    } // End of Page
    attachedObjects: [
        ComponentDefinition {
            id: circuitsInfo
            CircuitsInfo {
            }
        },
        ImagePaintDefinition {
            id: background
            imageSource: "asset:///images/Noise_256x256.amd"
            repeatPattern: RepeatPattern.XY
        },
        ImagePaintDefinition {
            id: background2
            imageSource: "asset:///images/ControlBorder.amd"
        }
    ]
    onPopTransitionEnded: {
        // Transition is done destroy the Page to free up memory.
        page.destroy();
    }
}// End of NavigationPane

Your only real solution to this and one that I use in some places is to have 3 different goods. One for the top one for all middle and then one for the bottom. Then use the row to determine what assets to choose from for the background of the list item.

if(ListItem.indexPath == 0) {}
Return "asset:///images/card/activity_card_bg_top.png.amd".
} Else if (ListItem.indexPath == venueItem.ListItem.sectionSize - 1) {}
Return "asset:///images/card/activity_card_bg_bottom.png.amd".
} else {}
Return "asset:///images/card/activity_card_bg_middle.png.amd".
}

Tags: BlackBerry Developers

Similar Questions

  • How to add details to a music folder. I want to add artist, song, album together instead of each opening and make a song at a time

    I have a 22 000 songs itune library.
    I just changed my WMA to MP3.

    In my library, the details section only lists the title of the song, but not the Album or artist.
    When I go to customize details section, it does not accept the changes

    If I could add them at the same time, it save me a lot of time.

    Thank you.

    Hi Mattieboy,

    You will need to use Windows media player to add the missing information on the music file automatically or manually.

    For more information, see the article.

    Add or edit media information

    http://Windows.Microsoft.com/en-us/Windows-XP/help/Windows-Media-Player/11/album-info

  • Why did I suddenly lost the ability to view real images in any directory? I see now are drawn the same landscapes instead of each image. That's happened?

    Why did I suddenly lost the ability to view real images in any directory? I see now are drawn the same landscapes instead of each image. That's happened?

    Why did I suddenly lost the ability to view real images in any directory? I see now are drawn the same landscapes instead of each image. That's happened?

    Method #1

    Start button > in the search box, type options records > press the Enter key > click on view tab > under files and folders, uncheck "Always show icons, never thumbnails" > OK

    Method #2
     
    Start button > Control Panel > Classic view > systems > left column, system settings advanced > Performance tab, click on settings > tab Visual effects, click 'Show thumbnails instead of icons' > OK

    For the benefits of others looking for answers, please mark as answer suggestion if it solves your problem.

  • How do I set the background / highlight on the listView when select multi use

    Hi, I'm used to select multi on the list view, the problem is when the selected item does not change the background (I think by default will change in light blue)

    Maybe because I'm not using StandardListItem on itemList, I use clean container for itemList.

    How to set the color to the element highlighted on multi select listView?

    Thank you

    I use the background property on my customized itemList:

    {Of container

    ID: listItemContainer

    background: listItemContainer.ListItem.selected? Color.Create("#18AFE2"): Color.create("#018AFE2")

    ...

    }

  • Why iTunes 12.5 play my library of songs together, instead of playing the album from the chosen song

    When I get to the album, and and select a song in an album, itunes plays all songs in the library, instead of just playing this specific album, beginning of the song I've selected.

    Double-click the first track you want to play instead of use the blue play button.

    TT2

  • Why is the background on my page firefox back instead of white

    I tried everything I could think of to fix this problem without success, please help.

    Open a new window or tab. In the address bar, type Subject: config.
    If a warning screen is displayed, press the button to be careful .
    That's where Firefox considers the information he should run.
    At the top of the screen is a search bar. Type
    Browser.Display.background_color and press ENTER.

    Is the #FFFFFF value

  • read the measure about 10 lines instead of each line

    Hello.

    I have the dilemma.

    I have a file of great extent with 1ms rate and number of columns. If a single line, a miliseconds.

    Now, I don't need this big resolution, I only need data to 40 ms.

    How can I do?

    Thank you.

    Something like that.  I clicked on the text file reading and has configured to read the lines, reading 10 lines at once.

  • Compositional technique to remove backgrounds in a mobile shot

    Hello people; I hope you do well!

    I would like to talk about a compositional technique used to remove a background so that new objects, e.g. masts paints etc to put in the background.

    As you can see in the image below, the background was removed in the first image and replaced with a new sky, dirt field and houses etc in the second photo.

    This photo came from a mobile shot where the camera was panning (moving) from left to right, so that it was a mobile shot.

    I note that the first photo also has a small green screen. I think that for the preparation of the budget and practical reasons, the background everything could not have green screens erected to cover the entire background of the junk in the shot.  So, by using a smaller screen in a part of the area, I believe that some technique is used to remove the background for it together. I saw VFX breakdowns where the same technique has been used - that is, a little green screen is placed somewhere in the background when the intention is to remove the entire background.

    Let's say that the shot was a slow, steady camera pan move for 10 seconds. Then at 24 frames per second, we seek to 240 images. I know at one point rotoscoping will be used, but find it me hard to believe that each of the 240 images will be rotoscoped individually to remove the background. If that was the situation where each image had to be rotoscoped, so I don't see the need for this green screen to have been erected in the first place.

    Therefore, I think that there is something that I'm missing here in what concerns a missing link in the process. Is there some recognized effective/technical effective time that allows to remove a background from a mobile call such as the following, where only a small green screen is erected part of the background instead of the background?

    A tutorial? You can tell me which helps with the technical/process in this case?

    Link to the example here:

    http://postimg.org/image/465jdt6of/

    First person rotoscopes a frame at a time. Second, with something like a shooting panoramic you'd Motion stabilize first. Stabilize the Motion isn't stabilizing the Warp. The camera movements you stop monitoring something in shooting you want to hold still. The next step with a shot like the one you describe is to expand the size of the publication so that you can see the shot together as it moves. There are small buttons in the composition settings so you can do it more effectively.

    Then you add a new layer to the comp and use a blend mode, so you can see through the shot and you begin to frame 1 and draw a mask to separate remove background. Then you go at the end of the shooting and make changes, you need to do the mask. Then split you the difference and make other adjustments to the mask. If it's a pan smooth then it just usually takes a few keyframes to get the matte to follow perfectly.

    Now define mate as layer hiding approach for images and add your new background. If the matte line is far enough away from the camera so you don't have to worry about Parallax as the ball moves you did pretty much with the composite.

    The last step is to remove the Motion to stabilize the original shot and animate stability the root layer and the bottom plate. The best way to do this if you have not added, scale and rotation, the motion to stabilize should simply add a null value to the model. Then reveal property of anchor point of the stabilized layer which will be a lot of keyframes. ALT/option, click on the position of the null value property and use the pickwhip to connect the nulls position at anchor of the stabilized sequence. Now move the CTI to the first image and the parent then the matte layer, the background layer and image stabilized to null. This will be online back up everything. Resize the model or the NEST just in a new comp that matches the size and pace of the origin of the film and you are finished.

    That's all. Manual rotoscoping base and exactly what one would do with the example that you have demonstrated.

    If the replacement of background area is closest to the camera, then you would track camera so, define a plan of origin and the Earth, and then add a camera a solid to the shooting. You would do the same technique of roto using 3D solid and your bottom plate would also be a 3D layer. Pretty simple.

    Two examples of rapids. The first demonstrates the base roto but does not use the null thing to add to the query. The second demonstrates how to use the Camera Tracking to add a cache for a layer. You'll get the idea.

    Sorry, no audio on the second example.

  • I can restore the titles since and worms instead of correspondents?

    Thunderbird now displays the title of correspondents rather than from. I would like to know who sent the email, like everybody and the word of directly for it. The corresponding word really does not for me. This is adjustable as an option instead of a permanent thing?

    On an incoming message, "Correspondents" tells you what than the 'to' column would be. I do not understand how it fails somehow you.

    In any case, right-click the label of "Correspondents" and you will get a drop down list where you can select the columns that you want to appear. At the bottom of this list is a pair of buttons that allow you to apply your selection to other lists. But you have to pick carefully through which those need a 'From' and those who need a "To" or maybe both.

    I drop messages together in context or subject, coming in and out all together. 'To' and 'From' are not a good choice here because I don't need to see 'Go' on these messages, I sent, or 'To' on incoming messages.

    "Correspondents" this resolve intelligently showing me the 'other' parties to a conversation.

  • Way idiomatic for the item displayed in the ListView

    I have a ListView with a StackListLayout and SnapMode.LeadingEdge. ListItemComponent fill ListView together, so there is only one display item at a time (except animations).

    What is the idiomatic way to get the row of the displayed item?

    Recent firstVisibleItem property SDK version appears in ListScrollStateHandler. I didn't want to use it again. There is also firstVisibleItemChanged signal:

    https://developer.BlackBerry.com/Cascades/reference/bb__cascades__listscrollstatehandler.html#firstv...

    What I currently use for similar task is engaging LayoutUpdateHandlers to all items in the list and follow their updates to determine which element is the most visible. But the elements to stop sending updates when you go off the screen. I also had to use a timer to stop monitoring of off-field elements. If the first approach does not work I can give more details on this one.

  • Spacing between the delegates of the listview

    Hello

    I have this layout on a Page

            ListView {
                id: listView
                dataModel: modelData
                listItemComponents: [
                    ListItemComponent {
                        Container {
                            background: Color.Cyan
                            Label {
                            }
                        }
                    }
                ]
            }
    

    I want to insert a space between each listitem, how can I do this?

    I have created a new model of the ListView project and experimented a bit. The following seems to work:

                ListView {
                    dataModel: XmlDataModel {
                        source: "data.xml"
                    }
                    function itemType(data, indexPath) {
                        return "item"
                    }
                    listItemComponents: [
                        ListItemComponent {
                            type: "item"
                            Container {
                                topMargin: 50
                                bottomMargin: 50
                                background: Color.Cyan
                                Label {
                                    text: ListItemData.name
                                }
                            }
                        }
                    ]
                }
    

    Don't forget to return a good itemType, otherwise default ListItemComponent will be used and the changes are not visible.

  • horizontal ListView

    import bb.cascades 1.0
    
    Page {
        Container {
            background: Color.create("#52c1b1")
            ListView {
                layout: StackListLayout {
                    orientation: LayoutOrientation.LeftToRight
                }
                objectName: "customList"
                id: customList
                listItemComponents: [
                    ListItemComponent {
    
                       Container {
                           verticalAlignment: VerticalAlignment.Fill
                           horizontalAlignment: HorizontalAlignment.Fill
                           Label {
                               text:  ListItemData.fieldName
                           }
                       }
                    }
                ]
            }
    
        }
    }
    

    How can I set each item in the listview to take full width? I like to set up a pager... will put indicators page as well.

    Hi babakar,.

    For an implementation of a listview horizontal, please order the application expanded sample available in the Cascades-sample on Github repo: the sample link

    To make each item take the entire width, you must set the property flickMode to your ListView to SingleItem.

  • Welts on the listview?

    How does one go about setting a background color alternate on listview cells?

    My goal is to use 100% QML for this.

    Thank you!

    In a list item component

    Container {
        id: myitem
        layout: DockLayout {
        }
        background: {
                    if(myitem.ListItem.indexPath % 2 == 0) {
                        return Color.Black
                    } else {
                        return Color.White
                    }
                }
            }
    
  • Can not get on my desktop backgrounds - appears only a black color background

    I wanted a new theme for my computer so I decided to download the theme of 'Bing Maps aerial imagery of Europe. " After that I started to download the theme everthing was always very well - background images for this theme were projected on my desk. However, for one reason or another, I then decided that I turn to my old theme - while images of the theme 'Bing Maps aerial imagery of Europe' was still in download. However, after the change of theme, background image has not changed. Instead, was projected to place a background image for the theme 'Bing Maps aerial imagery of Europe'. As a result, I tried to remove the theme of "Bing Maps aerial imagery of Europe", but, unfortunately, Windows does not repsond to this action. Instead, I decided to delete all the images - those whose who had downloaded. However there is now a black background that I can not change, even when I change the theme that I use.

    I also noticed that there is a "unsaved theme" that contains the background of black. However, this theme can not be deleted.

    Hi Jakethepake,

    By the description, you can not change the wallpaper. In order to quickly provide a solution, please answer this question:

    Did you do changes on the computer before the show?

    Follow the suggestions below for a possible solution:

    Method 1: You can follow the steps in the article and check if it works.

    Why can't I change my desktop background?

    http://Windows.Microsoft.com/en-us/Windows7/why-cant-I-change-my-desktop-background

    Also, try with a different theme and see if the problem still occurs.

    Method 2: You can follow the steps in the article and check if it works.

    Impossible to change the background image in Windows 7

    http://support.Microsoft.com/kb/2504610

    Method 3: I also suggest that you scan your computer with the Microsoft Security Scanner, which would help us to get rid of viruses, spyware and other malicious software.

    The Microsoft Security Scanner is a downloadable security tool for free which allows analysis at the application and helps remove viruses, spyware and other malware. It works with your current antivirus software.

    http://www.Microsoft.com/security/scanner/en-us/default.aspx

     

    Note: The Microsoft Safety Scanner ends 10 days after being downloaded. To restart a scan with the latest definitions of anti-malware, download and run the Microsoft Safety Scanner again.

    Important: During the scan of the hard drive if bad sectors are found, the scanner tries to repair this sector, all available on which data may be lost.

    It will be useful. For any other corresponding Windows help, do not hesitate to contact us and we will be happy to help you.

  • Change the background color of the program Committee

    Is it possible to change the background color of the Panel program? I don't see a setting for this in the preferences. At the moment it is a dark gray:

    screenshot_468.png

    I'd like to be able to change it to something like this (this is just a mock-up using a bright color randomly):

    screenshot_468.fw.png

    For example, when I change the scale property or the Position of the motion in the effect controls panel control, and this dark gray background color appears, I would like to be able to clearly identify where the edge of my clip is. Having a color light 'sneak out' would make that easier than now.

    If you click on the key in the program monitor you can set the background of the Photoshop transparency grid instead of black, this will help to reveal when you moved the clip and do not frame address (if that's what you're after):

    MtD

Maybe you are looking for