I use MiniDrawer implementation from MaterialDrawer library.
I have tried to add ActionBarDrawerToggle to Drawer but got an Exception. MiniDrawer class does not allow to set ActionBarDrawerToggle
Could you please tell is there way to set hamburger icon on toolbar for MiniDrawer ?
The ActionBarDrawerToggle from Google requires you to use a DrawerLayout in the case of the normal MiniDrawer implementation of the MaterialDrawer there is no DrawerLayout in place, so the default behavior won't work.
As you still want the hamburger-icon to toggle the Menu state you have to either set the NavigationIcon on your own. Or you check out a library like the following:
https://github.com/balysv/material-menu
This will allow you to have the same animations (and more) as NavigationIcon and forward the open / close events to the Crossfader which is used to have the fading animation from MiniDrawer to normal Drawer size.
Related
I am having a problem with implementing a navigation drawer in ios. I have found the Sidebar Navigation component , flyout navigation, Monotouch.Navigation and some others.
The flyout Navigation approach works but i am finding it difficult to customize the side menu because it extends the UITableview controller. It would be easier to customize it if it was a UIViewcontroller instead.
The Sidebar Navigation allows for customiszation but selecting an item causes the app to freeze and I am unable to disable the drawer on the login screen.
Would really like some suggestions if there is an easier way to implement this or am i missing something. (Take note, the drawer should only show after the user has passed the login screen and taken to the home screen).
Following Android guidelines I have added ActionBarDrawerToggle which brings up a DrawerLayout.
This is fine but I can't help feeling my users will have a hard time noticing it since it's so tiny.
Before that I had several tabs in the ActionBar but there were too many tabs so I did replace them with the DrawerLayout as they say to do when you have more than 3 tabs.
However, are there any techniques to make the Drawer Toggle more prominent without breaking up the Android Design Guidelines. Are there any examples to that?
As detailed in the Navigation Drawer Interaction Design Guidelines:
Introduce the user to the drawer at first use
Upon first launch of your app, introduce the user to the navigation drawer by automatically opening it. This ensures that users know about the navigation drawer and prompts them to learn about the structure of your app by exploring its content. Continue showing the drawer upon subsequent launches until the user actively expands the navigation drawer manually. Once you know that the user understands how to open the drawer, launch the app with the navigation drawer closed.
This ensures that users understand that the Navigation Drawer exists and that they notice the drawer toggle animating as they close/open the drawer.
I am using the home button of the main Activity of my IM app to allow the user to change their availability status. My app is using ActionBarSherlock, which falls back to the native implementation where supported.
However, the size of the tappable area is inconsistent between Android releases:
On Android 4.2.0 and before (including the compatibility library), only the icon is tappable:
On Android 4.2.1+, icon and activity name are tappable:
How can I make the tappable area consistently include icon and activity title on all versions of Android?
I am using ActionBarCompat (and you should probably update, if you haven't already), so this may not behave exactly the same. I wanted the full title to be clickable for using the navigation drawer. For some reason, using a custom logo instead of the text makes the whole thing automatically clickable, where only the icon could be clicked before:
final ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayShowTitleEnabled(false);
actionBar.setDisplayUseLogoEnabled(true);
actionBar.setLogo(R.drawable.im_title);
I don't know if it's possible to trigger that change while still using text with the default icon, but the setDisplay... methods and flags may be a good place to start looking.
I have attached a toolbar with a UITextField and UIButton to the keyboard when it becomes the first responder via the user taping inside the textfield
textField.inputAccessoryView = theToolbar;
Problem is, the toolbar disappears when the keyboard is dismissed, thus preventing any further input.
Any ideas on how to make the toolbar go back to the bottom of the screen rather than off it completely?
I'm thinking a delegate method might help but Im really not too sure. It seems once the inputAccessoryView always the inputAccessoryView :(
Cheers
The input accessory view is automatically dismissed with the input view (the keyboard, in this case). Generally you do not want to have an input accessory view in your view hierarchy. Instead, if you want your toolbar to scroll up when the keyboard is shown, you should follow the guidelines for Managing the Keyboard.
You could try using an additional toolbar that is offscreen as the inputAccessoryView, which could "fake" the appearance of what you are trying to do. Alternatively, have you tried adding the toolbar back to the bottom of the screen using
[self.view addSubview:theToolbar];
when the keyboard reaches the bottom of the screen? You can use keyboard notifications for this.
Usually in landscape mode an EditText will open the IME in full screen mode, but for an textfield inside a webview (loaded as a HTML content) it doesn't and it pushes the existing view upwards. Tried using 'adjustpan' options but to no avail. Is it possible to change the IME in this scenario? Thanks in advance...
'adjustPan' might not work unless you specify the option for all of the views in the tree, not just the activity. Take a look at this answer for more info: https://stackoverflow.com/a/7183626/758458