Office Hours — Today, July 22

Tuesday, July 20

Jul 22
7:55 PM
Mark M.
has entered the room
Mark M.
turned on guest access
8:10 PM
Julius
has entered the room
Mark M.
howdy, Julius
Julius
hello
heh me again...
I hope all is well with you
Mark M.
life is OK -- and you?
Julius
I read you're going to Singapore close to my neck of the woods but I can't really justify coming and saying hi. (mortgage and all)
I am well thank you
I've been reading your latest pdf versions. even tried them on the kindle app
wonderful
anywho
Mark M.
The Kindle app for Android reads PDFs?
Julius
so I don't take up too much of your time
oh no you have a mobi version I downloaded
Mark M.
ah, OK
Julius
there is a pdf reader but I'm not sure how good it is
I downloaded it when I got the flash
but haven't spent the time trying with it
too busy with work at the moment.
i was wondering with the title bar
I can set up a spinning wheel for indeterminate processes
I saw in k9 or some other applications that people have put some message next to it letting users know what is happening
8:15 PM
Julius
o you know where I'd look to figure out how to do this?
Mark M.
well, the progress indicator is a window feature
equestWindowFeature(Window.FEATURE_PROGRESS);
er, rather: requestWindowFeature(Window.FEATURE_PROGRESS);
in terms of a message next to the indicator, though, there are three possibilities I can think of:
Julius
yes I set that up before doing much in onCrerate
Mark M.
1. They just changed the title of the activity (setTitle())
2. They are using custom title View, which I tried once and failed to get working
Julius
(I thought about 2 and got a bit scared)
Mark M.
3. They disabled the title bar and just have the "title bar" as part of their activity, with a ProgressBar and TextView
Julius
oh right
I'll see if I can see if it's in the k9 code - I think it's open source
Mark M.
I'm pretty sure K9 is open source -- IIRC, they have it up on code.google.com somewhere
Julius
I have a couple of other questions if that's ok - not a big queue at the moment
Mark M.
go right ahead
Julius
I have noticed in some of the code for the android player that in the layouts they have an include statement (reusable component style)
uh... one second
8:20 PM
Julius
I'll grab code to show you what I mean
<include layout="@layout/nowplaying" />
(eg.)
I've tried following this but I can't seem to get it to work.
Have you seen this efore?
(I'm wondering now whether it's sdk dependent)
Mark M.
I have used <include> statements in layouts, if that is what you mean
worked at least as of 1.5
possibly earlier
Julius
oh right well that's good
have you written about them anywhere?
(might save some code :))
Mark M.
no -- the one time I used it was on a consulting project
that's a Romain Guy blog post on the topic
kinda short, but perhaps it will be useful for you
Julius
oh sweet his stuff is great
I read about relative layouts to imrpove my list
8:25 PM
Julius
ok I think the other things I am having trouble with I can figure out... :)
thank you for the pointers
Mark M.
sure, happy to help!
Julius
have a good trip if you're not already there. At some point I'll get on a plane to one of these meetups. NZ is just a bit out of the way for most people! :)
Mark M.
well, one of these days, I'll come up with an excuse to get down to your corner of the planet
Julius
do you watch rugby? World Cup next year is here... :)
Mark M.
no, sorry, not a big rugby fan
8:30 PM
Julius
oh actually I did have one other question - I am downloading a file and sometimes the process stalls and I want to have some kind of way to respond to it so that the process throws an exception and life can go on.
Mark M.
ummm...was that a question?
Julius
I have a URLConnection which I open and an InputStream which I read.
sorry...
just trying to give you an idea of what I am doing an what I'd like to have happen
8:35 PM
Mark M.
ok, keep going
Julius
just wondering - how do people deal with this kind of situation?
Mark M.
that's tough to answer in the abstract
Julius
would it help if I shouled you the code I'm using?
showed
Mark M.
is your concern that the InputStream blocks forever?
Julius
yes
Mark M.
there are some timeouts you can set, somewhere
Julius
(you have a great way of articulating things)
oh...
Mark M.
setReadTimeout()
and setConnectTimeout()
on URLConnection
Julius
right
just found that then thank you! :)
ok I'll leave you in peace thank you once again - apologies for the poor communication :)
Julius
has left the room
Mark M.
oh, no problem -- it's a limitation of chats, that's all
8:55 PM
Mark M.
turned off guest access

Tuesday, July 20

 

Office Hours

People in this transcript

  • Julius
  • Mark Murphy