// Path: library/src/main/java/com/dreamliner/rvhelper/interfaces/ItemClickListener.java
// public interface ItemClickListener {
//     public void onItemClick(View view, int position);
// }


import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.view.View;
import android.widget.Toast;
import com.dreamliner.rvhelper.interfaces.ItemClickListener;
import java.lang.ref.WeakReference;
import androidx.annotation.StringRes;
import androidx.appcompat.app.AppCompatActivity;
import butterknife.ButterKnife;
        // 防止遮盖虚拟按键
        runOnUiThread(new Runnable() {

            @Override
            public void run() {
                if (!TextUtils.isEmpty(msg)) {
                    if (mToast == null) {
                        mToast = Toast.makeText(getApplicationContext(), "" + msg, Toast.LENGTH_SHORT);
                    }
                    mToast.setText(msg);
                    mToast.show();
                }
            }
        });
    }

    public void showToast(@StringRes final int resId) {
        runOnUiThread(new Runnable() {

            @Override
            public void run() {
                if (mToast == null) {
                    mToast = Toast.makeText(getApplicationContext(), resId, Toast.LENGTH_SHORT);
                }
                mToast.setText(resId);
                mToast.show();
            }
        });
    }

// Path: library/src/main/java/com/dreamliner/rvhelper/interfaces/ItemClickListener.java
// public interface ItemClickListener {
//     public void onItemClick(View view, int position);
// }


// Path: demo/src/main/java/com/dreamliner/lib/rvhelper/sample/ui/base/BaseActivity.java
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.view.View;
import android.widget.Toast;
import com.dreamliner.rvhelper.interfaces.ItemClickListener;
import java.lang.ref.WeakReference;
import androidx.annotation.StringRes;
import androidx.appcompat.app.AppCompatActivity;
import butterknife.ButterKnife;

        // 防止遮盖虚拟按键
        runOnUiThread(new Runnable() {

            @Override
            public void run() {
                if (!TextUtils.isEmpty(msg)) {
                    if (mToast == null) {
                        mToast = Toast.makeText(getApplicationContext(), "" + msg, Toast.LENGTH_SHORT);
                    }
                    mToast.setText(msg);
                    mToast.show();
                }
            }
        });
    }

    public void showToast(@StringRes final int resId) {
        runOnUiThread(new Runnable() {

            @Override
            public void run() {
                if (mToast == null) {
                    mToast = Toast.makeText(getApplicationContext(), resId, Toast.LENGTH_SHORT);
                }
                mToast.setText(resId);
                mToast.show();
            }
        });
    }

    protected static class ItemClickIml implements ItemClickListener {