Office Hours — Today, August 4

Thursday, July 30

Aug 4
8:55 AM
Mark M.
has entered the room
Mark M.
turned on guest access
Refael O.
has entered the room
Mark M.
hello, Refael!
how can I help you today?
Refael O.
Hey Mark! nice coming in here as usual
9:00 AM
Refael O.
thanks a lot for those office hours, it was the thing that made me buy the book and it's awesome! so, first of all, thank you so much.
Mark M.
you are very welcome
Refael O.
solved me several problems already in the past =]
ok, my problem right now is..
I am working with a third party library.. one you made =]
the camera library
Mark M.
by which I assume you mean the old camera library
Refael O.
and I want to use the phones camera as sort of a background (i want a text view on top of it, sort of guiding the user what to do)
but the text view is NOT showing
i took the time to sort the files with pictures
if you could give a look there that would be easier then explaining
Mark M.
how are you arranging for the TextView to be on top of the CameraView?
Refael O.
my XML file is also in that zip file
Mark M.
um, well, first, what you're doing is *so* not supported
Refael O.
but it's just a plain text view, nothing much to say about it, hence i have no idea why it's not showing, i also put an image of how it's suppose to be.. and in the android studio preview it's showing good!
9:05 AM
Refael O.
what do you mean by not supported? :)
Mark M.
I mean pretty much what I wrote
the only supported API is through extras on CameraActivity
while you are welcome to use the open source code however you want, expect it to break fairly continuously, as I am not considering the internal implementation to be a stable API
have you use uiautomatorviewer to examine your UI of your running app?
Refael O.
I understand, but, is there any other way to achieve my goal without editing the layout?
Mark M.
you would have to not use this library
Refael O.
aw really? well, it's a GREAT library.. no way of inserting that plain text view?
Mark M.
not in any supported fashion
simply because I don't want to support arbitrary stuff
Refael O.
i see
Mark M.
getting this camera stuff to work, even with my limited API, is very difficult
this was one of the mistakes that I made with my first camera library: inadequate scope control
so you can probably get what you want working, just please don't ask me to change the library to accomodate it
Refael O.
do you know any camera library that maybe help me reach my goal?
Mark M.
not off the top of my head
Refael O.
no no I'm not asking you to change anything
9:10 AM
Mark M.
right now, you're not asking me to change anything
Refael O.
i'll search for another way of doing it then
Mark M.
but, eventually, you may come to a point where you get tired of having to re-implement your own mods to my code, every time I ship an update that breaks your mods
tactically, I don't see what the problem is, which is why I suggested uiautomatorviewer, just to confirm that you're really loading in the layout you think you are
Refael O.
what is uiautomatorviewer?
Mark M.
it is like Hierarchy View, but works with production hardware
very handy for examining a UI in place on a running device
you can basically get a dump of the whole view hierarchy, with whatever information is available via the accessibility APIs
in particular, in this case, you can see whether your TextView is there, whether it is where you think it is, what the text is, etc.
one slight hiccup that I see in your revised layout file is that you have no real rule for where the TextView is vertically
you have 20dp of top margin
9:15 AM
Mark M.
but you don't have an android:layout_* rule constraining the vertical position
that should have it be anchored off the top of the RelativeLayout as a default
but, still, it may be worth putting in an explicit rule for that and seeing if it helps
Refael O.
i see
9:20 AM
Refael O.
well, even when giving vertical rule it is not showing for some reason
okie, ill go and look for something else that may be useful
thanks a lot again Mark!
Mark M.
you are welcome, and I am sorry that my chosen scope for the camera library is limited
9:25 AM
Refael O.
well, so far all of your libraries helped me so much! this one too, used it already in the past. so I don't want to feel sorry about anything! i'm so thankful, really..
want you**
have a good day Mark, nothing else for today.. bye bye!
Mark M.
see you later!
9:40 AM
Refael O.
has left the room
10:00 AM
Mark M.
turned off guest access

Thursday, July 30

 

Office Hours

People in this transcript

  • Mark Murphy
  • Refael Ozeri