/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package me.jessyan.art.mvp;

import android.app.Activity;
import android.app.Dialog;
import android.content.Intent;
import android.os.Handler;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.view.View;

/**
 * ================================================
 * 这里除了定义 {@link #handleMessage} 还可以定义一些比较常用,每个 {@link View} 都会用到的方法
 * 因为 {@link View} 的实现类可能会是 {@link Activity}, {@link Fragment} 或者 {@link Dialog} 以及一些自定义 {@link View}
 * 所以不能定义一些某个类特有的方法比如 {@link Activity#startActivity(Intent)} 就是 {@link Activity} 特有的
 * 其他 {@link View} 实现类并不一定具备这个功能
 * <p>
 * Created by JessYan on 25/02/2017 19:18
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
public interface IView {

    /**
     * 显示加载
     */
    void showLoading();

    /**
     * 隐藏加载
     */
    void hideLoading();

    /**
     * 显示信息
     *
     * @param message 消息内容, 不能为 {@code null}
     */
    void showMessage(@NonNull String message);

    /**
     * 处理消息, 这里面和 {@link Handler} 的原理一样, 通过 {@code switch(what)}, 做不同的操作
     *
     * @param message {@link Message} 对象, 不能为 {@code null}
     */
    void handleMessage(@NonNull Message message);

}

@@ -1084,16 +1084,18 @@
 %E6%9F%90%E4%B8%AA%E7%B1%BB%E7%89%B9%E6%9C%89%E7%9A%84%E6%96%B9%E6%B3%95
+, 
 %E6%AF%94%E5%A6%82 %7B@lin
@@ -1192,16 +1192,141 @@
 %0A * %3Cp%3E%0A
+ * %E4%B8%BA%E4%BA%86%E6%BB%A1%E8%B6%B3%E9%83%A8%E5%88%86%E4%BA%BA%E7%9A%84%E8%AF%89%E6%B1%82%E4%BB%A5%E5%8F%8A%E5%90%91%E4%B8%8B%E5%85%BC%E5%AE%B9, %7B@link IView%7D %E4%B8%AD%E7%9A%84%E9%83%A8%E5%88%86%E6%96%B9%E6%B3%95%E4%BD%BF%E7%94%A8 JAVA 1.8 %E7%9A%84%E9%BB%98%E8%AE%A4%E6%96%B9%E6%B3%95%E5%AE%9E%E7%8E%B0, %E8%BF%99%E6%A0%B7%E5%AE%9E%E7%8E%B0%E7%B1%BB%E5%8F%AF%E4%BB%A5%E6%8C%89%E5%AE%9E%E9%99%85%E9%9C%80%E6%B1%82%E9%80%89%E6%8B%A9%E6%98%AF%E5%90%A6%E5%AE%9E%E7%8E%B0%E6%9F%90%E4%BA%9B%E6%96%B9%E6%B3%95%0A * %E4%B8%8D%E5%AE%9E%E7%8E%B0%E5%88%99%E4%BD%BF%E7%94%A8%E9%BB%98%E8%AE%A4%E6%96%B9%E6%B3%95%E4%B8%AD%E7%9A%84%E9%80%BB%E8%BE%91, %E4%B8%8D%E6%B8%85%E6%A5%9A%E9%BB%98%E8%AE%A4%E6%96%B9%E6%B3%95%E7%9A%84%E8%AF%B7%E8%87%AA%E8%A1%8C%E5%AD%A6%E4%B9%A0%0A * %3Cp%3E%0A
  * Creat
@@ -1586,32 +1586,40 @@
 %E7%A4%BA%E5%8A%A0%E8%BD%BD%0A     */%0A    
+default 
 void showLoading
@@ -1612,33 +1612,41 @@
 id showLoading()
-;
+ %7B%0A%0A    %7D
 %0A%0A    /**%0A     *
@@ -1659,24 +1659,32 @@
      */%0A    
+default 
 void hideLoa
@@ -1689,17 +1689,25 @@
 oading()
-;
+ %7B%0A%0A    %7D
 %0A%0A    /*

Use default method on IView