Q10/Z10 - only property needed to change - possible without active selector?

Hello!

I'm reviewing my code to the Dev C Alpha and the question came up:

If I don't have a single property to change in my code QML to operate to the Q10 in comparison to the Z10, is it still necessary to do with the active static selector or is there a different way to minor differences?

Example something like this:

color: Q10? Black: white

Using the static selector active and subsequent management 2 different branches of my code looks like taking a sledgehammer to crack a nut.

What it the best and the most effective strategy for this?

Best regards

HELEx

I have separate properties in a javascript file called "constants.js" and use the feature active static selection for different constants to load depending on what type of phone is used:

Assets/720x720/constants.js
Assets/constants.js

The two files contain a different value for the constant "Q10":

var Q10 = true; Assets/720x720/constants.js
var Q10 = false; Assets/constants.js

For use in your qml it just at the top:

Import "constants.js" as Constants.js

For your example:

color: Constants.Q10? Black: white

Seems to work pretty well. I don't know if there is a better method, but it keeps the simple QML which is the main objective of the IMO

You might find it even simpler if you use color values to your constants, rather than using "Q10".

i.e.

color: Constants.myCustomColor

var myCustomColor = Color.Black;   Assets/720x720/constants.js
var myCustomColor = Color.White;  Assets/constants.js

I would also suggest using a current theme selector, rather than the resolution picker (because your variation is due to the combination of colors, rather than the dimensions of the screen)

i.e.

VisualStyle.bright/constants.js

VisualStyle.dark/constants.js

http://developer.BlackBerry.com/Cascades/documentation/UI/resolution/using_static_asset.html

Tags: BlackBerry Developers

Similar Questions

  • BlackBerry Z10 only delete email on my Blackberry without deleting on my server

    When I delete it on my Z10 it deletes the computer/server of my company.  How can I just remove it from the Z10

    Hub > three points > settings > display and Actions

    Scroll to delete on... and the value that you prefer.

  • Help! I need to connect my iPhone5s to the stereo, but it has only one usb port and whenever I connect it, it connects? Is there a setting on my phone, I need to change? Help, please

    Help! I NEED to connect my iPhone5s to the stereo, but it has only one usb port and whenever I connect it, it connects? Is there a setting I need to change on my phone? Help, please

    You will need something like that and a micro USB to USB cable

    http://www.Apple.com/shop/product/MD820AM/A/lightning-to-micro-USB-adapter

  • Only in a. won a Citizen receipt printer and I need to change the preference to print, I get a 'operations can not be a complete mistake.

    Only in a. won a Citizen receipt printer and I need to change the printing preferences I get a "operations may not be a complete mistake", I'm working on the administator. I am able to access printing preferences for all other printers that are on the computer.  This creates a problem that prevents the reception of a printing web-based program.

    I'm using a new hard drive with Windows 7 above.

    How do you re - define preferences depends on options software printers, and if this printer is fully supported under win7 - that is to say that the printer manufacturer provides some win7 drivers/software

  • I have a subscription, it's almost over, but I need to change plans and cannot select one I need in the menu plan for change, and I can't cancel. Is it possible to cancel it?

    I have a subscription, it's almost over, but I need to change plans and cannot select one I need in the menu plan for change, and I can't cancel. Is it possible to cancel it?

    Hello

    Please contact support by calling/chat for cancellation requests and billing queries:

    Contact the customer service

    * Be sure to stay connected with your Adobe ID before accessing the link above *.

    You can also check the help below document:

    https://helpx.Adobe.com/x-productkb/policy-pricing/cancel-membership-subscription.html

    Please go through the Adobe - General conditions of subscription as well.

  • I need to change the VAT number. I try a lot of possibility but no result. Someone can help me. THX

    I need to change the VAT number.

    I try a lot of possibility but no result.

    Someone can help me.

    THX

    Hello

    Please see Adobe Store | Order FAQ and your online payment

    You will need to contact support by calling/chat for this request.

    Contact the customer service

    * Be sure to stay connected with your Adobe ID before accessing the link above *.

    Kind regards

    Sheena

  • When I try to save a document, I get the message "the file is opened by another program or read-only. I need to change the name to save him.

    When I try to save a document, I get the message "the file is opened by another program or read-only. I need to change the name to save him. If I optimize a document, I rename it to save it. If I opened a PDF file of the architect drawings and turn them into fashion landscape so that they are easier to read, I have to rename it. I searched on the parameters to look for something that I could turn off, but I found nothing.

    Make sure that the preview in Windows Explorer option is disabled.

  • I tried fixing to uninstall Firefox reinstall that did not work. I always get the same error message: Firefox has stopped working. May need to change!

    I'm not the only one having this problem why Mozilla does not do something? I'm fed up about & may need to change to another browser! Firefox is the best browser I've ever had, but not more! Here I could go back to the old version - it worked great! The new version is when I started having this disorder.
    Time for Mozilla to step up & get that a difficulty or you will lose more than me I think! I disabled real arcade & most of the other modules. That did not help either.

    It is possible that your security (firewall, antivirus) software blocks or limit Firefox or the process of plugin-container without you inform, possibly after the detection of changes (update) for the Firefox program.

    Delete all rules for Firefox and the plugin-container in the permissions list in the firewall and leave your firewall again ask permission to get full unlimited access to the internet for Firefox and the plugin-container and the update process.

    See:

  • I need to change the note/endnote.

    I write my RESUME, and I have a large number of appendages, that I have to put in the body of the text.

    I tried to do in the pages and the best option is to use an endnote, but I need to change the Exhibitor in order to appear ' doc 1 ' ' doc 2 '' ' doc 3 "" doc 4 "instead of"1""2"'3' '4' only." ""»

    Is this possible?

    Y at - it another option in addition to the note?

    Thank you

    No one who wants to get hired puts notes/endnotes in their curriculum vitae. If you do this, you write a report, not a professional CV, which should be in a concise and standardized format (mainly for the very picky, the applicant tracking software). I suggest that you omit the end notes/notes and do research on what constitutes a professional cover letter and resume writing for your job sector target.

  • Need to change column Datatype on external Table

    Hi - I need to change a data type of column on an external table and I have a few questions.

    1. I've read that I can do a regular alter table change column statement, but I also see in the script behind the external table, the following instructions:
     FIELDS  MISSING FIELD VALUES ARE NULL(
            claim_number           POSITION(1-12)   INTEGER EXTERNAL(12),
            receipt_date           POSITION(13-8)   INTEGER EXTERNAL(8),
    ........
    When I run the statement column change he does not alter the column but does nothing in this clause. Is it possible to update this info as well?

    I wonder also (currently working at dev with a specification of invalid directory - soon to solve) - will I encounter a problem if I try to edit my article, if a file is located in the related directory? I ask because I know that to change the data type of the existing column in a table standard you must first set this null column, so I wonder how this rul applies when it is an external table.

    Thank you!
    Christine

    An external table does not store any data. The external file that contains data is only available at query time. You can remove the outer table and re-create it to change both the data type of the column in the table and the type of data in the file. using the statement ALTER TABLE... Type MODIFY instruction, you can modify the data of table column. You can also change the definition of the external table if the file is stored in the direcory and ready to be read through the external table.

    In an ordinary table, you can decrease the length of the column if the column is no longer, then the new column length:

    SQL >desc test
    Nome                Nullo? Tipo
    ----------------- -------- ------------
    A                 NOT NULL NUMBER
    B                          VARCHAR2(30)
    C                 NOT NULL NUMBER
    D                          DATE
    E                          DATE
    
    SQL >alter table test modify b varchar2(10);
    Tabella modificata.
    
    SQL >alter table test modify b varchar2(1);
    alter table test modify b varchar2(1)
    *
    ERRORE alla riga 1:
    ORA-01441: cannot decrease column
    length because some value is too big
    

    Max

  • How do I change my name that appears at the beginning of an email? I need to change my e-mail account name?

    My wife and I use the same email. I need to change the name that appears at the beginning of an email, a common name, rather than just my name. We use our email AOL. I need to change the name on the email account AOL to make this change? or is it possible to change this in Firefox? Thanks for help.

    The replacement must be made within the parameters of AOL. See the next page for instructions.

  • 8610 e: 8610 send email HP's need to change password but cannot find where do

    I used the scan to email for a long time. My gmail account has recently had a change of password and I need to change it in my printer. There was once a scan to E-mail wiizard but since installing windows 10 he's not here. Does anyone know how to do this?

    Hello

    Tap on WiFi / Ethernet icon on the printer and locate its IP address.

    From your PC, open a browser and navigate to the IP address of the printer.

    Open the San tab and select the profiles of outgoing e-mail following scan to Email section.

    Click on change profile mandatory email and follow the steps on the screen while keeping the current settings and only change the password.

    Note: If you do not set a PIN code (a code 4 digits for the digitization of the printer), delete the contents of box PIN which may be filled wrongly by the browser when the steps on the screen.

    Once you are done press on save and test.

    Kind regards

    Shlomi

  • I need to change the keyboard on Tecra M5

    Hello

    I need to change the keyboard on a tecra m5.
    Unfortunately, this is not mentioned in the manual how to do this.

    Please advice.

    Thanks in advance for your help.

    Best regards
    Wim Gijsels

    Hello

    I think that it s not mentioned in the manual, because I should only be made of professional technicians for laptop

    In any case, a friend of exchanged me the keyboard and told me to remove the keyboard first support. Who s the plastic cover between the keyboard and LCD display. So open the LCD screen and use your fingers on both sides and lift the keyboard bracket. There are two screws that attach the keyboard under the door-keyboard. Remove the two and lift the keyboard. Last but not least remove the keyboard plate to remove the cable from the keyboard connector.

    As you can read it's not that complicated and I hope I could help a bit! :)

  • Computer laptop need to change the HDD in the SDS?

    Have 3 questions related to the Toshiba SSD!
    1. what laptop need to change the HDD in the SDS?
    ATA, http://www.toshiba.com/taec/adinfo/ssdfacts/ so 1.8 and 2.5, I look at who is the same dimenssions and right?

    2. I have this model Toshiba R200-S2031, is it possible to change drive HARD 80-SSD 256 1.8 inches? I understand that my model has 1.8 IDE I can't take 2.5? But replace IDE ATA is possible that they are the same size?

    3. If I R500 with 64 SSD drive, can I replace it it with greater SDS and the same size of thumb? Let's say I have 2.5 64 GB SSD ich so I could replace it with 500 GB SSD?

    tnaks for answers.
    and Toshiba - thanks to make small laptops, really enjoy.
    you want to update faster, but I LIKE THEM!
    Thanks Toshiba!

    Husbands

    (1) as a general rule, all laptops can be upgraded to an SSD. If the connector on the SSD is the same as the original hard drive connector, it should work.

    (2) I believe there are 1.8 "PATA SSD available, google is your friend.

    (3) I think the R500 is using a connector ZIFF customized for the SSD drive, then you will not be able to install a standard SATA or PATA 2.5 "SSD Drive. I don't know if you can buy SSDS with the connector ZIFF, once again, google can help you.

  • With the help of slides as a Waveform Editor. Need to change slides, and I can't do what I want.

    I am creating a waveform synchronization tool using Labview.  The user needs to see the multiple waveforms and their calendar.  Then, this will create an output file to configure the chip.

    I have this right now, and it works, just not very elegant.  (It is attachment that says "no graphics").

    I would prefer something like that, but I need to change the background image and the size of the slider programmatically.  (This is the other attachment).

    Is this possible?

    Brett,

    It's more what you are looking for? I have just an idea to overlap your cursors with Digita waveform graph.

    ConnorM

Maybe you are looking for

  • Mail not arriving as graphic HTML on MacBook Pro

    E-mail arrives in the Inbox as a series of links rather than HTML and graphics. Is it me or the sender?

  • How can I remove the right of the Home's smiling face?

    I suddenly noticed last day right of home button there is an annoying smiley face button. How can I remove it?

  • HP 15-g029ca Notebook PC Windows 7 64-Bit Driver Wifi

    Hello Recently, I reformatted my laptop HP 15-g029ca and installed Windows 7 64-bit. However, it seems I'm missing some drivers as several functions of the laptop work not (Wifi, USB etc.). I checked Device Manager and all items under 'Other devices'

  • [Q] how to merge 2 different XY graph?

    Hello I'm currently having a stupid problem, I hope. I would like to draw the graph XY 2 and the other on the same graph, but I'm not able to. I tried to merge in many ways, but it does not work. I know there is probably a problem of size of my table

  • NEITHER DAQ tools Matlab

    Hello I installed NI-DAQ for Matlab tools. I have the ".m" files in the folder of the Toolbox, but I'm not able to run an any of them. I have a message 'Cannot run *.m file' term to 49 Please can you let me know how to use this tool? I heard somethin