Some fixes

Added to the regex the possibility to have custom components declared
in the XML like (com.your.package.YourView).
If the type of View is "View" avoid unnecesary casting.
Bad comparation of strings using == (soz about that)