neofoniemobile/Crouton — pull request #16 by ming13 (2012-08-28 20:31:01+00:00)
Title: Total refactoring

I decided to play around and clean up things. Unfortunately I haven’t enough time to do that before other pull requests so things became messed up quicker (sorry).

Commit messages will explain you main ideas. Of course, it’s not a one-minute decision to merge this request, but we always could have a discussion :-)

Actually I want to go deeper and remove javadocs and comments everywhere it’s possible. It’s very radical, I know, but if you look at the code now you could see that javadocs duplicate method signatures. Example:

```java
/**
* Set the isTileEnabled option for the {@link Crouton}.
*
* @param isTileEnabled true if you want the backgroundResourceId to be tiled,
* else false.
* @return the {@link Builder}.
*/
public Builder setTileEnabled(boolean isTileEnabled) {
this.isTileEnabled = isTileEnabled;

return this;
}
```

`Crouton` class “intro” is placed in project `README.md`. And so on.

Other thing to discuss is a `ViewHolder` class (BTW, why is it “holder”? It builds `View`, as I could see). I see no reasons to keep static fields and have two methods to set up Crouton `View` data. Maybe “static access method” would be enough. Example:

```java

class OneOperationClass
{
public static OperationResult operate(OperationArgument operationArgument) {
new OneOperationClass(operationArgument).operate();
}

private OneOperationClass(OperationArgument operationArgument) {
// set up things
}

private OperationResult operate() {
OperationResult operationResult = new OperationResult();

// do things

return operationResult;
}
}
```