220 views
in GUI Development by

Hi,

I'm implementing a menu using vertical list the requirement is as such that the selected item in the list should highlight with some background color which is already achieved 

The issue I'm facing is with the icons there are two set of icons for each item (highlighted icon & nonhighlighted icon ) 

When selected it should show highlighted icon & change the previous item icon to its nonhighlighted icon 

eg when I navigate & select say twitter it should show its highlighted image and say previous selected item was Instagram it should show its nonhighlighted image 

I have created separate bitmap resources for highlighted & nonhighlighted 

  

thanks

1 Answer

0 votes
by

Hello Kunal,

I do not fully understand your question. Have you difficulty to create the bitmap resources? Or you don't know how to switch the images? Or you don't know how to manage the selection within the list? Depending on your problem I would recommend following documentation:

Multi-frame and animated bitmaps

Configure a multi-frame bitmap resource

Select the frame number of a multi-frame bitmap resource

Select an item within the list

Managing component state

Also possible approach: instead of using two sets of bitmaps (highlighted and non-highligted) you can use only one set of bitmaps in format ALPHA8. Such bitmaps are then monochrome and you can determine the color dynamically at the runtime. Since your images seem to be monochrome, this should work in this case. Following documentation may help you here further if you prefer this approach:

Colored vs. alpha-only bitmaps (supported bitmap formats)

Member attributes: Format

Colorize alpha-only bitmaps

I hope it helps you further.

Best regards

Paul Banach

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...