Oct 7 | 3:50 PM |
Mark M. | has entered the room |
Oct 7 | 3:55 PM |
Mark M. | turned on guest access |
Oct 7 | 4:35 PM |
Chandra S. | has entered the room |
Mark M. |
hello, Chandra!
|
Mark M. |
how can I help you today?
|
Chandra S. |
Hi Mark
|
Chandra S. |
If we use the layout_weight, must we change the height/width to 0dp?
|
Mark M. |
"must" is a strong term :-)
|
Oct 7 | 4:40 PM |
Mark M. |
if your objective is to distribute purely based on weight, then yes, you set that axis' dimension to 0dp
|
Mark M. |
if you want to distribute space based on something else first (e.g., wrap_content), and handle excess space via weight, you can do that too
|
Chandra S. |
What happened if we keep the axis to non-zero and set the layout_weight?
|
Mark M. |
if the sum of the axis' sizes is less than the available space, the rest is apportioned via weight
|
Mark M. |
if the sum of the axis' sizes is greater than the available space, I think the weight is used to try to shrink the sizes to fit, though it has been years since I tried this
|
Chandra S. |
Ah, I see, thanks, Mark
|
Chandra S. |
Actually I'm following udacity tutorial
|
Chandra S. |
In a custom adapter, in the getView method, its method is to catch the null value of the convertView
|
Chandra S. | |
Chandra S. |
line 50-52
|
Chandra S. |
Is this the same as calling super method as in your book?
|
Mark M. |
not precisely
|
Oct 7 | 4:45 PM |
Mark M. |
calling super inflates the layout if needed, the same as those lines
|
Mark M. |
super.getView() also fills in the one TextView with toString() of your model object
|
Mark M. |
in many cases, this is not desired, in which case, you use code like what you showed
|
Mark M. |
though I strongly recommend getLayoutInflater() over LayoutInflater.from()
|
Chandra S. |
Got it
|
Chandra S. |
I'm trying to create like a file explorer app
|
Chandra S. |
I'm installing ES File Explorer and it needed superuser. Did the normal permission not enough for a normal file explorer?
|
Mark M. |
you can only explore files that you can access
|
Mark M. |
with root, you can explore everything
|
Oct 7 | 4:50 PM |
Chandra S. |
So, something like 'dir' operation can not be done without root?
|
Chandra S. |
Or what is the limitation of files that we can access? Is it from 'public' directory only?
|
Mark M. |
your file explorer has access to external storage
|
Mark M. |
and that's about it, using standard Java file I/O
|
Mark M. |
(e.g., File class)
|
Chandra S. |
Is it the same File library from Java for the normal desktop that's used by Android?
|
Mark M. |
um, in a manner of speaking, yes
|
Chandra S. |
I see, I'll try
|
Chandra S. |
I want to ask a honest question :-)
|
Chandra S. |
what is the good way to effectively mastering the android development?
|
Chandra S. |
I'm trying to create a target to make 1 production app, but when I face a difficulty, I read from stackoverflow, sometimes it's hard to understand
|
Chandra S. |
But when I read the specific topic only from your book, it's also confusing if not reading the previous chapter
|
Chandra S. |
So I decided to read chapter-to-chapter, but takes long time, and sometimes I get boring
|
Mark M. |
the core chapters (first 800 pages or so) are definitely designed to be read in sequence
|
Oct 7 | 4:55 PM |
Mark M. |
the trails are designed to be read pretty much in any order, with the prerequisites pointed out at the beginning of each chapter
|
Mark M. |
I cannot tell you what it takes to "master" Android development, other than lots of practice
|
Chandra S. |
Topic like RecyclerView came later so sometimes I jumped to specific chapter
|
Mark M. |
assuming that you have read the core chapters, the RecyclerView chapter should be OK in general
|
Mark M. |
some specific samples tie into other stuff (e.g., the samples loading videos to show using a Cursor for the model data)
|
Chandra S. |
I see.. OK, I'll try.. Thanks, Mark :-)
|
Oct 7 | 5:00 PM |
Mark M. |
that's a wrap for today's chat
|
Mark M. |
the transcript will be posted to https://commonsware.com/office-hours/ shortly
|
Mark M. |
the next chat is tomorrow at 7:30pm US Eastern time
|
Mark M. |
have a pleasant day!
|
Chandra S. | has left the room |
Mark M. | turned off guest access |