I can setTitle(“My Title”), but what I’m looking to do is set two titles… one on the left side and one on the right. How might I do that?
I currently have 2 textviews, aligned parent left and right… the textappearance is changed. But I’m hoping to get that into the titlebar using code so I don’t have to use some background to simulate the titlebar.
You can define a custom view layout and tell the system to use it with:
You can make your title view a RelativeLayout with two children positioned as you like. This should be done in
onCreate()before callingsetContentView(). See this thread for more discussion of using a custom view.