You can get the parent activity object, and then call title related methods.
On Fri, Oct 29, 2010 at 3:11 AM, Mark Wyszomierski <mar...@gmail.com> wrote: > Hi, > > I have a TabActivity. Each tab hosts its own activity. I wanted to use > a custom titlebar. I don't believe it's possible to access the custom > titlebar from the child activities: > > // main tab activity > public class MainTabActivity extends TabActivity { > protected void onCreate(Bundle savedInstanceState) { > super.onCreate(savedInstanceState); > > requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); > setContentView(R.layout.my_content); > getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, > R.layout.my_header); > } > } > > I cannot move custom titlebar creation into the child activities, > moving the above 3 lines into a child activity will throw an > AndroidRuntimeException: > > "You cannot combine custom titles with other title features" > > I can only think of two possible solutions: > > 1) Replace tab activities with tab views - too late to do that now. > 2) Create the custom header bar in the main tab activity as above. Let > children activities broadcast a message that the main tab activity can > catch when they want some part of the custom titlebar to change (like > starting a progress bar etc). > > Any other possible solutions here? > > Thanks > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en