语言

Menu
Sites
Language
header Item highlighting onInitialising

Hi All,

I have a problem with header Item highlighting.

I have to use 4 header items  for each of four forms.

when I am navigating from one form to another form first headerItem is highlighting.

What I have to do for  navigate from firstForm to 3rdForm, In the thirdForm Third Header item has to highlight but first headerItem is highlighting( by default).

do we have any options to highlight perticular header item OnInitializing.

 

Thanks

Rajyalakshmi

 

响应

6 回复
Alex Dem

Hi ,
Try to set inside OnInitializing() of every form

Header* pHeader = GetHeader();
...
pHeader->SetItemSelected(itemIndex);

where itemIndex is 'The index of the item to select'
For first form is 0,
for second is 1
e.t.c.
Alexey.

y Rajyalakshmi

Hey Alexey Thanks for your great response It is working fine thank you..

 

y Rajyalakshmi

Hi Alexy,

It is working fine for the first time. but it is not for later.

can you expalin me.

Thanks

Rajyalakshmi

Alex Dem

Hi Rajyalakshmi,
I don't know architecture of your app but I guess that all forms are created one time in OnInitializing() method, after this you switch between them using some common handler this way:
__pForm[0]->SetShowState(true);
__pForm[1]->SetShowState(false);
e.t.c
if so you need to add pHeader->SetItemSelected(itemIndex); for appropriate form in handler.
Please look at Tizen Native Project->Template->Tap-based Application.
There is one Form and some panels placed on it. Current panel are selected inside OnActionPerformed() on click of appropriate header item.
You could use this approach if it is applicable.
Alexey.

y Rajyalakshmi

Hi Alex,

All forms are not created on one time. 

I didnot used panels in my form. 

When I click on some button second form will initilize.

same for remaining forms also.

i need somethin like this. when i am initialising the form perticular header item has to initialize.

 

Thanks

Rajyalakshmi

Alex Dem

Hi,
You could use app based on Scene manager (see template) where all scenes and transitions should be described in "workflow.xml".

Here is main points:

Each form has its own header with some Items with unique ActionId for each Item  101,102.. for first form, 201, 202... for second form e.t.c. (for example).

Every class which describes form should contains identical code:
in SceneManagerForm1::OnInitializing(void)
{
...
   GetHeader()->AddActionEventListener(*this);
...
}

void
SceneManagerForm1::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
{
    if(actionId==201)// 102 in another form
    {
      SceneManager* pSceneManager = SceneManager::GetInstance();
       pSceneManager-GoForward(SceneTransitionId(ID_SCNT_2));//go to another scene with another form
          ...
    }
}

void
SceneManagerForm1::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
{
    GetHeader()->SetItemSelected(0);// 0 is index of current tab , should be 1 in another form e.t.c.
...
}

It should works.You could use this approach.

Alexey.