Sep 30 | 3:55 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Sep 30 | 4:00 PM |
Gabriele | has entered the room |
Mark M. |
hello, Gabriele!
|
Mark M. |
how can I help you today?
|
Gabriele |
hi Mark :)
|
Gabriele |
the last time, I told you I wanted to add two navigation drawer to my app, I was sure I could do the same for the drawertoogle and I've found a lot of questions on google on how to add a second drawertoggle (one to the left and one to the right) and... I couldn't find an answer! While waiting I've added a button on the action bar, to open the one on the right, but maybe you know something about this
|
Mark M. |
I have not looked into setting up a right-hand drawer much
|
Mark M. |
in particular, I have not looked into any sort of toggle
|
Mark M. |
I would be somewhat surprised if ActionBarDrawerToggle worked for it
|
Sep 30 | 4:05 PM |
Gabriele |
it seems that actionbardrawertoggle is related to the "drawer", but there is no way to specify which one (e.g. by gravity)
|
Gabriele |
(if I understand corretcly, by googling)
|
Mark M. |
that's because it is designed to set up the "mini-hamburger" next to the app icon
|
Mark M. |
and so I expect that it's only set up for the left side
|
Mark M. |
(where, here, by "left" and "right" I mean for LTR languages, of course...)
|
Gabriele |
you can have it on the right, from what I've seen
|
Gabriele |
but you can't have two of them
|
Mark M. |
that may not be ActionBarDrawerToggle, though
|
Gabriele |
(maybe I'm wrong)
|
Gabriele |
ah, yes, you're right
|
Gabriele |
now I've seen that they used a "trick"
|
Gabriele |
switching to android:supportsRtl="true"
|
Gabriele |
so maybe in this case, you have it to the right
|
Mark M. |
that should only have it on the right for RTL languages
|
Gabriele |
it should, but this is the only answer I've found. Anyway, as you can't have two (and you can't have it on right), is it a bad idea to add it on the actions?
|
Sep 30 | 4:10 PM |
Mark M. |
I haven't used an app that has had a drawer on the right, and so I don't know what is normally used as a trigger for opening it beyond a bezel swipe
|
Gabriele |
I'm always referring to google plus app and they have a "bell", which shows the counter of notifications and you can tap it, to open the right drawer
|
Mark M. |
well, there are worse apps to pattern yourself against :-)
|
Gabriele |
eheh
|
Gabriele |
I'm just trying, I'm not even sure to use the second navigation drawer, maybe it's terrible
|
Mark M. |
I don't find it to be an especially common pattern
|
Mark M. |
which is why you probably do want some trigger other than a bezel swipe
|
Mark M. |
as otherwise people might not know the drawer is there
|
Mark M. |
(not to mention that we're overloading horizontal swipe gestures nowadays...)
|
Gabriele |
yes, this is true, too and I don't want to overstate
|
Gabriele |
by the way, how to put a "counter" inside an actionbar button? I should reload it with a new image?
|
Sep 30 | 4:15 PM |
Mark M. |
I know there are recipes for applying a badge to an action bar item...
|
Mark M. | |
Mark M. |
that question has several answers of various approaches
|
Mark M. |
but the key term is "badge", as that's the term for applying a counter in a bubble over the corner of some icon
|
Gabriele |
oh, thank you, I will read it
|
Gabriele |
I didn't know how to search it
|
Gabriele |
and about PagerTabStrip, it seems, but maybe I'm wrong, there is no way to change color, or highlight in some way on of the tab (of your choice), should I extend it, to obtain something like this?
|
Mark M. |
you can probably affect it via a custom style
|
Sep 30 | 4:20 PM |
Mark M. |
if not, look into something more flexible, like TabPagerIndicator from the ViewPagerIndicator library
|
Mark M. |
or PagerSlidingTabStrip
|
Mark M. |
or other open source implementations
|
Gabriele |
maybe I've not explained it well, I mean dynamic changing the color of a tab
|
Gabriele |
e.g. when a user receives a message private from B, I'd like B's tab to highlight, change color or something
|
Gabriele |
if I do it by layout, it would be static, right?
|
Mark M. |
sorry, I have not looked into how to do that
|
Gabriele |
oh, no problem :)
|
Sep 30 | 4:25 PM |
Gabriele |
ok Mark, thank you... as always :)
|
Mark M. |
you are welcome
|
Gabriele |
have a good evening (if it's evening, to you)
|
Gabriele |
:)
|
Gabriele | has left the room |
Sep 30 | 5:00 PM |
Mark M. | turned off guest access |