Piraba
Piraba

Reputation: 7014

Android setTitle in the tab ActivityGroup

My application is Tab using ActivityGroup.I have done title of each activity using getParent().getParent().setTitle("New Tilte");.

My Problem is :

I have 2 tab.

Sale have 3 child .

 RouteActivity - Title--Route
 Retailer      - Title--Retailer
 OrderActivity - Title--Order

Inquiry have 2 child ..

 StockActity -- Title Stock Inq
 PriceActivity-- Title Price Inq

Currently i am in inquiry tab's StockActitywhen I click the Sale Tab,It show Retailer(last open activity) activity.But it didn't show title as Retailer but show as Stock Inq.

I.e) When I navigate/switch tab, it want to show selected activity's title name.

Currently it showed previous tab's selected activity title name. It didn't change.

I did using this getParent().getParent().setTitle("New Tilte");.

Android ActivityGroup's child activity setTitle not working

Please help me out from this bug.

Thanks in advance...

Upvotes: 0

Views: 545

Answers (1)

Adil Soomro
Adil Soomro

Reputation: 37729

move your code:

getParent().getParent().setTitle("New Tilte");

to onResume() of every Activity.

Upvotes: 2

Related Questions