SwipeButton

A button with a default style to be used together with SwipeOptionsContainer. More...

Import Statement: import VPlayApps 1.0
Since: V-Play 2.7.0
Inherits:

AppButton

Detailed Description

The SwipeButton is a variant of the AppButton control intended to be used together with the SwipeOptionsContainer type. It comes with a default look that matches platform-specific styles.

 App {

   ListPage {
     //some JS array as list model
     model: [{text: "Item 1", detailText: "Detail 1"}, {text: "Item 2", detailText: "Detail 2"}]

     // define the SwipeOptionsContainer as delegate
     delegate: SwipeOptionsContainer {
       id: container

       SimpleRow {                         //actual content to be displayed in the list rows
         id: row
       }

       leftOption: SwipeButton {           //left options, displayed when swiped list row to the right
         text: "Option"
         icon: IconType.gear
         height: row.height
         onClicked: {
           row.item.text = "Option clicked"
           row.itemChanged()
           container.hideOptions()         //hide automatically when button clicked
         }
       }

       rightOption: AppActivityIndicator { //right options, displayed when swiped list row to the left
         height: row.height
         width: height
       }
     } // SwipeOptionsContainer
   } // ListPage

 }

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support