Mark M. | has entered the room |
Mark M. | turned on guest access |
Jun 26 | 4:25 PM |
sposaro | has entered the room |
sposaro |
Hi Mark!
|
Mark M. |
howdy, sposaro!
|
Mark M. |
how can I help you today?
|
sposaro |
Not really sure. Just finished up with that
linting support for Phabricator and now I have to move on to unit tests.
Not really familiar with Unit tests at all let along Android ones.
|
Mark M. |
unit tests *of* the Phabricator support?
|
Mark M. |
wouldn't those be in PHP
|
Mark M. |
?
|
sposaro |
So I guess I just wanted to pick your brain and beliefs on testing structure and what now
|
sposaro |
Yeah. Well that's the end goal is run the AndroidUnitTests to create a report that will be handed off to Phabricator
|
sposaro |
**what not
|
Jun 26 | 4:30 PM |
Mark M. |
given an Android project set up for command-line builds, ant run-tests will execute them in a standard JUnit test runner
|
Mark M. |
and you get standard JUnit output
|
sposaro |
lol. Yeah. Guess I need to start learning JUnit, I'm only familiar with G-Unit :)
|
Mark M. |
particularly if you want to get fancy (e.g., formatting output), you'll need some JUnit-fu
|
Mark M. |
note that Android bakes in JUnit 3.x, not 4.x, so
the annotation-based testing you'll read about that showed up in 4.x is
unavailable
|
sposaro |
ok cool. I will keep that in mind. I think I remember something saying not to use 4.X
|
sposaro |
I guess I do have one question that I have been meaning to ask and it bugs me everything.
|
Mark M. |
there's a chapter in _The Busy Coder's Guide to
Advanced Android Development_ (and the current Omnibus) that covers
JUnit in Android, though it's not one of my better chapters
|
sposaro |
ok thanks. I haven't look at any of the updates
since I last taught my mobile programming class in the fall and I don't
remember ever focusing on that
|
Jun 26 | 4:35 PM |
sposaro |
It there a way to horizontally center 2 views in a RelativeLayout without creating a new ViewGroup?
|
sposaro |
2 views side-by-side that is
|
Mark M. |
define "creating a new ViewGroup"
|
Mark M. |
a horizontal LinearLayout as a child of the RelativeLayout could do it
|
sposaro |
stuffing them into say a LinearLayout
|
Mark M. |
oh
|
Mark M. |
I can't think of how you'd do that
|
Mark M. |
short of fiddling with margins from Java code
|
Mark M. |
in which case I'd *seriously* steer you towards just using the child LinearLayout
|
sposaro |
yeah that won't scale well
|
Mark M. |
???
|
sposaro |
messing around with fixed marins in dip won't look nice when I rotate the screen
|
Mark M. |
oh, sorry, I thought you meant the child LinearLayout wouldn't scale well
|
sposaro |
I thought I saw Romain post something that said to
use Gravity or layout_gravity somehow, but I haven't been able to get
it to work
|
Mark M. |
yes, manual margin manipulation makes messes
|
Mark M. |
centering something horizontally in a RelativeLayout is easy, so long as it is only one thing
|
Mark M. |
depending on what the two views are, you could try
to have them both be truly centered and use gravity to shove their
respective "content" to the left and righ
|
Mark M. |
er, right
|
Mark M. |
but that seems unlikely to work except in a few cases
|
Jun 26 | 4:40 PM |
sposaro |
yeah. I only every get a freebee if I can use a compounddrawable
|
sposaro |
well I guess that answers my issue, I feel better knowing that the man himself would have done the same thing, lol
|
Mark M. |
unless you're running into stack depth issues, I'd
start with using the nested layouts and then worry about performance
if/when it becomes an issue
|
Mark M. |
stack depth is the one big thing to drive people away from nested layouts
|
sposaro |
yeah. I'm pretty good at ViewOptimizations. I
implemented the new favorites layout for ICS in the phone and people app
and had to constantly worry about even "good enough" performance, lol
|
sposaro |
I was able to take 33 views from this one layout at work and condense it into 10.
|
Mark M. |
that's impressive
|
sposaro |
They thought the background task was the problem, but traceview showed me it was onDraw and onMeasure
|
Mark M. |
Traceview is definitely the tool to use for this sort of thing
|
Jun 26 | 4:45 PM |
Mark M. |
do you have another question?
|
sposaro |
no. I think that's it for today
|
Mark M. |
OK
|
Mark M. |
Jelly Bean statue showed up at the Googleplex, so tomorrow's likely to be a bigger-than-average day...
|
sposaro |
oh cool. Did they post another youtube video?
|
Mark M. |
dunno -- I got a still photo via Twitter
|
sposaro |
I'm really excited. Even more so now that I actually know many of the presenters
|
Mark M. | |
Jun 26 | 4:50 PM |
sposaro |
ha. that's great thanks
|
Jun 26 | 5:00 PM |
Mark M. |
well, that's a wrap for today's chat
|
Mark M. |
next one is 10am Eastern on Thursday
|
Mark M. |
have a pleasant day!
|
sposaro |
ok. thanks mark
|
sposaro | has left the room |
Mark M. | turned off guest access |