How can i remove default TITLE Bar in th android application? - android

Am new to this tech.
I am trying to build an application,in that i want to Remove default Title bar,and want to add my customised title bar.
Thanks in advance

It's called ActionBar in android. To remove it completely, you have to use a theme which doesn't contain ActionBar like Theme.NoTitleBar or Theme.AppCompat.NoActionBar if you're using AppCompat support library.

You need a custom ActionBar to achieve this.
Please consider reading this training and also this tutorial

Related

Disign Actionbar or create something like it

I want to create an ActionBar like in the picture or to create something like it.
https://drive.google.com/folderview?id=0B6Cz2zvfARSdOHJKSEppSzd6ZHM&usp=sharing
You want to change the style of your ActionBar.
See tutorial on adding buttons.
If you want to support pre-Honeycomb versions of the OS, you will need to start by using the ActionBar compat library.

How to change Tab background in ActionBarSherlock

I am using actionbarsherlock for the tab view and I want to change the background image of the tab.Is there any way to do this?
I don't know if it is possible to set a drawable as background for the actionbar tabs.
But is is certainly possible to change the actionbar colors. You can use the Android Action Bar Style Generator to generate a style that contains all the colors you like.
The generator should create a zip with all the needed style and drawable files for your actionbar. You know can reference this styles in application theme or the themes for the activities that should use the style.
have you tried,
getSupportActionBar().setBackgroundDrawable(getResources().getDrawable(R.drawable.menu_head));
For more details, refer to this post
and this post
Edit-
Check this link, if it helps.
Yes, use setIcon():
tab1.setIcon(R.drawable.tab_home_unselect);

ProgressBar Style/Theme Android

After modifying the theme for my Activity to display an ActionBar (ActionBarSherlock to be precise), my progress bar changed from:
to:
(Thin blue line). I need to be able to define the height of the progressbar, which I can't with the Holo theme. How can I specify a theme for my progress bar that's not the same as my activity or what's the other way to fix this?
Thanks!
As per i know, You are implementing Android inbuilt progressbar which appear the different in different devices and as per then android version.
If you want to implement the Same for all Devices then put make the custom progressbar. Which appear same for all.
Hope it will help you.
Enjoy.
:)

ActionBarCompat: Set Navigation Mode

I'm using ActionBarCompat in my project.
The problem I have now is that I need a spinner to show in the actionbar. A standard ActionBar can use .setNavigationMode(ActionBar.NAVIGATION_MODE_LIST) but this is unavailable in the action bar compat code.
Is there a way around this? What are other options (besides a layout redesign.)
There is no way to do this in the code provided by ActionBarCompat.
It provides an ActionBar in it's most basic form for use by all platforms.
A better alternative is useing ActionBarSherlock. The setup very similar and more functionality is available out of the box.
http://actionbarsherlock.com/

Actionbar Sherlock: Setting and hiding title bar

I'm new to ActionBarSherlock, and am having two problems:
First, I just want to be able to set the title of the action bar, but it doesn't work when I call it like this:
final ActionBar actionBar = (ActionBar) findViewById(R.id.actionBar);
actionBar.setTitle("test title");
Where the corresponding xml object looks like this:
<com.myapp.prototype.ActionBar
android:id="#+id/actionBar2"
android:layout_width="fill_parent"
android:layout_height="45dip"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" />
(This is modeled after the github example: https://github.com/johannilsson/android-actionbar/blob/master/actionbarexample/src/com/markupartist/android/actionbar/example/HomeActivity.java). In other places on the web, I see reference to getSupportActionBar(), but I'm not clear how or where to call this.
Second, in another place I just want to be able to hide the Activity's title bar altogether. I'm trying to do this by calling:
actionBar.setDisplayShowTitleEnabled(false);
actionBar.setDisplayShowHomeEnabled(false);
but I can't even get this to compile. The error I'm getting is:
"The method setDisplayShowTitleEnabled(boolean) is undefined for the type
ActionBar."
In both cases, I guess the Actionbar Sherlock overrides are involved in the problem. Any suggestions how to make this work?
Thanks very much.
Setting the ActionBar title
setTitle("Title")
Hiding and showing the ActionBar
getSupportActionBar().hide();
getSupportActionBar().show();
You seem to be mixing up two different ActionBar implementations. ActionBarSherlock is an extension of the compatibility library provided by Google. The methods used with ActionBarSherlock are almost identical to the native ActionBar found in Android 3.0+ http://actionbarsherlock.com/
The Github link provided (and code you are using) is a custom implementation of an actionbar https://github.com/johannilsson/android-actionbar.
I would advise you use ActionBar sherlock and follow the usage guide here http://actionbarsherlock.com/usage.html
There is also an ActionBarSherlock getting started video here http://www.youtube.com/watch?feature=player_embedded&v=4GJ6yY1lNNY
You need to import com.actionbarsherlock.view.Window so that it secretly uses the long version of this method.

Categories

Resources