开发者

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜