// Path: ListViewHelper_Library/src/com/shizhefei/view/listviewhelper/IDataAdapter.java
// public interface IDataAdapter<DATA> extends ListAdapter {
// 
//     public abstract void setData(DATA data, boolean isRefresh);
// 
//     public abstract DATA getData();
// 
//     public void notifyDataSetChanged();
// 
// }
// 
// Path: app/src/main/java/com/kejiwen/architecture/activity/CommonWebViewActivity.java
// public class CommonWebViewActivity extends BaseActivity {
//     private final static String TAG = "CommonWebViewActivity";
// 
//     private WebView mWebView;
//     private String mUrl;
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         setContentView(R.layout.common_webview);
//         super.onCreate(savedInstanceState);
//         mTitleBar.setBackButton(R.mipmap.titlebar_back_arrow, this);
// 
//         mUrl = getIntent().getStringExtra("url");
//         mWebView = (WebView) findViewById(R.id.webview);
//         if (!TextUtils.isEmpty(mUrl)) mWebView.loadUrl(mUrl);
//         mWebView.getSettings().setJavaScriptEnabled(true);// 设置使用够执行JS脚本
//         mWebView.setWebViewClient(new WebViewClient() {
//             @Override
//             public boolean shouldOverrideUrlLoading(WebView view, String url) {
//                 mTitleBar.setTitle(view.getTitle());
//                 view.loadUrl(url);// 使用当前WebView处理跳转
//                 return true;// true表示此事件在此处被处理，不需要再广播
//             }
// 
//             @Override
//             public void onPageFinished(WebView view, String url) {
//                 super.onPageFinished(view, url);
//                 mTitleBar.setTitle(view.getTitle());
//             }
// 
//             @Override
//             public void onPageStarted(WebView view, String url, Bitmap favicon) {
//                 super.onPageStarted(view, url, favicon);
//                 mTitleBar.setTitle(view.getTitle());
//             }
// 
//             @Override
//             // 转向错误时的处理
//             public void onReceivedError(WebView view, int errorCode,
//                                         String description, String failingUrl) {
//             }
//         });
//     }
// 
//     // 默认点回退键，会退出Activity，需监听按键操作，使回退在WebView内发生
//     @Override
//     public boolean onKeyDown(int keyCode, KeyEvent event) {
//         if ((keyCode == KeyEvent.KEYCODE_BACK) && mWebView.canGoBack()) {
//             mWebView.goBack();
//             return true;
//         }
//         return super.onKeyDown(keyCode, event);
//     }
// 
//     @Override
//     public void onBackStack() {
//         if (mWebView.canGoBack()) {
//             mWebView.goBack();
//         } else {
//             finish();
//         }
// 
//     }
// 
//     @Override
//     protected int getTitleBarRes() {
//         return R.id.titlebar;
//     }
// }
// 
// Path: app/src/main/java/com/kejiwen/architecture/model/ClassroomItem.java
// public class ClassroomItem {
//     private String title;
//     private String date;
//     private String url;
// 
//     public String getTitle() {
//         return title;
//     }
// 
//     public void setTitle(String title) {
//         this.title = title;
//     }
// 
//     public String getDate() {
//         return date;
//     }
// 
//     public void setDate(String date) {
//         this.date = date;
//     }
// 
//     public String getUrl() {
//         return url;
//     }
// 
//     public void setUrl(String url) {
//         this.url = url;
//     }
// }


import java.util.ArrayList;
import java.util.List;
import com.shizhefei.view.listviewhelper.IDataAdapter;
import com.kejiwen.architecture.R;
import com.kejiwen.architecture.activity.CommonWebViewActivity;
import com.kejiwen.architecture.model.ClassroomItem;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

/*
Copyright 2015 shizhefei（LuckyJayce）

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 com.kejiwen.architecture.adapter;




public class ClassroomAdapter extends BaseAdapter implements IDataAdapter<List<ClassroomItem>> {
    private List<ClassroomItem> mClassroomItems = new ArrayList<ClassroomItem>();
    private LayoutInflater mInflater;
    private Context mContext;

    public ClassroomAdapter(Context context) {
        super();
        mContext = context;
        mInflater = LayoutInflater.from(context);
    }

    @Override
    public int getCount() {
        return mClassroomItems.size();
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        final ClassroomItem item = mClassroomItems.get(position);
        ItemHolder holder = null;
        if (convertView == null) {
            convertView = mInflater.inflate(R.layout.classroom_listview_item, parent, false);
            holder = new ItemHolder();
            holder.dateTv = (TextView) convertView.findViewById(R.id.classroom_list_item_date);

// Path: ListViewHelper_Library/src/com/shizhefei/view/listviewhelper/IDataAdapter.java
// public interface IDataAdapter<DATA> extends ListAdapter {
// 
//     public abstract void setData(DATA data, boolean isRefresh);
// 
//     public abstract DATA getData();
// 
//     public void notifyDataSetChanged();
// 
// }
// 
// Path: app/src/main/java/com/kejiwen/architecture/activity/CommonWebViewActivity.java
// public class CommonWebViewActivity extends BaseActivity {
//     private final static String TAG = "CommonWebViewActivity";
// 
//     private WebView mWebView;
//     private String mUrl;
// 
//     @Override
//     protected void onCreate(Bundle savedInstanceState) {
//         setContentView(R.layout.common_webview);
//         super.onCreate(savedInstanceState);
//         mTitleBar.setBackButton(R.mipmap.titlebar_back_arrow, this);
// 
//         mUrl = getIntent().getStringExtra("url");
//         mWebView = (WebView) findViewById(R.id.webview);
//         if (!TextUtils.isEmpty(mUrl)) mWebView.loadUrl(mUrl);
//         mWebView.getSettings().setJavaScriptEnabled(true);// 设置使用够执行JS脚本
//         mWebView.setWebViewClient(new WebViewClient() {
//             @Override
//             public boolean shouldOverrideUrlLoading(WebView view, String url) {
//                 mTitleBar.setTitle(view.getTitle());
//                 view.loadUrl(url);// 使用当前WebView处理跳转
//                 return true;// true表示此事件在此处被处理，不需要再广播
//             }
// 
//             @Override
//             public void onPageFinished(WebView view, String url) {
//                 super.onPageFinished(view, url);
//                 mTitleBar.setTitle(view.getTitle());
//             }
// 
//             @Override
//             public void onPageStarted(WebView view, String url, Bitmap favicon) {
//                 super.onPageStarted(view, url, favicon);
//                 mTitleBar.setTitle(view.getTitle());
//             }
// 
//             @Override
//             // 转向错误时的处理
//             public void onReceivedError(WebView view, int errorCode,
//                                         String description, String failingUrl) {
//             }
//         });
//     }
// 
//     // 默认点回退键，会退出Activity，需监听按键操作，使回退在WebView内发生
//     @Override
//     public boolean onKeyDown(int keyCode, KeyEvent event) {
//         if ((keyCode == KeyEvent.KEYCODE_BACK) && mWebView.canGoBack()) {
//             mWebView.goBack();
//             return true;
//         }
//         return super.onKeyDown(keyCode, event);
//     }
// 
//     @Override
//     public void onBackStack() {
//         if (mWebView.canGoBack()) {
//             mWebView.goBack();
//         } else {
//             finish();
//         }
// 
//     }
// 
//     @Override
//     protected int getTitleBarRes() {
//         return R.id.titlebar;
//     }
// }
// 
// Path: app/src/main/java/com/kejiwen/architecture/model/ClassroomItem.java
// public class ClassroomItem {
//     private String title;
//     private String date;
//     private String url;
// 
//     public String getTitle() {
//         return title;
//     }
// 
//     public void setTitle(String title) {
//         this.title = title;
//     }
// 
//     public String getDate() {
//         return date;
//     }
// 
//     public void setDate(String date) {
//         this.date = date;
//     }
// 
//     public String getUrl() {
//         return url;
//     }
// 
//     public void setUrl(String url) {
//         this.url = url;
//     }
// }


// Path: app/src/main/java/com/kejiwen/architecture/adapter/ClassroomAdapter.java
import java.util.ArrayList;
import java.util.List;
import com.shizhefei.view.listviewhelper.IDataAdapter;
import com.kejiwen.architecture.R;
import com.kejiwen.architecture.activity.CommonWebViewActivity;
import com.kejiwen.architecture.model.ClassroomItem;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

/*
Copyright 2015 shizhefei（LuckyJayce）

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 com.kejiwen.architecture.adapter;




public class ClassroomAdapter extends BaseAdapter implements IDataAdapter<List<ClassroomItem>> {
    private List<ClassroomItem> mClassroomItems = new ArrayList<ClassroomItem>();
    private LayoutInflater mInflater;
    private Context mContext;

    public ClassroomAdapter(Context context) {
        super();
        mContext = context;
        mInflater = LayoutInflater.from(context);
    }

    @Override
    public int getCount() {
        return mClassroomItems.size();
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        final ClassroomItem item = mClassroomItems.get(position);
        ItemHolder holder = null;
        if (convertView == null) {
            convertView = mInflater.inflate(R.layout.classroom_listview_item, parent, false);
            holder = new ItemHolder();
            holder.dateTv = (TextView) convertView.findViewById(R.id.classroom_list_item_date);

            holder.titleTv = (TextView) convertView.findViewById(R.id.classroom_list_item_title);
