Reputation: 2662
my question is how i can add a title on ListActivity
I used the following code
final boolean customTitleSupported = requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
if ( customTitleSupported )
{
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.titlebar);
}
final TextView myTitleText = (TextView) findViewById(R.id.myTitle);
if ( myTitleText != null )
{
myTitleText.setText("Select Service Provider");
}
But it not works on ListActivity
Upvotes: 4
Views: 1782
Reputation: 39807
If nothing else works, you can extend Activity instead of ListActivity, and in your layout you can place a ListView that you bind your data to.
Upvotes: 3