Android: Custom XML Layout

main.xml usually takes a 'TextView'. But what if you wanted to use a 'custom' view instead?

to do this:

1. have a class that extends a View
2. define its constructor: public CONSTR(Context, AttributeSet, int)
3. in xml type in manually

< com.domain.package.CONSTR >

etc

< / com.domain.package.CONSTR >

DID

Again nearly forgot to report the progress last night. Spent the majority of time creating the project estimate for the Bear Bear project she wants to hire me to do.

The original estimate was actually approximately 200 hours, but at $45/hr, that amounted to over $9000. Knowing she wouldnt have it, I had to skim down some hours and take out any paddings.

All in all, part the $6500 from this project would go towards the iPad I would be developing with.

Secondly, I began redo-ing the danny-yu.com website. By using separate text files for containing the data, it's way easier to manage when new items need to be added.

Regex Look-Ahead/Back

This is a tricky topic, but here's the best explanation I found:

* (?=) - Positive look ahead assertion foo(?=bar) matches foo when followed by bar

* (?!) - Negative look ahead assertion foo(?!bar) matches foo when not followed by bar

* (?<=) - Positive look behind assertion (?<=foo)bar matches bar when preceded by foo * (? - Negative look behind assertion (? * (?>) - Once-only subpatterns (?>\d+)bar Performance enhancing when bar not present

* (?(x)) - Conditional subpatterns

* (?(3)foo|fu)bar - Matches foo if 3rd subpattern has matched, fu if not

* (?#) - Comment (?# Pattern does x y or z)


Example: I was looking for ABCabc123 in "apple/banana/ABCabc123"

regular expression: (?<=apple/banana/)\\w+(?=\")