this is my app :
http://ge.tt/api/1/files/1GS1TFA2/0/blob?download
as you see in this screenshot, i need to remove this title from all tabs :
http://drp.io:8080/files/42e423e6e71e326156ee22445d90a482.png
there are other titles on the other tabs on app :
http://drp.io:8080/files/93e6c9bff3a0d0754a02869912720b51.png
i can attach any file from the app source code.
If you are coding in native Java, I think its in res/layout/yourfile.xml
You should find the string you want to change. If it's not, check res/values/strings.xml file
If you want to remove it programmatically add this before setContentView:
requestWindowFeature(Window.FEATURE_NO_TITLE);
If you want to remove it from manifest, change the theme in this into your manifest file:
android:theme="#android:style/Theme.NoTitleBar"
You could try:
ActionBar actionBar = getActionBar();
actionBar.hide();
Related
I have a hard time finding on how to change the Toolbar title and it's drawable in every and each Activity.
There is something on Android Documentation that states that to minimize APK size. It is recommended to re-used components.
I create a separate layout, and <include layout=""/> to each of my Activities like Help, About , and etc. I also put android:label="Title" on Manifest File.
Toolbar.xml
My Main:
How do I access this included Toolbar DRAWABLE and TITLE in my Activities ?
Update: I removed ActionBar .
You are using Toolbar. So no need to do anything with ActionBar. Just set your Toolbar as supportActionBar. Then set title and icon to your Toolbar.
Use the below code:
mToolbar = (Toolbar)findViewById(R.id.Toolbar);
setSupportActionBar(mToolbar);
setTitle("About");
getSupportActionBar.setIcon(R.id.ic_arrow_back_black_24dp);
And, Remove all your mActionBar codes. Hope this helps.
well you set the support action to your custom toolbar,yet you ignore it and use mActionBar, see where i am going with this? setIcon , and setTitle should all be called relative to your custom toolbar.
I want to remove this unwanted title bar
I cant remove this
i have tried
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(
WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
This is not a title bar. This is ActionBar or Toolbar. You should extend your application theme from Theme.AppCompat.NoActionBar. Or just add android:theme="#style/Theme.AppCompat.NoActionBar" to <application/> tag in AndroidManifest.xml
add the following to your manifest:
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
That should sort it, replace Theme with your actual theme if required, this line goes within the application part of the manifest or can go where the activity is declared.
You need to set your content view AFTER you have written the two lines
//Remove title bar
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
//Remove notification bar
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
//set content view AFTER ABOVE sequence (to avoid crash)
this.setContentView(R.layout.layout_name);
So I have this under my Activity's onCreateView()
ActionBar actionBar = getActionBar();
actionBar.setDisplayShowHomeEnabled(false);
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
actionBar.setDisplayOptions(0, ActionBar.DISPLAY_SHOW_TITLE);
And my manifest looks like this
<activity
android:name="com.example.nfcproducttracing.ProductTracer"
android:label="#string/app_name"
android:theme="#android:style/Theme.Holo.Light"
android:launchMode="singleTask">
What I have achieved is have my application with Tabs, but no TitleBar. However, during application launch I can briefly see the TitleBar before it disappears, and I do not want that.
What am I supposed to do? When I set my activity theme to anything related to NoTitle, getActionBar returns null and the app crashes.
If I understand correctly your questions, you can use the requestWindowFeature(Window.FEATURE_NO_TITLE) from your activity.
Flag for the "no title" feature, turning off the title at the top of the screen.
Not really sure but have you tried this:
getActionBar().setTitle("");
It will set a blank title for your ActionBar.
You can try using getSupportActionBar() instead.
this is from android.support.v4.app.actionbar, not from android.app.actionbar!
I am new to implement the ListView with section.
I have use this application to implement the section to my list view.
Now I want to add the Titlebar that display the application page title. Then where do I have to make a change? In the xml file or in the Java file?
Please refer the example and let me tell what should I have to change to make Titlebar for my app.
Try this...
final Activity activity = this;
activity.setTitle("Settings");
if you disabled the title bar using, this.requestWindowFeature(Window.FEATURE_NO_TITLE);
remove it.
(OR)
Try this..
final Activity activity = this;
this.requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.settings);
activity.setTitle("Settings");
There are two ways to change title bar for your activity:
Design time (that is, change title in AndroidManifest.xml file).
By coding (that is, you can code to change the activity title).
Example for 1st:
you can Change the Title of each screen (i.e. Activity) by setting their Android:label inside the AndroidManifest.xml file:
<activity android:name=".Hello_World"
android:label="This is the Hello World Application">
</activity>
And yes, to display customized title bar for your activity, go through this answer: How to change the text on the action bar
In your AndroidManifest.xml file you have a section for each activity that looks like this
<activity
android:label="Your Activity"
android:name=".YourActivity" />
where the android:label tag defines what the text in the titlebar is.
I have develop app in which I set layout 480 * 320, it is starting from top. But my problem is there is one in build border are display when we take a new project and it is display in all activity. So I want to disable it.
Border like
So can you tell how can I remove it or hide it?
I think what you are trying to do is hide the TitleBar of the application. You can do that by changing the application theme.
Add android:theme="#android:style/Theme.Light.NoTitleBar" in the <application> tag of your manifest file.
Any theme with .NoTitleBar should do the trick.
use any one.
Manifest:
android:theme="#android:style/Theme.NoTitleBar"
Or
java:
requestWindowFeature(Window.FEATURE_NO_TITLE);
requestFeature(FEATURE_NO_TITLE);
in you activity's onCreate before setting the layout should remove it.
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);