Title in activity list

My question is how can I add a title to 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 does not work in ListActivity

+4
source share
1 answer

If nothing works, you can extend the Activity instead of ListActivity, and in your layout you can place the ListView to which you are binding your data.

+3
source

All Articles