Jul 13 | 3:50 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Jul 13 | 3:55 PM |
Ron | has entered the room |
Mark M. |
hello, Ron!
|
Mark M. |
how can I help you today?
|
Ron |
View paste
|
Mark M. |
hmmm... usually, people want to do the opposite...
|
Mark M. |
-dontshrink should do what you want, though
|
Ron |
We are more worried about someone reverse engineering our product at this point.
|
Jul 13 | 4:00 PM |
Ron |
Okay, I'll try that tonight, also...
|
Ron |
We brought over a ProGuard.cfg file from another Eclipse based project but it blew up with LOTS of errors/warnings? We did some research on the errors/warnings and decided that the minify was too complicated for us to attempt to use at this point.
|
Mark M. |
um, for anyone with any talent, ProGuard is not going to help with blocking reverse-engineering
|
Ron |
Yeah we are aware of that but it satisfies our management for now.
|
Mark M. |
ha!
|
Mark M. |
ok
|
Ron |
View paste
|
Mark M. | |
Mark M. |
that will cover the integration of ProGuard into the build process
|
Ron |
View paste
|
Mark M. |
OK
|
Ron |
That's all for today, thanks again!
|
Mark M. |
you
|
Mark M. |
you're welcome!
|
Ron | has left the room |
Steve S. | has entered the room |
Mark M. |
hello, Steve!
|
Steve S. |
Hi, Mark!
|
Mark M. |
how can I help you today?
|
Steve S. |
Let me paste my question:
|
Steve S. |
I'm starting a new project that has a lot of resources and am trying to figure out a good way to organize them - e.g. using folders, plugins, or naming conventions. Is there anything in your book about this? Do you have any suggestions or recommendations?
|
Mark M. |
well, you cannot use folders, other than for their official use in organizing by type (layout, drawable, etc.) and qualfiers (e.g., -v21, -xxhdpi)
|
Steve S. |
Ok
|
Mark M. |
in particular, you cannot have sub-folders in a resource folder
|
Mark M. |
so, you cannot have res/layout-sw600dp/foo/
|
Mark M. |
naming conventions is fairly common, particularly prefixes to control how they sort
|
Mark M. |
I'm not sure what plugins might offer here
|
Jul 13 | 4:05 PM |
Steve S. |
There's a grouping pugin that I've seen recommended, but it depends on prefixes anyway.
|
Mark M. |
I'm guessing that you mean one like this: http://android-arsenal.com/details/1/2201
|
Steve S. |
Yes, that's the one.
|
Mark M. |
AFAIK, that's about the best that you can do
|
Mark M. |
other than to sit back and ponder whether you should have so many resources :-)
|
Steve S. |
Good question. To some extent it's out of my control since it's based on someone else's design.
|
Mark M. |
ah
|
Steve S. |
One thing that I have done is to use includes with layouts to try to make them more modular. Maybe I should try to limit my use of includes?
|
Jul 13 | 4:10 PM |
Mark M. |
that depends on whether they are being reused
|
Mark M. |
busting up a single-use layout into five single-use layouts isn't something that I would do
|
Mark M. |
OTOH, breaking out a layout that will appear in several other layouts makes sense
|
Steve S. |
Ok. I'll take another look at that since a lot of them are single-use layouts. That may be one way to improve how I'm dealing with resources.
|
Steve S. |
Regarding the use of names and prefixes, are there any conventions that it would be good for me to follow?
|
Mark M. |
AFAIK, it's mostly "whatever feels good"
|
Steve S. |
OK.
|
Mark M. |
so, you might organize by activity, by major functional area, etc.
|
Steve S. |
Are there any projects you could point me to that I could use as models?
|
Mark M. |
not really
|
Mark M. |
I haven't spent time looking over larger open source projects
|
Steve S. |
Ok.
|
Mark M. |
and smaller ones don't usually have the issue
|
Mark M. |
you might see how Google approaches their various AOSP apps
|
Jul 13 | 4:15 PM |
Steve S. |
Great. I'll take a look.
|
Mark M. |
when I look at those apps, I am usually focused on some specific thing, not looking at "the big picture" of stuff like resource organization
|
Steve S. |
I'll follow up on your suggestions.
|
Steve S. |
Any further tips or ideas?
|
Mark M. |
um, wear sunscreen?
|
Mark M. |
I don't have anything general, though I'm up for more specific questions
|
Jul 13 | 4:20 PM |
Steve S. |
The main thing I'm going to do now is to see about combining my single-use layouts into larger ones. My concern about that was that they become unwieldy, but it sounds like breaking them up into more manageable sizes has the downside of making the files harder to organize and keep track of.
|
Mark M. |
yes
|
Mark M. |
you need to decide which pain is less painful
|
Steve S. |
Right, Thanks so much! I appreciate your hep.
|
Steve S. |
*help
|
Mark M. |
happy to be useful!
|
Steve S. |
Have a good rest of the day!
|
Mark M. |
you too!
|
Steve S. | has left the room |
Jul 13 | 4:30 PM |
ndrocchietto_ivano | has entered the room |
Mark M. |
hello, Ivano!
|
Mark M. |
how can I help you today?
|
ndrocchietto_ivano |
Hello Mark,
|
ndrocchietto_ivano |
one min that I select which question I would like to ask you today
|
ndrocchietto_ivano |
View paste
|
Mark M. |
I am not sure what "hope the call of a method" means
|
Mark M. |
throw new RuntimeException("Stub!") is the implementation of every Android SDK method in the android.jar file that you are compiling against
|
ndrocchietto_ivano |
hope=open*
|
Mark M. |
at runtime, you are linking to the real android.jar that has the real method implementation
|
Mark M. |
what are you using for your IDE?
|
ndrocchietto_ivano |
AS
|
ndrocchietto_ivano |
2.1
|
Jul 13 | 4:35 PM |
ndrocchietto_ivano |
Ah maybe I see. is a kind of Context. the real method implementation will be made depending by my program
|
Mark M. |
if you have the source code downloaded in the SDK Manager for whatever API level you are using for your compileSdkVersion, you should be able to see the real implementation
|
Mark M. |
what you are getting right now is a decompiled implementation from your local android.jar
|
ndrocchietto_ivano |
ah OK
|
ndrocchietto_ivano |
you know really a lot of stuff. Thanks
|
Mark M. |
happy to help
|
ndrocchietto_ivano |
have a nice afternoon further!
|
Mark M. |
thanks! have a nice, um, whatever time period is relevant for you! (evening?)
|
ndrocchietto_ivano |
evening, I am afraid will skip the next two appointments, that in Amsterdam will be 1:30 am and are working day, but speak with you soon next Thursday indeed
|
Mark M. |
OK
|
Jul 13 | 4:55 PM |
Mark M. |
that is 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
|
Mark M. |
have a pleasant day!
|
Jul 13 | 5:00 PM |
ndrocchietto_ivano |
thanks
|
ndrocchietto_ivano | has left the room |
Mark M. | turned off guest access |