Sep 7 | 7:55 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Sep 7 | 8:00 PM |
lajos | has entered the room |
Mark M. |
howdy, lajos!
|
lajos |
hi Mark!
|
lajos |
i really enjoy the books
|
Mark M. |
thanks!
|
lajos |
got me up to speed quick
|
lajos |
i actually have a tricky problem
|
lajos |
haha
|
Mark M. |
go ahead!
|
lajos |
i saw you commented on something similar on the google android group
|
Sep 7 | 8:05 PM |
lajos |
basically i need a portrait view on top of camera
|
lajos |
and camera needs to be landscape
|
Mark M. |
yeah, that's probably not going to be possible
|
Mark M. |
what specifically is in the "portrait view"?
|
lajos |
i rigged something up but it's not perfect
|
lajos |
the UI
|
lajos |
basically we need to record portrait video
|
lajos |
which is not the issue i have all tat covered
|
lajos |
but i need the ui on top of it to be portrait
|
lajos |
which i also have an almost working solution for
|
lajos |
hold one let me turn on my laptop i'll tell you what i did
|
lajos |
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
|
lajos |
oh i hate it so much
|
lajos |
but i'm new to android so the completion helps a lot and the help
|
lajos |
so basically i have a rotatedframelayout
|
lajos |
in dispatchdraw i rotate the canvas
|
Sep 7 | 8:10 PM |
lajos |
in dispatchtouchevent i recalculate the toucesh
|
lajos |
all works fine
|
lajos |
except
|
lajos |
the ui uses all sorts of redraw optimizations
|
lajos |
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
|
lajos |
if that makes sense
|
Mark M. |
sounds a bit like how the animation framework behaves
|
Mark M. |
not terribly surprising
|
lajos |
i can of course force redraw the whole view
|
lajos |
yeah it's not surprising
|
lajos |
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
|
lajos |
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
|
Mark M. |
but I have nary a clue how you'd pull off doing what you're trying to do in an efficient fashion
|
Mark M. |
are you sure the camera has to be landscape? I thought they might have fixed that limitation
|
lajos |
no at least not on droid2
|
lajos |
even if you look at layar, you can see that the camera is running landscape
|
lajos |
you can see the shadow from the hidden toolbar on the right side of screen
|
Sep 7 | 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
|
lajos |
but that also sounds painful
|
lajos |
well, record button, options button, not a lot of stuff
|
Mark M. |
why do those need to be "portrait"?
|
Mark M. |
if they're ImageButtons, just rotate your icons
|
lajos |
it's the nature of the app
|
lajos |
we need to record in portrait
|
lajos |
basically standing figures
|
Mark M. |
so?
|
Mark M. |
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
|
lajos |
just rotate the buttons and render them in landscape
|
Mark M. |
right!
|
Mark M. |
allow Android to consider the UI to be landscape, but have the stuff *in* the UI have rotated contents to compensate
|
Mark M. |
easy enough for icons
|
Sep 7 | 8:20 PM |
Mark M. |
probably not too bad for text
|
lajos |
sounds good
|
lajos |
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
|
lajos |
no we don't need that thank god
|
lajos |
awesome thanks for the idea
|
lajos |
what do you use for development? just a simple text editor?
|
Mark M. |
not sure about "simple", but, yes, just a text editor
|
Mark M. |
Komodo Edit, presently
|
Mark M. |
Used to be a jEdit fan, but that project seems to have run out of steam
|
Mark M. |
if I were a Mac user, I'd probably be on TextMate
|
lajos |
i used komodo in the past
|
lajos |
i also use jedit for small stuff
|
lajos |
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
|
Sep 7 | 8:25 PM |
lajos |
one nice thing about eclipse is that it also does a little bit of c
|
lajos |
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
|
lajos |
jni is cool, but the ndk-build system is tricky
|
lajos |
i feel that it lacks documentation
|
lajos |
so your book will be a lot of help to people
|
lajos |
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++
|
Mark M. |
I'll be presenting the information in a different fashion, which may help
|
Mark M. |
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
|
lajos |
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
|
lajos |
well that's a big enough bite
|
lajos |
we are using ffmpeg backend
|
lajos |
compiling that was a nightmare
|
lajos |
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
|
lajos |
but the figuring out part is rocky
|
Sep 7 | 8:30 PM |
lajos |
ok thanks again
|
lajos |
i have to go help with baby bedtime
|
Mark M. |
happy to help!
|
Mark M. |
have a pleasant evening!
|
Mark M. |
and tell baby I said "goo!"
|
lajos |
good nite (or i guess it might be afternoon for you)
|
lajos |
haha thanks!
|
lajos |
talk to you later
|
lajos | has left the room |
Sep 7 | 9:10 PM |
Mark M. | turned off guest access |