Here's the code Initially , when the activity is created, I set the title like this
getWindow ().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,R.layout.text_title); TextView databar = (TextView) findViewById(R.id.search_title_text); databar.setText(titleText); On a button click, I change the title to have an EditText and a button MyClass.this.getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.search_title); On this button's click, I again change the title to the original one MyClass.this.getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.text_title); TextView databar = (TextView) findViewById(R.id.search_title_text); databar.setText(titleText); The databar setText statement does not work now. I see the text_title set as the title bar of the activity. But there is no text in the textview. Debugging the code shows that databar does have a value and is not null. titleText is also not null. But the value is not reflected. On 05-May-09, at 1:23 PM, Christine wrote: > > Maybe you can provide more detail on what your code does? You can > update TextViews and titles from your code, with .setText() or > setTitle > (). > > On May 5, 8:16 am, idev <[email protected]> wrote: >> Hi >> >> I am using a custom title view in my application for each activity. >> In >> one of the activities, based on button clicks I need to change the >> custom title view. Now this works fine every time when I make a call >> to setFeatureInt. >> >> But if I try to update any items in the custom title (say change the >> text of a button or a text view on the title), the update does not >> take place. >> >> Debugging through the code shows that the text view and button >> instances are not null and I can also see the custom title bar. But >> the text on the text view or the button is not updated. Has anyone >> else faced this problem? >> How do I resolve it? >> >> Thanks. > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

