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
Related
Im making an app for android, without actionbar.
What is best practice for showing titles without actionbar?
The best practice is basically never using an action bar. This gives you a complete device screen to play with.
You can use images or different text styles for showing the title. You can also use interesting icons.
To remove action bar -
Go to res > values > styles.xml
Here is an illustration of styles file -
You can use the Toolbar (it's like the action bar, but more flexible). For example, action bar needs to be on top of the screen, but toolbar can have place anywhere in the layout.
You title can be shown as text or a beautiful asset.
If, for some reason, you don't want to use the toolbar, you can think about something like having a scrollView with the title on top of it.
Use a regular LinearLayout with a TextView inside. Style according to your needs, and set the text in the xml, or programmaticaly using TextView's setText() method.
I've used a FAB (Floating action button) in my app.
It stays Extended when i click on the other parts of page or changing tabs.
How can i make it embed on changing tabs or clicking on the other parts?
May be you have done mistake in your Layout XML file. Check the FAB Width & Height Property. it should be wrap_content in both.
also if you share your code we can give you proper guide.
I'm using Appcelerator's Titanium Alloy to work on an app that features both a tab-group on the bottom of the screen and a toolbar on the top of the screen. These both will appear after login, and won't change until logged out. I have been able to create both the tab-group and the toolbar, but am having trouble having them both on the screen.
The toolbar that I'm going for is something similar to this:
How to create a header bar with buttons in Titanium JS?
Just a guess, but I think the views of the tab-group and the toolbar are getting overlapped with one another. As such, I'm only able to see one at a time, always the one I set second (i.e. it is on top of the other bar).
Any help/ideas are greatly appreciated.
Thank you!
Edit:
I've looked into adjusting the leftNavButton and rightNavButton properties, but to use this method would require each individual tab to be adjusted, instead of the entire tab group. I'd like to find a way to add these buttons universally, as the top and bottom bars do not change with different views.
You can use the rightNavButtons and leftNavButtons properties of the windows to add buttons to the navigationBar that is showing at the top of the screen in a tabgroup.
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.
i'm building an app and i really want to align buttons to the left using ABS (action bar sherlock) 4.0
I really like the dropbox interface as shown under this:
So, my question is: How can i align the buttons to the left and how can i jump between views in ViewFlow using buttons?
I've seen that people can add tabs to their ABS, but not with the title like the Dropbox interface.
Thanks.
Also if u need my sourcecode i will add it later if needed.
Regards
Stian Instebø
setCustomView() is the magic method you might be looking for.
To achieve the same layout shown in the Dropbox app, you would first call setDisplayShowHomeEnabled(false) on your ActionBar.
Next, you could define the layout for the buttons somewhere in XML. Once this is done, calling setCustomView(R.layout.my_actionbar_nav) will do the trick. (It will now be positioned on the left-hand side of the ActionBar).
It'll be your responsibility to wire up the appropriate onClick listeners for your layout's inner button Views, but it's not a bad price to pay for setting up custom navigation.