package com.shipdream.lib.android.mvc;

/**
 * UiView represents android views. Call it Ui-View not to conflict with android.view.View and
 * simplify imports
 */
public interface UiView {
    /**
     * When a view is requested to update itself, it should read it's controller's model by
     * {@link Controller#getModel()} to bind the data to the view.
     *
     * <p>Do NOT change values of model from view but only from controllers.</p>
     */
    void update();
}

@@ -37,16 +37,23 @@
 c;%0A%0A/**%0A
+ * %3Cp%3E%0A
  * UiVie
@@ -84,86 +84,1382 @@
 ws. 
-Call it
+It has a single method %7B@link #update()%7D. Every %7B@link Controller%7D%0A * holds an instance of %7B@link
  Ui
--
 View
- not to conflict with android.view.View and%0A * simplify imports
+%7D which is implemented by the controller's corresponding%0A * concrete view. Whenever the %7B@link Controller%7D updates its state, usually it's model, the controller%0A * needs to call %7B@link UiView%7D.%7B@link #update()%7D.%0A * %3C/p%3E%0A *%0A * %3Cp%3E%0A * Usually this is enough for most Android views since as long as the concrete view implements%0A * %7B@link UiView%7D.%7B@link #update()%7D by binding the full controller model to the view, it guarantees the view's%0A * graphics is always in sync with the controller's model. However, if the model of a controller is%0A * large and sometimes only very limited part of the model changes, you may not always want to call%0A * %7B@link UiView%7D.%7B@link #update()%7D to rebind the entire model to the view if performance becomes a concern.%0A * %3C/p%3E%0A *%0A * %3Cp%3E%0A * In this case, define a custom view interface extending %7B@link UiView%7D with extra method to allow%0A * controllers updating specific part of the view. For example,%0A * %3C/p%3E%0A *%0A * %3Cpre%3E%0A * public interface PageView extends UiView %7B%0A *      /**%0A *      * Let the controller of the page view just update the title instead calling %7B@link UiView%7D.%7B@link #update()%7D%0A *      * to update the whole page.%0A *      * @param title The title of the page.%0A *      * /%0A *      void updateTitle(String title);%0A * %7D%0A * %3C/pre%3E
 %0A */
@@ -1669,16 +1669,177 @@
    * %3Cp%3E
+It will be automatically called when a view is ready to shown. Controllers should call this%0A     * method when they updated their model.%3C/p%3E%0A     *%0A     * %3Cp%3E%3Cb%3E
 Do NOT c
@@ -1898,16 +1898,20 @@
 llers.%3C/
+b%3E%3C/
 p%3E%0A     

Update document