Why Android is truncating my ActionBar title?

前端 未结 13 2056
Happy的楠姐
Happy的楠姐 2021-02-13 10:28

In my app, I change the title in the ActionBar from each fragment displayed. When I first start my apps, I got a list of requests, so my title is \"My requests (20)\".

T

相关标签:
13条回答
  • 2021-02-13 11:24

    I solved this problem using a custom title as described in this post.

    This is the code I use to change the title when a tab changes

    ((TextView) actionBar.getCustomView().findViewById(R.id.title)).setText(someTitle); 
    

    Note that this solution places the title to the right of the tabs in landscape mode when using actionbar tabs.

    0 讨论(0)
提交回复
热议问题