Jan 13 | 8:50 AM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Jan 13 | 8:55 AM |
DanDroid | has entered the room |
Mark M. |
hello, DanDroid!
|
Mark M. |
how can I help you today?
|
DanDroid |
good morning mark
|
DanDroid |
a few questions
|
Mark M. |
go ahead with your first one
|
Jan 13 | 9:00 AM |
DanDroid |
I am having a very hard time with the graphical editor in android studio. elements snap instead of smoothly allowing me to widgets in place. is there a way to disable snapping?
|
Mark M. |
I think so -- hold on a moment...
|
DanDroid |
ok thanks
|
Mark M. |
what container class are you trying to drag into?
|
Mark M. |
the drag-and-drop behavior varies by container
|
Mark M. |
so, for example, LinearLayout is going to limit you to dropping a widget after the preceding one, and perhaps setting the gravity
|
DanDroid |
well i have a relativelayout and i have an edittext field and a button below that. when i try to place the button precisely below the edittext field, it snaps to the field instead of allowing me to move it smoothly in a precise manner.
|
Mark M. |
RelativeLayout does not give me a snap-to-grid sort of effect, though drag-and-drop with RelativeLayout is wonky in general (as it was in Eclipse)
|
Mark M. |
well, that's kinda the point of RelativeLayout
|
Mark M. |
you're usually attaching widgets to other widgets, or to the RelativeLayout itself
|
Jan 13 | 9:05 AM |
Mark M. |
it *can* add margins, but you will have some difficulty doing so for small margin values
|
Mark M. |
as the "magnets" that control that snapping effect are relatively strong
|
Mark M. |
I don't think there's anything that you can do about that
|
DanDroid |
ok
|
DanDroid |
i think i get what you are saying. ill revisit this if i have major issues in the future
|
DanDroid |
next quesiton
|
Mark M. |
go right ahead -- if somebody else joins the chat, though, I'll want to give them a shot
|
DanDroid |
in the logcat, most of the time it does not scroll continuously with messages, but sometimes it does. is it normal to have it scroll messages consinuously? it does this with the same app i am testing with a real device. sometimes with this app it scrolls continuously and sometimes it does not.
|
Mark M. |
I am not completely clear on what you mean
|
Mark M. |
it should scroll to bottom automatically, unless you have manually scrolled up
|
Mark M. |
whether new messages show up depends upon whether they match the filter
|
Mark M. |
and I have had filter problems on Android Studio
|
Mark M. |
so sometimes I wind up having to switch off the automatically-created app-specific filter and switch to just filtering on severity in order to find my messages
|
DanDroid |
no no i meant messages keep appearing in the logcat window they dont stop. is that normal
|
Jan 13 | 9:10 AM |
Mark M. |
if the scroll thumb is at the bottom, and new messages come in that match the filter, they should automatically show up
|
DanDroid |
most of the time once i run the app and the messages stop once i stop interacting with the screen
|
Mark M. |
LogCat is a "transcript"-style UI
|
Mark M. |
well, again, that depends on the messages and the filters
|
Mark M. |
if you have no filters provided, and you are debugging on hardware, you should see a fairly steady stream of messages, as Android is rather chatty
|
Mark M. |
even the emulator should give you a fair bit of noise
|
Mark M. |
but if you have filters applied, messages only show up if they match the filter
|
DanDroid |
sometimes I dont get a stead stream of messages for the same app i am testing on a real device
|
Mark M. |
what filter do you have set up? or do you not have a filter?
|
DanDroid |
i dont have any filters set up
|
DanDroid |
i dont think i do
|
Mark M. |
are you sure? an app-specific filter is automatically applied when Studio runs your app
|
DanDroid |
i dont remember setting up a filter though
|
Mark M. |
that will be the drop-down, just above the transcript itself, in the toolbar on the right side
|
Mark M. |
if it says something like "app: xxx.yyy.zzz", where xxx.yyy.zzz is your application ID, then it is filtering to be just your app's messages
|
DanDroid |
oh. no i did not do that i guess its set to display all messages
|
Mark M. |
Android Studio *automatically* flips to an app-specific filter when you run the app
|
Mark M. |
you have to manually remove the filter to see all messages
|
DanDroid |
its set to verbose
|
Mark M. |
so, if you have not done any of that, you are only seeing messages from your app
|
Mark M. |
look to the right
|
Mark M. |
after verbose, there is a "search" field, then a drop-down
|
Mark M. |
what is in the drop-down?
|
DanDroid |
ya the app selected
|
Mark M. |
more accurately, what is the current selection in the drop-down?
|
Mark M. |
right
|
DanDroid |
is*
|
Jan 13 | 9:15 AM |
Mark M. |
so you are only seeing the messages from your app
|
Mark M. |
toggle that to "No Filters" to get the full unfiltered feed
|
DanDroid |
ok but why does it sometimes show a steady stream of message while at other times it does not for the same app im running on a real device
|
Mark M. |
I have had some problems with the app-specific filter not working, and no messages showing up
|
DanDroid |
i have observed that too
|
Mark M. |
it happens occasionally, and I have not figured out how to reliably reproduce the effect, to file a bug report
|
Mark M. |
the only thing I have been able to do there is to switch to "No Filters", and perhaps only show error severity
|
DanDroid |
but why does it stead streamed sometimes and not others for the same app
|
DanDroid |
show*
|
Mark M. |
the bug is a per-run bug
|
Mark M. |
sometimes it works, sometimes it does not
|
Mark M. |
it does not have anything to do with your specific app, AFAICT
|
DanDroid |
ok
|
DanDroid |
last question
|
DanDroid |
sorry if im hogging chat
|
Mark M. |
nobody else is here right now, so go right ahead
|
Jan 13 | 9:20 AM |
DanDroid |
View paste
|
Mark M. |
"how do I reference this" -- I do not know what "this" is
|
DanDroid |
or is that the right way to do it?
|
Mark M. |
is "this" the ListView?
|
DanDroid |
yes
|
Mark M. |
are you using ListActivity/ListFragment, or just a regular Activity/Fragment, for showing this layout?
|
DanDroid |
ActionBarActivity
|
Mark M. |
are you using fragments at all, or just a simple ActionBarActivity?
|
DanDroid |
just ActionBarActivity
|
DanDroid |
no frags in the layout
|
DanDroid |
framgents
|
Mark M. |
in that case, you are presumably calling setContentView() to load up the layout
|
DanDroid |
yes
|
Mark M. |
you would retrieve the ListView by calling findViewById()
|
DanDroid |
and then pass that in to the list adapter?
|
Jan 13 | 9:25 AM |
Mark M. |
no, you pass the ListAdapter to the ListView, via setAdapter()
|
DanDroid |
ok
|
DanDroid |
I have a button that loads the activity that hosts google maps. sometimes it takes about 3 seconds to load and at other times it loads right away like in 1 second. is this a bug within adroid or is it possible to make it load fast all the time?
|
Mark M. |
it's not a bug
|
Mark M. |
it's the implementation of Google Maps
|
DanDroid |
oh ok
|
Mark M. |
nothing really to be done about it
|
Mark M. |
in part, it's whether the process that handles the maps is running or not
|
Mark M. |
if it is not, Android needs to set up that process, and it appears to have to do a bunch of initialization work
|
DanDroid |
i see
|
DanDroid |
these are all questions i have for you mark. Thank you so much for helping me. I appreciate it. have a nice day! :)
|
Mark M. |
you are very welcome
|
Jan 13 | 9:30 AM |
DanDroid |
Bye. Take care.
|
DanDroid | has left the room |
Jan 13 | 10:00 AM |
Mark M. | turned off guest access |