Feb 28 | 8:55 AM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Feb 28 | 9:05 AM |
tunneling | has entered the room |
Mark M. |
howdy, tunneling
|
Mark M. |
how can I help you today?
|
tunneling |
good day!
|
Mark M. |
that's highly debateable
|
Mark M. |
I'm on Day 5 of the everlasting cold
|
Mark M. |
starting to *really* get on my nerves
|
tunneling |
this true, i'm actually under the weather and in bed.
|
Mark M. |
:-)
|
tunneling |
haha
|
tunneling |
tis the season
|
Feb 28 | 9:10 AM |
tunneling |
hey, is there a trick to making the spacing
between views the same? I have a set of textviews that I put in a grid
like format and I'd like to put a border around them that's 1px.
|
tunneling |
or 1dp
|
Mark M. |
minimum spacing between widgets is dictated by the widgets themselves, particularly their backgrounds
|
Mark M. |
above that, you android:layout_margin* to add more space
|
tunneling |
yea.. my problem is that for views in the center,
the right side of one view and the left side of the next view combine to
make a 2sp border
|
Mark M. |
then don't draw the border on both adjoining widgets
|
tunneling |
i had made a style that has the margin on the
appropriate side to make it look right, i was just hoping there was a
more elegant way
|
Mark M. |
(e.g., left one draws, right one does not)
|
Mark M. |
I am not aware of anything more elegant, sorry
|
tunneling |
ok. im just thinking ahead to trying to make this
layout more dynamic, and was hoping I wouldn't have to figure out the
position of the view in order to add the right styling
|
Mark M. |
well, arguably, the thingy that draws the grid should be a ViewGroup
|
Mark M. |
and it knows the positions of all of its children
|
Mark M. |
within its own space, at any rate
|
tunneling |
ok
|
Feb 28 | 9:15 AM |
Mark M. |
if you have other questions, chime in
|
tunneling |
ok, that was really the main thing for today. I
implemented the state list drawables yesterday using shape drawables..
worked out well.
|
tunneling |
except that eclipse was having a fit with the xml
|
Mark M. |
welcome to Eclipse
|
Feb 28 | 9:20 AM |
tunneling |
yea? I all the time have to delete the R file and get it to regen so it sees resources
|
Mark M. |
rather than delete R, use Project > Clean from the Eclipse menu
|
tunneling |
ok
|
Mark M. |
this should not be needed all the time, but will be needed sometimes
|
tunneling |
ok
|
tunneling |
I'm thinking about trying to implement a mechanism
for alerting users that a new version is on the Market. I have a couple
of Users that are using a version like 10 revs back and keep reporting
FC that are corrected.
|
tunneling |
I guess that would be easy enough with an xml or JSON file on the mother ship?
|
Feb 28 | 9:25 AM |
Mark M. |
yes
|
Mark M. |
I should be creating a component for handling this scenario in the next few weeks
|
tunneling |
oh cool.
|
tunneling |
i was essentially thinking of a "developer
message" mechanism so I could have the user opt in to receive messages,
and then have a notification that there is a new message.
|
Mark M. |
that might be as simple as a blob of HTML
|
Mark M. |
use an HTTP HEAD request to check the date
|
Mark M. |
if the date is newer than the last one you sent, display the HTML in a WebView or user's default browser
|
tunneling |
i haven't tried the google cloud service, so i was thinking about just using a Service to periodically query the server.
|
Mark M. |
AlarmManager and IntentService would be a reasonable choice
|
tunneling |
ok
|
Mark M. |
though you may need my WakefulIntentService, so the device doesn't fall asleep while you do the work
|
tunneling |
ok
|
Feb 28 | 9:30 AM |
tunneling |
I've never used that, I'll read up on it.
|
Mark M. |
there is coverage in the Advanced Services chapter in _The Busy Coder's Guide to Advanced Android Development_
|
tunneling |
you know, if I would actually just read the books. I may not have to bug you so much!
|
Mark M. |
well, there *is* a reason why I wrote them... :-)
|
tunneling |
haha
|
tunneling |
I just can't stand the thought of you being in these office hours sessions all alone.
|
tunneling |
ok, well.. thanks again for your time. I need to run. get well!
|
Mark M. |
you too
|
Feb 28 | 9:40 AM |
Darryl B. | has entered the room |
Darryl B. |
Hi Mark
|
Mark M. |
howdy, Darryl
|
Darryl B. |
I have a quick question on best practice
|
Mark M. |
OK
|
Mark M. |
go ahead
|
Darryl B. |
I have a complex data object that I use that spans multiple fragments in my UI
|
Darryl B. |
I am using the fragmentpager to manage the display
|
Darryl B. |
And I was wondering should I instantiate the data object in the pager or extend application and use it from there
|
Feb 28 | 9:45 AM |
Mark M. |
is this "data object" part of your app's data model?
|
Darryl B. |
I am sort of new to android and jave so I am just getting the hange of thins
|
Darryl B. |
yes
|
Darryl B. |
the app has a SQLite db with about 60 tables
|
Mark M. |
60 tables sounds too complicated for a mobile device, but, be that as it may...
|
Darryl B. |
I know, not my first choice for my first project
|
Mark M. |
the activity hosting the FragmentPager should be the one to query the database, using a Loader
|
Mark M. |
the fragments can get at the resulting Cursor by asking the activity for it
|
Darryl B. |
ok cool that is where I was thinking it would go.
I was not using cursors because of the _id restriction, so I have been
using classes generated from the OData model
|
Feb 28 | 9:50 AM |
Mark M. |
there is no _id restriction on *cursors*
|
tunneling | has left the room |
Mark M. |
there is an _id restriction on *CursorAdapter* (and its subclasses)
|
Darryl B. |
ah now I see I read that wrong
|
Darryl B. |
that will make things a little easier
|
Darryl B. |
I have been using the IO sched app as a guide
|
Darryl B. |
thanks for taking the time to answer my questions
|
Mark M. |
sure, no problem
|
Mark M. |
that's why these office hours exist
|
Darryl B. |
Are you going to be the instructor on any of the Android Bootcamp classes?
|
Mark M. |
I teach Marakana's Android Bootcamp in NYC and Washington DC
|
Feb 28 | 9:55 AM |
Darryl B. |
Great I am going to sign up soon, I will check the schedule
|
Mark M. |
next DC one is first week of April; next NYC one is mid-May
|
Darryl B. |
Thanks again have a great day, see you in class
|
Mark M. |
thanks!
|
Darryl B. | has left the room |