Change StandardListItem, rebuild it as ListItemComponent

Hello

I like the look and feel of a StandardListItem in a ListView.

Unfortunately, it cannot be changed easily.

Now, I'm trying to rebuild this StandardListItem like a ListItemComponent of several containers and labels.

The layout of the dispute tags is not a big problem, it takes just time - but my problem is how can I mark my item exactly as a StandardListItem behaves when it is selected and the ActionItems are displayed?

It is not all simple changing context, it is melted and preselect the front borders is getting fully 'selected' in this light blue.

Someone at - it never solve this problem?

I thought I'd share what I could accomplish doing something close to a ListItemComponent and make it look like. I have attached the box outline of listitem. The amd for the image file

#RimCascadesAssetMetaData version=1.0
source: "listitemselectbox.png"
sliceMargins: 5 5 5 5

The QML code

                    ListItemComponent {
                        type: "item"
                        Container {
                            id: listItemContainer
                            minWidth: 768.0
                            maxWidth: 768.0
                            minHeight: 111.0
                            maxHeight: 111.0
                            layout: AbsoluteLayout {
                            }
                            contextActions: [
                                ActionSet {
                                    title: qsTr("Actions")
                                    subtitle: qsTr("My Actions.")
                                    ActionItem {
                                        id: informationAction
                                        title: qsTr("Information")
                                        imageSource: "asset:///icons/info.png"
                                        onTriggered: { do somthing }
                                    }
                                }
                            ]
                            gestureHandlers: [
                                LongPressHandler {
                                    onLongPressed: {
                                        selectBoxImage.visible = true
                                        longPressAnimation.play()
                                    }
                                }
                            ]
                            ImageView {
                                id: selectBoxImage
                                imageSource: "asset:///common/listitemselectbox.amd"
                                minWidth: 768.0
                                maxWidth: 768.0
                                minHeight: 109.0
                                maxHeight: 109.0
                                visible: false
                            }
                            Container {
                                id: selectFadeContainer
                                minWidth: 768.0
                                maxWidth: 768.0
                                minHeight: 109.0
                                maxHeight: 109.0
                                background: Color.create("#FF00A7DE")
                                opacity: 0.0
                                animations: [
                                    FadeTransition {
                                        id: longPressAnimation
                                        fromOpacity: 0.0
                                        toOpacity: 0.4
                                        duration: 200
                                    }
                                ]
                            }
                            Container { custom container }
                            Divider {
                                layoutProperties: AbsoluteLayoutProperties {
                                    positionY: 109.0
                                }
                            }
                        }

It is the animation. Now I'm wondering how to change to solid when I release the long pressure and how to erase everything when the contextAction menu goes.

Tags: BlackBerry Developers

Similar Questions

  • How to remove the underline from a StandardListItem

    Hello, I want to remove the underlining of a StandardListItem, I tried to increase the height to match the underlining with my background image but no result

    {StandardListItem}
    reserveImageSpace: false
    Description: {}
    ListItemData.type;
    }

    }

    Thanks to you all

    Ok

    So instead of StandardListItem, try setting the ListItemComponent. Something like the bellows of the sample, and you need to override the default behavior of GroupDataModel::itemType() also.

    function itemType (data, indexPath) {
        return "myItem";
    }
    listItemComponents: [
        //-- define delegates for different item types here
        ListItemComponent
        {   type: "myItem"
            Label {
                text: ListItemData.text
            }
        }
    ]
    

    https://developer.BlackBerry.com/Cascades/reference/bb__cascades__listitemcomponent.html

    I hope this helps.

  • A data source using an app does not not to start

    I'm adopting the tutorial: https://developer.blackberry.com/cascades/documentation/device_platform/data_access/using_data_sourc... at my request. The only difference is that my app is based on the tabs. Following however to add lines in my file qml, makes the application crashes the gray screen with BB10 logo.

        Tab {
            title: "edit list"
            imageSource: "asset:///images/note.png"
            content: Page {
                titleBar: TitleBar {
                    title: "editing list: " + workingOnList
                    visibility: ChromeVisibility.Visible
                }
                Container {
                    id: view
                    ListView {
                        layout: StackListLayout {
                        }
                        preferredWidth: 640.0
                        // Associate the list view with the data model that's defined in the
                        // attachedObjects list
                        dataModel: dataModel
    
                        listItemComponents: [
                            ListItemComponent {
                                type: "item"
    
                                // Use a standard list item to display the data in the model
                                StandardListItem {
                                    title: ListItemData.category_name
                                }
                            } // end of ListItemComponent
                        ]
                    }
    
                    attachedObjects: [
                        GroupDataModel {
                            id: dataModel
                        },
                        DataSource {
                            id: dataSource
    
                            // Load the data from an SQL database, based on a specific query
                            source: "database.db"
                            query: "select * from categories"
    
                            onDataLoaded: {
                                // After the data is loaded, insert it into the data model
                                dataModel.insertList(data);
                            }
                        } // end of DataSource
                    ]
    
                    onCreationCompleted: {
                        // After the root Page is created, direct the data source to start
                        // loading data
                        dataSource.load();
                    }
                }
            }
        }
    

    The only differences are: code is pasted in the {} instead of {Page} tab, and of course, the name of the database, the columns are changed.

    I added bb.data 1.0 import statement in the file .qml, the .pro file was also changed according to the tutorial. Path to the database file is correct.

    You have an idea, why this is happening?

    Another issue related to the data source:

    my main.qml file:

        Page {
            id: mainScreen
            titleBar: TitleBar {
                title: "your lists"
                visibility: ChromeVisibility.Visible
            }
            Container {
                ListView {
                    id: allListsView
                    objectName: "allLists"
    
                    layout: StackListLayout {
                        headerMode: ListHeaderMode.Sticky
                    }
    
                    dataModel: allListsModel
    
                    listItemComponents: [
                        ListItemComponent {
                            type: "item"
    
                            StandardListItem {
                                title: ListItemData.list_name
                            }
                        },
                        ListItemComponent {
                            type: "header"
                            Header {
                                title: ListItemData
                            }
                        }
                    ]
                    onTriggered: {
                        select(indexPath);
                        var page = listPage.createObject();
                        nav.push(page);
                    }
                }
    
                attachedObjects: [
                    ComponentDefinition {
                        id: listPage
                        source: "listPreview.qml"
                    },
                    GroupDataModel {
                        id: allListsModel
                        grouping: ItemGrouping.ByFirstChar
                        sortingKeys: ["list_name"]
                    },
                    DataSource {
                        id: allListsSource
    
                        source: "database.db"
                        query: "select * from lists"
    
                        onDataLoaded: {
                            allListsModel.insertList(data);
                        }
                    }
                ]
    
                onCreationCompleted: {
                    allListsSource.load();
                }
            }
    

    New screen grows without any problem after clicking on list items. But when I add the following lines to listPreview.qml, application stucks selection list item and nothing happens.

    Page {
    
        content: ListView {
            id: myListView
    
            dataModel: dataModel
    
            listItemComponents: [
                ListItemComponent {
                    type: "item"
    
                    StandardListItem {
                        title: ListItemData.article_name
                    }
                }
            ]
        }
    
        attachedObjects: [
            GroupDataModel {
                id: dataModel
            },
            DataSource {
                id: dataSource
    
                source: "database.db"
                query: "select * from articles"
    
                onDataLoaded: {
                    dataModel.insertList(data);
                }
            }
        ]
    
        onCreationCompleted: {
            dataSource.load();
        }
    }
    

    It looks like I can not query the DB for the second time commenting on the DataSource {...} of listPreview.qml pushed the new app screen without any problems.

    EDIT:

    a simple solution: I forgot to add the statement import bb.data 1.0 in listPreview.qml

  • conflict management

    If a photo (jpeg) file that is located in the 'Library of Photos-> Masters' folder is modified directly, Photos detects the change without rebuilding the library?

    Once the change is detected, how to resolve the conflict? Is the iCloud version or local is a priority?

    PS I know that master files inside the photo library are not intended to be touched at all, but I'm curious to know how the Photos handles this situation.

    No - that will be corrupted library and cause data loss - you should never make any changes to the content or the structure of a database SQLite as Photos (iPhoto and) using external programs

    Photos will not detect the change - it will simply be problems with your library forever

    And reconstruction will not solve this intentional corruption

    LN

  • Lenovo P780 system update does not work

    Hi all

    i, m using Lenovo P780 4 GB

    at the present time the OS P780_ROW_S115_130807 worm

    4.2.1 Android

    I try update day but not workin after I download the update I chood update now, it will restart but nothing happen is like restart as usual, the update does not show

    any idea or not can do to update?

    Ok... You are grounded. Have you removed all the apps system? If you have done which causes the failure.
    Did you also change the replenishment of stocks?

    In this case, the best way to go is to factory reset the phone and try again to OTA update. (If you have changed the rebuilding of inventories with a recovery of CWM or TWRP, factory reset will not help). You can also try the smart Wizard after the reset.

    Important: Please ensure that the download and dosent of process (update) install get interrupted!

    Let me know how it goes.

  • ListView and ListItem displaying funny

    How is it when I have my. XML directly in my ListView, all list items display correctly, but if I add data to a data source, it is not.

    Example below because I can't explain it very well.

    ListView {
                dataModel: XmlDataModel {
                    source: "hills.xml"
                }
                listItemComponents: [
                    ListItemComponent {
                        type: "listItem"
                        StandardListItem {
                            title: ListItemData.skiHill
                        }
                    },
                    ListItemComponent {
                        type: "header"
                        Header {
                            title: ListItemData.key
                            touchPropagationMode: TouchPropagationMode.None
                        }
                    }
    

    Vs.

    ListView {
                dataModel: dataModel
                listItemComponents: [
                    ListItemComponent {
                        type: "listItem"
                        StandardListItem {
                            title: ListItemData.skiHill
                        }
                    },
                    ListItemComponent {
                        type: "header"
                        Header {
                            title: ListItemData.key
                            touchPropagationMode: TouchPropagationMode.None
                        }
                    }
    
    ...
    
    attachedObjects: [
            GroupDataModel {
                id: dataModel
                sortingKeys: [
                    "skiHill"
                ]
            },
            DataSource {
                id: dataSource
                source: "hills.xml"
                query: "/root/listItem"
                onDataLoaded: {
                    dataModel.insertList(data);
                }
            }
    

    On the 2nd day of two different types of lists, the list item displays the news from another part of my XML, not the name of ski hill.

    Your head should look like:

     ListItemComponent {
                        type: "header"
                        Header {
                            title: ListItemData
                            touchPropagationMode: TouchPropagationMode.None
                        }
                    }
    

    i.e. just use ListItemData for the title - because since a GroupDataModel (and probably XmlDataModel) the first level of the row is always returned as a string, not as a piece of real data that has properties

    ListItemComponent {
                        type: "item"
                        StandardListItem {
                            title: ListItemData.skiHill
                        }
                    },
    

    Your list items must have the type 'point' - because that's what indicates the GroupDataModel.

    You can substitute by using a reminder in QML itemType(), if you need something different, or if you need a mixture of different types in the list

  • What is correnct how to use GroupDataModel custom inside a qml?

    Hello.

    Got this code qml

        Tab {
            title: qsTr("Friends")
            content: NavigationPane {
                Page {
                    content: ListView {
                        id: friendsView
                            dataModel: friendsModel
                        listItemComponents: [
                            ListItemComponent {
                                type: "header"
                                StandardListItem {
                                    title: friendsModel.header
                                }
                            },
                            ListItemComponent {
                                type: "item"
                                StandardListItem {
                                    title: friendsModel.first_name
                                    description: friendsModel.last_name
                                }
                            }
                        ]
                    }
                    onCreationCompleted: {
                      if (friendsModel){
                        console.log("Here is non 0 model")
    
                      }
                    }
                }
    
            }
        }
    

    And this C++ code

        FriendsApiService* friendsApi = new FriendsApiService();
        friendsApi->getFriendsList();
    
        QmlDocument *qml = QmlDocument::create("asset:///main.qml")
        .parent(this);
    
        qml->setContextProperty("friendsModel", friendsApi);
    
        AbstractPane *root = qml->createRootObject();
    
        app->setScene(root);
    

    It's interesting because I see my virtual functions in groupdatamodel (childcount() and data()), debugging messages

    but then was an error in the console: "Reference error cannot find varialable friendsModel.

    So as a result, I got 5 (cause my model data has 5 rows) empty strings in my ListView.

    In your StandardListItem you use ListItemData.first_name, not friendsModel

  • SAP GUI and integration of MS-Word

    Hi all

    We try thinapp SAP GUI.

    We followed the preparation of Solution VMware document "SAP GUI with VMware Thinapp virtualization".

    Normally, for an edition of the text, a word element is integrated in sapgui.

    To do this, it downloads a word "SAPscriptWord2007" template

    Here the problem comes.

    With the thinapp, the sapgui downloads the file in \AppData\Roaming\Thinstall\SAPGUI\%AppData%\Microsoft\templatesusernameC:\Users\

    Which makes sense, because it is the thinapp location.

    But then, he's trying to load the model from \AppData\Roaming\Microsoft\TemplatesusernameC:\Users\

    The test is performed:

    -remove the template in two directories of model

    -Start sapgui thinapp and start text change application

    = > error: cannot locate the stencil

    -file model found in \AppData\Roaming\Thinstall\SAPGUI\%AppData%\Microsoft\templatesusernameC:\Users\

    -Copy the file C:\Users\username\AppData\Roaming\Thinstall\SAPGUI\%AppData%\Microsoft\templates on C:\Users\username\AppData\Roaming\Microsoft\Templates model

    = > sapgui textedit application works.

    I don't know if it's a problem of Thinapp or SAP

    Could you help her?

    Thanks for your help!

    Buijspa

    I think the problem is:

    • a % Appdata % sup with attributes.ini containing DirectoryIsolationMode = WriteCopy

    Isolation of the WriteCopy mode means that:

    • Editing virtual items go to the sandbox
    • Changes to the components of the system go to the sandbox
    • The new elements will be created on the sandbox *.

    You need to change it to : fusion so that these rules will be applied:

    • Editing virtual items go to the sandbox
    • Changes to the components of the system go into the system
    • The new elements will be created on the system *.

    * - your SAP creates new files and those stored in the sandbox that is not accessible by native applications installed/other virtualized. Those are able to be accessed only by SAP virtualized. When you change this behavior new files will be stored in the system, and all applications will be able to access.

    Change it, rebuild the package, remove the hourglass and try it.

    Let us know,

  • Questions about ThinApp

    I started read up and experiment with ThinApp 4.6.1 and have a few questions that I still see the answers for.

    -How do you apply update to ThinApp had Office? It seems to me that you would have to rebuild the package on your pc of creator with the updates and then redistribute. Is this correct?

    -The manual says use a snapshot own VM do your ThinApp creation on and then remove the snapshot after the process of return to clean the BONES. This means you do not usually store your projects so you can easily regenerate? In fact, once the project has been built, it is possible to re-run the build process? I don't see how you would. Is the process of generating a moment turned?

    -I keep seeing errors in the build process that says white space detected in xxx.txt. Sometimes I find the spaces and remove them but sometimes I go to the line in the file and don't see any extra space. I have run the generation and everything seems to work OK. Anyone know what is happening with this?

    -In the construction of a ThinApp with Office 2010, I use the same settings but, sometimes, the local file machine.txt is 40 MB and sometimes it's 80 +. Why is there such a big difference between the two versions that have been made in the same way on the own VM even?

    -Why would I want to make my package a MSI vs a .dat file?

    DRM for the previews.

    Welcome

    -How do you apply update to ThinApp had Office? It seems to me that you would have to rebuild the package on your pc of creator with the updates and then redistribute. Is this correct?

    You have more options for the update:

    -reconstruction of new package (I would preffer). You can use VM to capture application, so I preffer to use snapshot technology to save the State of the machine before and after the installation of updates.

    -run the update inside the virtual bubble. In this way, the changes are saved in the sandbox. Then use utility sbmerge.exe to save the changes to the sandbox in the package. I would preffer this solution, because not all changes made by the update can be saved in the sandbox (depends on your isolation mode).

    For redistribution. If you use the option of streaming, you don't need to redistribute. You can read in the documentation on page 53.

    -The manual says use a snapshot own VM do your ThinApp creation on and then remove the snapshot after the process of return to clean the BONES. This means you do not usually store your projects so you can easily regenerate? In fact, once the project has been built, it is possible to re-run the build process? I don't see how you would. Is the process of generating a moment turned?

    You would keep in mind the projects, but they will be store on another machine. Some file servers, you would have large number of virtual machines as virtualized applications. Sometimes it takes just to change the isolation mode or modify some files. You make your simple change and rebuild the package, but you must clean VM to rebuild. You can rebuild the project to get the new virtualized application.

    -I keep seeing errors in the build process that says white space detected in xxx.txt. Sometimes I find the spaces and remove them but sometimes I go to the line in the file and don't see any extra space. I have run the generation and everything seems to work OK. Anyone know what is happening with this?

    No from your description. Maybe when you write a concrete problem and newspapers.

    -In the construction of a ThinApp with Office 2010, I use the same settings but, sometimes, the local file machine.txt is 40 MB and sometimes it's 80 +. Why is there such a big difference between the two versions that have been made in the same way on the own VM even?

    If you mean HKEY_LOCAL_MACHINE.txt. This file stores all changes in the registry keys during the installation process. Then maybe these differences are caused by something else. It may be useful to compare two files and see what are the differences there.

    -Why would I want to make my package a MSI vs a .dat file?

    DAT file is the data container and it is good for streaming scenario (company computers w / access to the corporate network). MSI packages are good for the installation script (laptop users with or without access to the corporate network).

    Try to read all the documentation. I think you'll like Thinapp.

  • ADMNonModalDialog sample

    Hello

    I tried to edit the resource file of ADMNonModalDialog, to simply remove an element (beepbeepButton) the windows Vc Resource Editor dialog box,

    It is not displayed the dialog box when I click on "window-> sdk > display dialog box ADMNonModal" even when I undo changes and rebuild.

    I can't find what is a mistake.

    Help, please...

    Thank you.

    A previous post I did on I think that your problem is:

    You ran into one of my hobbies, I'm afraid - the SMA does not support DIALOGEX.

    I think you will find that when "nothing happens", I seems to be suspended; If you hit escape but, I think that he act like you press simply will cancel your dialog missing at least, is how it has been.

    Fortunately, the solution is quite easy. Change DIALOGEX to DIALOGUE and remove the line of POLICE (entirely). Save, compile and your dialog box should appear. The only drawback here is that whenever you use the Studio dialog editor, it's going to save it as DIALOGEX. In fact, I downloaded a utility regex and added a build step to the DIALOGEX-> changes in the DIALOG box. It's annoying, but it saves you big problems, especially if you're hilarious dialogues a lot in the Studio.

  • SLOW DB

    Hello... GUY

    MY DATABASE (9.2.0.4.) A SUDDENLY SLOW, NOW WHERE WILL CHECK FIRST PLEASE IF YOU KNOW SHARE WITH ME...

    Check the session sql albums that use most of the processors and the memory and statspack report and find the top of the page to wait and albums sql queries and discover the causes.

    Check it out, if necessary

    i. all applied patches
    II. the reformation Stats
    III. different dataload
    IV. any change init.ora
    v. any hardware changes (disk, CPU, etc.)
    VI. any change of version of database
    VII. schema changes (add, rebuild, index constraints)
    (b) the other is to collect pictures of statspack or awr (in 10 g) at regular intervals of 30 minutes each.
    i. generate a report/AWR statspack between several snapshots that were taken not more than 60 minutes, regardless of the other during the performance problem.

  • Some icons in my computer, in Windows Explorer on the desktop, or on the Quick Launch bar change randomly. This problem occurs if the icon cache is not updated correctly. How can I rebuild the icon cache solves this problem

    Some icons in my computer, in Windows Explorer on the desktop, or on the Quick Launch bar change randomly. This problem occurs if the icon cache is not updated correctly. How can I rebuild the icon cache solves this problem

    http://www.Vistax64.com/tutorials/117229-icon-cache-rebuild.html

    How do I rebuild the icon Cache in Vista

    See you soon.

    Mick Murphy - Microsoft partner

  • Change the layout in StandardListItem

    I have a following code:

    StandardListItem {
       title: ListItemData.article_name
       imageSource: "asset:///images/hide.png"
    }
    

    By default, the image is loaded on the left hand side, and I want to right-align the text remaining on the left. How can I get this effect?

    Furthermore, is it possible to use only this image (and not the rest of the entire StandardListItem) as a button and assign an action?

    You can't do either of these things with StandardListItem. It is a standard part "fixed", not particularly customizable.

    Roll your own based on ListItemComponent...

  • How to change the color of the font of StandardListItem?

    As the black soil, the text on the StandardListItem become very difficult to read.

    Does anyone know how to change the color of the font to StandardListItem.

    Thank you.

    Theres no code really, you just need to format html text, except my statement of color in the text was defective, just color: and not font color:

    Your text here

  • Materialized view rebuild to change size of column

    We have changed the size of a varchar2 column in an OLTP table... The matte view in the warehouse pointing to this table/column complains... Is there an argument to 'rebuild' for materialized views in Oracle as I've seen in other databases? Or should I remove mast view create view Matt, create indexes and collect the tablestats to get it to pick up the new size of the column.

    The following statement compiles the matte view but does not pick up the new size and the matte view guard Plains.
    alter materialized view sms_ar.mv_sufficiency compile;
    I tried to put the argument of the 'reconstruction' on it but could not operate.

    Hi Mark,

    What is

    SQL> create table t(x varchar2(5))
    Table created.
    
    SQL> create materialized view mv
    as
      select x from t
    Materialized View created.
    
    SQL> alter table t modify x varchar2(10)
    Table altered.
    
    SQL> desc t
    TABLE t
     Name                                      Null?    Type
     ----------------------------------------- -------- -----------
     X                                                  VARCHAR2(10)
    
    SQL> desc mv
    TABLE mv
     Name                                      Null?    Type
     ----------------------------------------- -------- -----------
     X                                                  VARCHAR2(5)
    
    SQL> alter materialized view mv modify x varchar2(10)
    Materialized View altered.
    
    SQL> desc mv
    TABLE mv
     Name                                      Null?    Type
     ----------------------------------------- -------- -----------
     X                                                  VARCHAR2(10)
    

    Concerning
    Peter

Maybe you are looking for

  • Mail App crash Reped

    my mail app keeps crashing ios 9.2.1 any corrections!

  • Tecra M5 docking station problems

    Hello I don't know if this has happened elsewhere, but my Tecra M5 (Win XP / SP 3 / fully updated on MS) boots when undocked, but hangs on the appearance of the first "Loading Windows" screen Re-booting subsequently always results in the typical menu

  • Photo transition effects

    I want to apply transition effects to multiple pictures, I found an activX, Xshow, but its output is not picture frames, I need all the frames Please help me

  • I have a HC-PS3052 bluetooth headset, I can use it on the computer?

    How can I use a HC - PS3052 BLUETOOTH HEADSET WITH COMPUTER, I cannot FIND a DRIVER for IT.

  • HP Pavilion a1700n turns off without reason

    I have a desktop pc after startup it wil stop without reason after 2, 10, 30 min. 1 hour etc. won't stay running. I've eliminated a heat problem I think, tried to cleaned of the heat sink new PSU, made sure that all the fans were running same scrap a