Mark M. | has entered the room |
Mark M. | turned on guest access |
Tawanna | has entered the room |
Tawanna |
Hi Mark, how are you?
|
Mark M. |
howdy!
|
Mark M. |
how can I help you today?
|
Tawanna |
I haven't done much research on this but I wanted
to know if it's possible to change the overall "tint" of the wallpaper
for android devices
|
Jan 24 | 7:30 PM |
Mark M. |
only if you create your own wallpaper
|
Mark M. |
or your own home screen
|
Tawanna |
ie, is there a way to give the current background a reddish hue (or any other color) while still maintaining the image
|
Tawanna |
could i overlay one image on top of another?
|
Tawanna |
in order to achieve this effect?
|
Mark M. |
only if you create your own home screen
|
Mark M. |
the home screen displays the wallpaper
|
Tawanna |
how would i go about creating my own home screen?
|
Mark M. |
you could create an app widget to give a tint to a piece of the wallpaper, I suppose
|
Brent K. | has entered the room |
Brent K. |
Hello there
|
Mark M. |
that depends on how usable of a home screen you want
|
Tawanna |
Hi Brent
|
Tawanna |
I see
|
Mark M. |
(BTW, howdy, Brent -- be with you in a moment)
|
Brent K. |
k
|
Mark M. |
all a home screen is, in the end, is an activity responding to ACTION_HOME
|
Tawanna |
I see
|
Mark M. |
but supporting wallpaper and app widgets and a launcher and shortcuts and... is a whole lotta work
|
Tawanna |
I'm already modifying the background with existing images. I just wanted to find out if I could add a transparent image on top
|
Mark M. |
for your own images in your own app, sure
|
Mark M. |
for the home screen's wallpaper, only if you are the home screen
|
Tawanna |
I see
|
Tawanna |
so it's possible to overlay my existing images with other images?
|
Tawanna |
(wall paper images)
|
Mark M. |
sure
|
Mark M. |
use a RelativeLayout or FrameLayout
|
Mark M. |
they both support Z-axis ordering
|
Mark M. |
later children appear to float over top earlier children
|
Mark M. |
and if the ones higher in the Z-axis have transparency, Android will do the blending for you
|
Tawanna |
I see
|
Mark M. |
let me swing over to Brent for a bit, and I'll come back to you shortly
|
Mark M. |
Brent: do you have a question?
|
Tawanna |
ok
|
Jan 24 | 7:35 PM |
Brent K. |
yep
|
Brent K. |
The first one: is there a way to populate the action bar navigation spinner without having the onSelect fire?
|
Mark M. |
sure
|
Mark M. |
it doesn't fire by default, AFAIK
|
Brent K. |
hmmm
|
Mark M. |
oh, no, wait
|
Mark M. |
memory fuzzy
|
Mark M. |
no, you're right, I think it does fire
|
Mark M. |
in which case, no, I doubt you can avoid it
|
Brent K. |
In my experience, it is defaulting to the initial item
|
Mark M. |
regular Spinners always fire their onItemSelectedListener()
|
Mark M. |
I would expect that nav Spinner to do the same
|
Brent K. |
The reason why I ask is that I'm doing a file explorer app with a viewPager
|
Mark M. |
you can always rig up a boolean to skip the first selection event
|
Brent K. |
and I wanted to use the action bar spinner to hold the parent folder heirarchy
|
Brent K. |
but that needs to be updated with every swipe to a different page of the viewpager
|
Brent K. |
thing is, I already have the listviews populated
|
Mark M. |
again, short of using a boolean to say "oh, never mind" to the first selection event, I think you're stuck
|
Brent K. |
That may be fine
|
Mark M. |
now, I haven't played with the breadcrumbs stuff, so it's possible that's a better solution here
|
Mark M. |
I'm not even sure what they look like
|
Mark M. |
I just remember seeing them mentioned in the SDK related to the action bar
|
Brent K. |
I've seen them too
|
Mark M. |
one of the many nooks and crannies that I need to poke at one of these months...
|
Brent K. |
didn't think they made as much sense though for my purposes
|
Brent K. |
I'm trying to keep the action bar down to one row
|
Jan 24 | 7:40 PM |
Mark M. |
Tawanna: do you have another question, or a follow-up to your first question?
|
Jan 24 | 7:40 PM |
Tawanna |
yes
|
Tawanna |
currently, i have a wall paper instance and i'm simply changing the background with that
|
Tawanna |
are you saying it's as simple as adding another image on top of the existing image?
|
Tawanna |
(a transparent image)
|
Mark M. |
well, a translucent image
|
Tawanna |
right
|
Mark M. |
if you want to have a color effect applied
|
Mark M. |
it doesn't even need to be an image
|
Mark M. |
it could be a View with a background of the desired tint
|
Tawanna |
okay, thanks!
|
Mark M. |
Brent: did you have another question?
|
Brent K. |
Yeah
|
Brent K. |
Let me start by asking whether you're familiar with "split action modes"
|
Brent K. |
like the one in the gmail/email apps
|
Mark M. |
yes
|
Mark M. |
well, actually, split action *bars*, yes
|
Mark M. |
haven't tried combining a split action bar with an action mode yet
|
Mark M. |
though I should soon
|
Mark M. |
:: makes a note ::
|
Brent K. |
Ok, well my problem is that, for the life of me, I
cannot figure out how to get an action mode to flow onto the bottom
line as in the split action bar
|
Brent K. |
Cant find any documentation at all
|
Jan 24 | 7:45 PM |
Mark M. |
yeah, action modes are kinda flaky
|
Brent K. |
and the only related information that I could dig up was a reference to the "actionModeSplitBackground" attr in android.R
|
Mark M. |
meaning when you use the action mode, it only affects the top bar?
|
Brent K. |
Meaning that when the action mode comes up, there
would be two bars, one covering the top action bar, and the other
coverning the bottom split action bar.
|
Mark M. |
it's conceivable that Gmail is cheating and not using a real action bar there
|
Mark M. |
but I would hope that it would be possible
|
Brent K. |
The email app does it too
|
Mark M. |
yeah, I don't have that one configured
|
Brent K. |
so I may just need to dig around in the source
|
Mark M. |
that's what I'd do
|
Brent K. |
k
|
Mark M. |
though that's more annoying now that Google Code Search is gone
|
Mark M. |
:: sob ::
|
Brent K. |
yeah...
|
Brent K. |
I made a half hearted attempt at downloading aosp the other day, but the tutorial seemed to be geared towards unix/linux users
|
Brent K. |
which puts me out of luck
|
Mark M. |
yeah, Windows needs Cygwin
|
Mark M. |
the next-best browsing option is http://github.com/android
|
Brent K. |
I even did that, but perhaps I didn't have things configured correctly/completely
|
Brent K. |
Oooo! I'll take it.
|
Mark M. |
looking at the Email app manifest, EmailActivity has the normal splitActionBarWhenNarrow, and it's the only activity that does
|
Mark M. |
so I'd poke around in that class and see how they're setting up their action mode
|
Jan 24 | 7:50 PM |
Brent K. |
excellent
|
Brent K. |
I didn't know they had the source on github
|
Brent K. |
so this will make things much easier
|
Mark M. |
the biggest thing the GitHub solution lacks is a cross-repo search option
|
Mark M. |
Tawanna: do you have another question?
|
Tawanna |
no
|
Tawanna |
thanks for your help!
|
Mark M. |
OK
|
Mark M. |
Brent: do you have another question?
|
Brent K. |
I've got another one for you
|
Brent K. |
Is there a way for me to lay out my action bar
such that the navigation spinner fills up all space not taken by the
home icon and some other element positioned to the right?
|
Mark M. |
go right ahead
|
Mark M. |
I would think that would be governed by the Adapter you are using and the Views it returns
|
Mark M. |
try using match_parent for the width for the Views and see if that does the trick
|
Mark M. |
(or the equivalent depending on the structure of your Views)
|
Brent K. |
I've tried that, and it doesn't work
|
Brent K. |
or rather, applying that to the spinner items doesn't work
|
Brent K. |
And it's not like I'm using my own views for the action bar
|
Jan 24 | 7:55 PM |
Mark M. |
for the navigation spinner, you are
|
Brent K. |
perhaps what I should be doing is use a custom view?
|
Mark M. |
I am surprised that it doesn't work
|
Mark M. |
I would expect a flexible width to fill up the available space
|
Mark M. |
then again, I've never tried it
|
Mark M. |
:: makes note of another experiment to run ::
|
Brent K. |
I've set attributes on the spinner items just
fine. For now, I just have them set to a certain width, which widens
the parent spinner
|
Brent K. |
but I don't think those items have any notion of their parent's parent
|
Mark M. |
if the action bar shows up in Hierarchy View, I'd poke around in there and see what it tell you
|
Brent K. |
which is why match_parent doesn't work
|
Brent K. |
I'm not sure I understand
|
Mark M. | |
Mark M. |
Hierarchy Viewer allows you to browse all the widgets and containers in a foreground activity
|
Brent K. |
Interesting
|
Brent K. |
I haven't had the chance to use that befor
|
Mark M. |
if the action bar and its nav spinner are part of what Hierarchy Viewer displays, you can find out what the layout rules are
|
Mark M. |
and see if that gives you clues for how to structure your Spinner views
|
Mark M. |
if specifying a concrete width does expand the nav spinner, then there has to be some way to get it to fill all available space
|
Brent K. |
sounds good
|
Mark M. |
it's just a matter of figuring out what
|
Mark M. |
which I'll poke at this weekend
|
Brent K. |
Much appreciated
|
Brent K. |
Love your books btw
|
Mark M. |
thanks!
|
Jan 24 | 8:00 PM |
Brent K. |
They are so much better at explaining things than googles dev resources
|
Mark M. |
well, for some stuff
|
Mark M. |
there are lots of things the official docs cover (at least somewhat) that I haven't touched yet
|
Brent K. |
I've found them to be especially helpful in understanding view/fragment lifecycles
|
Mark M. |
that's interesting, considering I think that's one of the weakest things I have in there
|
Mark M. |
getting a substantial rewrite as part of The Big Book Reboot
|
Brent K. |
Never hurts, but I found it to be a bit simpler than Google's stuff
|
Brent K. |
I was learning all of this while messing with fragments inside a fragmentPagerAdapter, so I had no idea what was going on
|
Mark M. |
yeah, I'm actually only starting to play with ViewPager myself
|
Brent K. |
Its pretty fun stuff
|
Brent K. |
I'm making an attempt to have my app adhere as much to ICS design language as possible
|
Mark M. |
not a bad paln
|
Mark M. |
er, plan
|
Mark M. |
what they're missing are instructions on how exactly to pull all that design stuff off
|
Brent K. |
I noticed that
|
Mark M. |
on the plus side, that opens up all sorts of possibilities for upcoming book material
|
Jan 24 | 8:05 PM |
Brent K. |
I did appreciate their new design section though
|
Mark M. |
oh, to be certain
|
Brent K. |
I think thats the big thing android devs are missing these days
|
Mark M. |
the mere fact it *exists* is a huge improvement
|
Brent K. |
Lots of programmers out there, but no designers
|
Mark M. |
if either of you come up with another question, feel free to chime in
|
Brent K. |
Here's one: What kinds of things are the biggest
culprits for memory leaks? I've done a little bit of reading on how
assets can be leaked in between orientation changes, etc... but are
there others?
|
Mark M. |
I have some material on that in _Tuning Android Applications_ in your Warescription
|
Mark M. |
static data members and/or custom Application objects are one
|
Brent K. |
Ah. Well I'll just make sure to look that over then.
|
Brent K. |
I haven't been able to make it all the way through the 3rd and 4th books yet
|
Brent K. |
still pouring through the first two
|
Mark M. |
well, the Tuning book is certainly a work in progress
|
Mark M. |
stalled right now in favor of more Advanced Android material plus The Big Book Reboot
|
Jan 24 | 8:10 PM |
Tawanna | has left the room |
Brent K. |
Is the reboot geared more towards an overall
deepening of the content, or are you looking to expand more on current
weak points/ICS stuff?
|
Mark M. |
have you read the blog posts?
|
Mark M. | |
Mark M. | |
Mark M. |
mostly, it's a matter of too much new core material that I can't just slap on the side of the book
|
Mark M. |
I need to present fragments, the action bar, loaders, and so on from the outset
|
Mark M. |
which pretty much necessitates a complete reorganization of the material
|
Brent K. |
I'll have to look those over. Didn't know about the blog before
|
Mark M. |
I'm also rebuilding my publishing toolchain, emphasizing the digital editions over the print ones
|
Brent K. |
I look forward to it
|
Mark M. |
yeah, so do I
|
Jan 24 | 8:15 PM |
Mark M. |
that whole million monkey/million typewriter strategy doesn't work so well
|
Mark M. |
I keep getting copies of Shakespeare
|
Mark M. |
:-)
|
Brent K. |
haha
|
Brent K. |
just reading over : "Though I may pull action
modes into the main trail someday" Not sure if you know or not, but Jake
started with that on the 13th of this month. Hoping for RC1 of v4
sometime soon
|
Brent K. |
(referencing ActionBarSherlock)
|
Brent K. |
Love that library
|
Mark M. |
agreeed
|
Mark M. |
give or take an e
|
Mark M. |
I still will probably keep action modes and context menus in a trail versus the core
|
Brent K. |
That makes sense
|
Mark M. |
I'm trying to keep the core relatively short and sweet
|
Brent K. |
They aren't as common as other things
|
Jan 24 | 8:20 PM |
Brent K. |
Well from what I just read, I think you have an excellent plan in mind
|
Mark M. |
I hope so
|
Brent K. |
That organization structure sounds very natural
|
Brent K. |
In fact, that is similar to how I ended up reading your books
|
Mark M. |
yeah, when you start focusing on hyperlinked media vs printed pages, things flow better
|
Mark M. |
when I started the books, I thought print and the digital editions would have comparable sales volume
|
Brent K. |
I did the first couple of chapters and then
started skipping between the basic and advanced books, from fragments to
action bars to menus
|
Mark M. |
the digital editions swamp the print ones
|
Mark M. |
so, I may as well optimize for my reader base
|
Brent K. |
Yeah.
|
Brent K. |
I was tempted to buy the print copies, since
they're easier to physically read, but copying and pasting and the
promise of any updates was too great
|
Mark M. |
you're welcome to print out portions if you feel that will be useful
|
Mark M. |
no DRM to block it
|
Brent K. |
No printer :(
|
Mark M. |
well, now, that would be a limiting factor
|
Brent K. |
Although that is still appreciated
|
Brent K. |
I do well enough for now
|
Jan 24 | 8:25 PM |
Brent K. |
Having two monitors helps
|
Jan 24 | 8:25 PM |
Brent K. |
I have one in portrait with the book, and eclipse in the other
|
Brent K. |
Well, it looks like its getting to be that time of
evening. Thanks for your help. I'll make sure to cook up some new
ones for later.
|
Brent K. |
*new questions*
|
Mark M. |
OK
|
Mark M. |
next chat is Thursday, 10am Eastern
|
Brent K. |
I have your class schedule added to my calendar widget ;)
|
Brent K. |
See you then.
|
Mark M. |
have a pleasant day!
|
Brent K. | has left the room |
Jan 24 | 8:30 PM |
Mark M. | turned off guest access |