开发者

title on the list activity

开发者 https://www.devze.com 2023-03-08 23:02 出处:网络
my question is how i can add a title on ListActivity I used the following code final boolean customTitleSupported = requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);

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

精彩评论

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