I want to create an application with just the app icon on the title bar and no app name. How can I do it?
I have tried to use:
requestWindowFeature(Window.FEATURE_NO_TITLE);
but it just removes the title bar and not just the application name.
I want to create an application with just the app icon on the title bar and no app name. How can I do it?
I have tried to use:
requestWindowFeature(Window.FEATURE_NO_TITLE);
but it just removes the title bar and not just the application name.
How about this ?
setTitle("");
...in onCreate()
of any Activity whose title should be empty. (Or in onCreateView()
of any Fragment: getActivity().setTitle("");
)
I am not opposing , Sir ( Jonik/CommonsWare ) answer , but by doing getActivity().setTitle("")
& setDisplayShowTitleEnabled(false)
you will see app title at the creation of the Activity , i think .
but if you perform Sir ( Jonik/CommonsWare ) answer like this , then it will be better
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
if(hasFocus)
getActionBar().setDisplayShowTitleEnabled(false);
}
Sorry if , it doesnt help you !
Call
setDisplayShowTitleEnabled(false)
on theActionBar
instance you get back by callinggetActionBar()
on your activity.