Office Hours — Today, September 7

Friday, September 3

Sep 7
7:55 PM
Mark M.
has entered the room
Mark M.
turned on guest access
8:00 PM
lajos
has entered the room
Mark M.
howdy, lajos!
lajos
hi Mark!
i really enjoy the books
Mark M.
thanks!
lajos
got me up to speed quick
i actually have a tricky problem
haha
Mark M.
go ahead!
lajos
i saw you commented on something similar on the google android group
8:05 PM
lajos
basically i need a portrait view on top of camera
and camera needs to be landscape
Mark M.
yeah, that's probably not going to be possible
what specifically is in the "portrait view"?
lajos
i rigged something up but it's not perfect
the UI
basically we need to record portrait video
which is not the issue i have all tat covered
but i need the ui on top of it to be portrait
which i also have an almost working solution for
hold one let me turn on my laptop i'll tell you what i did
eclipse takes some time to start ;(
Mark M.
one of the many reasons I don't use it
lajos
so basically i extended a framelayout
oh i hate it so much
but i'm new to android so the completion helps a lot and the help
so basically i have a rotatedframelayout
in dispatchdraw i rotate the canvas
8:10 PM
lajos
in dispatchtouchevent i recalculate the toucesh
all works fine
except
the ui uses all sorts of redraw optimizations
so when i click a button, that is the whole width of the screen, only the part of it updates that overlaps where it would be without rotation
if that makes sense
Mark M.
sounds a bit like how the animation framework behaves
not terribly surprising
lajos
i can of course force redraw the whole view
yeah it's not surprising
but i wonder if you have an idea as to how to automatically force redraw
Mark M.
I'd run away screaming
lajos
haha that's what i did when i spent a day working on it
unfortunatelly this is a requirement for the app we are developing
Mark M.
you might take a peek at how the animation framework works, to see if you get any ideas
but I have nary a clue how you'd pull off doing what you're trying to do in an efficient fashion
are you sure the camera has to be landscape? I thought they might have fixed that limitation
lajos
no at least not on droid2
even if you look at layar, you can see that the camera is running landscape
you can see the shadow from the hidden toolbar on the right side of screen
8:15 PM
Mark M.
what sorts of UI stuff is going in your, um, RotatedFrameLayout?
lajos
i guess i could try to create a surface view that rotates the data from the camera
but that also sounds painful
well, record button, options button, not a lot of stuff
Mark M.
why do those need to be "portrait"?
if they're ImageButtons, just rotate your icons
lajos
it's the nature of the app
we need to record in portrait
basically standing figures
Mark M.
so?
what precisely is the difference between portait and landscape with rotated icons?
lajos
the issue is that the camera activity requires to be locked into landscape
Mark M.
so?
lajos
but since we have a requirement to do portrait only recording, it would be funny if the ui would be landscape
Mark M.
you're missing the point
lajos
oh i guess i see what you are getting at
just rotate the buttons and render them in landscape
Mark M.
right!
allow Android to consider the UI to be landscape, but have the stuff *in* the UI have rotated contents to compensate
easy enough for icons
8:20 PM
Mark M.
probably not too bad for text
lajos
sounds good
why did i not think of that haha
Mark M.
gets icky if you need things like EditTexts or something
lajos
maybe cause i was trying to muscle a portrait view on top
no we don't need that thank god
awesome thanks for the idea
what do you use for development? just a simple text editor?
Mark M.
not sure about "simple", but, yes, just a text editor
Komodo Edit, presently
Used to be a jEdit fan, but that project seems to have run out of steam
if I were a Mac user, I'd probably be on TextMate
lajos
i used komodo in the past
i also use jedit for small stuff
the only reason i put up with eclipse is the built in help and copletion
Mark M.
understood
lajos
i tried intellij but it looks terrible on linux
8:25 PM
lajos
one nice thing about eclipse is that it also does a little bit of c
and having to do a jni backend, that comes in handy
Mark M.
makes sense
lajos
ok i won't bore you with stuff like that
Mark M.
been playing a bit with JNI/NDK recently, for the _Android Beyond Java_ book
lajos
thanks again for the suggestion
Mark M.
no problem, happy to help!
lajos
thanks
jni is cool, but the ndk-build system is tricky
i feel that it lacks documentation
so your book will be a lot of help to people
so they don't have to take the hard road like me ;)
Mark M.
possibly -- it's been a really long time since I fussed around with C/C++
I'll be presenting the information in a different fashion, which may help
but I'm not getting into all sorts of makefile trickeration or anything
lajos
i've been doing bunch of iphone work, so i got the c part
but the build system is tricky
Mark M.
getting Lua going as an interpreter via the NDK is as far as I'm taking it for now
lajos
i like that they made it easy, at least easy once you get your head around it
well that's a big enough bite
we are using ffmpeg backend
compiling that was a nightmare
haha
Mark M.
yeah, I can see where that would not be pleasant
lajos
actually it's like ndk-build - once you figure it out it's easy
but the figuring out part is rocky
8:30 PM
lajos
ok thanks again
i have to go help with baby bedtime
Mark M.
happy to help!
have a pleasant evening!
and tell baby I said "goo!"
lajos
good nite (or i guess it might be afternoon for you)
haha thanks!
talk to you later
lajos
has left the room
9:10 PM
Mark M.
turned off guest access

Friday, September 3

 

Office Hours

People in this transcript

  • lajos
  • Mark Murphy