I'm using ActionBarSherlock and I need to place it at the bottom.
Is there any way to do this?
Can I just set android:gravity="bottom" in style.xml?
Firstly, you cannot change the position of the ActionBarSherlock. It will always be displayed on the top. However, you can easily put your tabs and other contents you add in the ActionBar to be displayed at the bottom.
I also had a similar problem. I solved it by putting android:uiOptions="splitActionBarWhenNarrow" within the <activity> tag.
For example, this worked:
<activity android:name=".my.Activity"
android:uiOptions="splitActionBarWhenNarrow"/>
However, only in portrait mode it will actually show at the bottom of the screen. So, you will have to define your application orientation in the manifest as portrait, otherwise it will again go to the top.
Related
I see it in some applications, how do I add it to my application?
android:label="#string/foo" android:theme="#android:style/Theme.NoTitleBar.Fullscreen">
Status bar is always Transparent.
What you want is to see no ToolBar
Apply theme to your application tag in manifest or to your individual activity if you want this :
Theme.Holo.Light.NoActionBar
Now you will have your entire screen at your disposal and you can set your image to match_parent and view it in full screen
within the tag specify height and weight as match parent
in the style sheet make action not visible
parent="Theme. App Compat. Light. noActionBar"
i need the same thing like the toolbar on the Facebook or gmail App (i also want it do disappear when scrolling down and appear when scrolled on top again)
The thing is, im using a ActionBar on the top of the App already, what i need is another toolbar on the bottom. I thought about using the new toolbar and place it on the bottom(is this possbile? i mean using ActionBar and toolbar? If yes can i place it on the bottom?
I also tried to add more buttons in my ActionBar and put splitWhenNarrow in my manifest but it doesnt work..it just gets "scrollable" icons :S
Heres how i tried it :
<activity
android:name="com.danny.pqapp."
android:label="#string/app_name"
android:theme="#style/pqBlue">
<meta-data android:name="android.support.UI_OPTIONS"
android:value="splitActionBarWhenNarrow"
android:showAsAction="ifRoom"/>
</activity>
anyone has an idea how to solve my problem?
I have implemented the ActionBar using v7 support library. The content of the activity below the actionbar are some textviews, editexts and a button.
Now when I tap on the edittext, the keyboard appears and that makes the actionbar moving up and out of the screen. I want the position of the actionbar to be fixed and only the content to scroll up or down as and when required with out affecting the actionbar (like the gmail app in android phones.).
How to achieve that?
Thanks in advance.
Well, I think, I should answer the question with the new understanding of the problem and the solution and to explain the issue to the new user. I did not land on the right link (answer) earlier, because I was of the notion that this is strictly an ActionBar related issue.So my searches were with those sort of keywords not having edittext.
But as rightly pointed by Fllo and this link
the issue was related to Android system's handling of input and re-sizing of activity.
So the solution is:
step-1) setting windowSoftInputMode attribute to adjustResize.
<activity ........... android:windowSoftInputMode="adjustResize"/>
step-2) above step would fix the position of action bar but, the text entered from the keybaord won't be visible when the layoutout is bigger then the screen can adjust. To make the edittext (or other input widgets) and text being typed on it, the layout should be made scrollable by wrapping in a ScrollView.
<ScrollView> your_layout ...</ScrollView>
Now the action bar is fixed. Also the input widget becomes visible as the android system scroll it up above the keyboard to make the text you type visible.
In my Layout-XML, there are five EditText and I am using Actionbar Sherlock.
When I am typing in the fifth EditText and the keyboard appears,
the whole Layout moves upwards, even the Actionbar.
Why does it behave like this and what can I do, to make the Actionbar static?
the best way in my experience was put a vertical scroll view in layout which contains all your Edit Text
Try playing around with different android:windowSoftInputMode settings in your manifest for that particular activity. It sounds like you want adjustResize or adjustNothing. See the documentation here (toward the bottom) for more information about the windowSoftInputMode options: http://developer.android.com/guide/topics/manifest/activity-element.html
Can I set the item on the top right of the ActionBar? While Android mustn't allow me to do
what I want to do like the title.However,in my project,the need of it ask me to must do it like that.
Following is my details:
actionbar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS),
"and manifest.xml " android:uiOptions="splitActionBarWhenNarrow"
top PNG is what we discussed about the title issue.
This should be Android IOS's features. When screen is narrow the actionbar will take the bottom of the screen if you set android:uiOptions="splitActionBarWhenNarrow" in manifest file.