DEVANG SHARMA
DEVANG SHARMA

Reputation: 2662

title on the list activity

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

Answers (1)

mah
mah

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

Related Questions