95秀-PullToRefreshListView 示例

时间:2022-09-24 11:34:57
95秀-PullToRefreshListView 示例 95秀-PullToRefreshListView 示例  
正在加载、暂无数据页面

public class RefreshGuideTool {

    private RelativeLayout rl_loading_guide;//整个View
    private LinearLayout ll_loading_guide_parent;//无数据时显示的布局
    private TextView tv_loading_guide;//什么都没有,下拉刷新
    private RelativeLayout mPgLoaing;//正在加载时显示的布局
    public RefreshGuideTool(View v) {
        rl_loading_guide = (RelativeLayout) v.findViewById(R.id.rl_loading_guide);
        ll_loading_guide_parent = (LinearLayout) v.findViewById(R.id.ll_show_img);
        tv_loading_guide = (TextView) v.findViewById(R.id.tv_loading_guide);
        mPgLoaing = (RelativeLayout) v.findViewById(R.id.pg_loading);
        ll_loading_guide_parent.setVisibility(View.GONE);
        mPgLoaing.setVisibility(View.VISIBLE);
    }
    public RefreshGuideTool(Activity activity) {
        rl_loading_guide = (RelativeLayout) activity.findViewById(R.id.rl_loading_guide);
        ll_loading_guide_parent = (LinearLayout) activity.findViewById(R.id.ll_show_img);
        tv_loading_guide = (TextView) activity.findViewById(R.id.tv_loading_guide);
        mPgLoaing = (RelativeLayout) activity.findViewById(R.id.pg_loading);
        ll_loading_guide_parent.setVisibility(View.GONE);
        mPgLoaing.setVisibility(View.VISIBLE);
    }
    public TextView getTvLoadingGuide() {
        return tv_loading_guide;
    }
    public void isShow(boolean isShow) {//设置是否显示“暂无数据”页面
        mPgLoaing.setVisibility(View.GONE);
        if (isShow) {
            rl_loading_guide.setVisibility(View.VISIBLE);
            ll_loading_guide_parent.setVisibility(View.VISIBLE);
        } else {
            rl_loading_guide.setVisibility(View.GONE);
            ll_loading_guide_parent.setVisibility(View.GONE);
        }
    }
    public void showProgressBar() {//显示“正在加载”页面
        rl_loading_guide.setVisibility(View.VISIBLE);
        ll_loading_guide_parent.setVisibility(View.GONE);
        mPgLoaing.setVisibility(View.VISIBLE);
    }

}  


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/rl_loading_guide"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >
    <LinearLayout
        android:id="@+id/ll_show_img"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_marginTop="60dp"
        android:orientation="vertical"
        android:visibility="gone" >
        <ImageView
            android:id="@+id/iv_loading_guide"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:src="@drawable/pic_refresh_load_defalut" />
        <TextView
            android:id="@+id/tv_loading_guide"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:clickable="true"
            android:gravity="center"
            android:paddingTop="4dp"
            android:src="@drawable/pic_refresh_load_defalut"
            android:text="暂无数据"
            android:textColor="@color/normal_line_color"
            android:textSize="15sp" />
    </LinearLayout>
    <RelativeLayout
        android:id="@+id/pg_loading"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true" >
        <ProgressBar
            android:id="@+id/pgs_default_loading"
            android:layout_width="@dimen/live_room_progress"
            android:layout_height="@dimen/live_room_progress"
            android:layout_centerInParent="true"
            android:indeterminate="true"
            android:indeterminateDrawable="@drawable/progressbar_video_drawable" />
        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:src="@drawable/ic_default_loding_bg" />
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/pgs_default_loading"
            android:layout_centerHorizontal="true"
            android:layout_gravity="center"
            android:layout_marginTop="30dp"
            android:gravity="center"
            android:src="@drawable/pic_refresh_load_defalut"
            android:text="正在加载..."
            android:textColor="@color/main_color"
            android:textSize="15sp" />
    </RelativeLayout>

</RelativeLayout>


抽出的Activity父类

public abstract class BaseListPullRefreshActivity<T> extends BaseActivity implements OnRefreshListener2<ListView>, INetworkStateCallback {

    protected PullToRefreshListView mPullToRefreshListView;//listview能用的属性PullToRefreshListView也都能用
    protected RefreshGuideTool mRefreshGuideTool; //用于加载数据提醒(正在加载,暂无数据)
    protected List<T> mDatas;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }
    protected void init() {// 此方法一定要主动在oncreat中调用(代码封装的不合理)
        NetReceiver.register(this);
        mDatas = new ArrayList<T>();
        initView();
        asyncDownLoadData();
    }
    @Override
    public void onDestroy() {
        NetReceiver.unRegister(this);
        super.onDestroy();
    }
    @Override
    public void onNetworkAvailable() {
        asyncDownLoadData();
    }
    @Override
    public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {
        asyncDownLoadData();
    }
    @Override
    public void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {
        asyncUpLoadData();
    }
    public PullToRefreshListView getPullToRefreshScorllView() {
        return mPullToRefreshListView;
    }
    public void setPullToRefreshScorllView(PullToRefreshListView mPullToRefreshListView) {
        this.mPullToRefreshListView = mPullToRefreshListView;
    }
    public List<T> getDatas() {
        return mDatas;
    }
    public void setDatas(List<T> mDatas) {
        this.mDatas = mDatas;
    }
    /**
     * 检查是否需要显示或隐藏刷新提示界面(没有数据时显示“暂无数据”)
     */
    protected void checkShowRefreshGuide(List<T> datas) {
        if (mRefreshGuideTool != null) {
            if (datas != null && datas.size() > 0) {
                mRefreshGuideTool.isShow(false);
            } else {
                mRefreshGuideTool.isShow(true);
            }
        }
    }
    /**
     * 异步加载数据
     */
    protected abstract void asyncDownLoadData();
    /**
     * 异步加载数据
     */
    protected abstract void asyncUpLoadData();
    /**
     * 初始化views
     */
    protected abstract void initView();

}


Activity

public class FamilyApplyManageActivity extends BaseListPullRefreshActivity<BaseUserBean> implements OnClickListener, ManageOnClick {

    private FamilyApplyManageAdapter mAdapter;
    private int pageIndex = 1;// 请求页码
    private ImageView iv_clear;
    private PopupWindow mPopupWindow;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        pageName = "申请管理";
        init();
    }
    @Override
    protected void initView() {
        setContentView(R.layout.activity_family_apply);
        TitleBar mTitleBar = new TitleBar(this);
        mTitleBar.setViewText("帮会详情", "申请信息");
        iv_clear = (ImageView) findViewById(R.id.iv_clear);
        iv_clear.setOnClickListener(this);
        mPullToRefreshListView = (PullToRefreshListView) findViewById(R.id.lv_apply);
        mPullToRefreshListView.setOnRefreshListener(this);
        mPullToRefreshListView.setMode(Mode.BOTH);
        mAdapter = new FamilyApplyManageAdapter(this, mDatas);
        mAdapter.setManageOnClickListener(this);
        mPullToRefreshListView.setAdapter(mAdapter);
        mRefreshGuideTool = new RefreshGuideTool(this);
        mPullToRefreshListView.setOnItemClickListener(new OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                try {
                    //跳转到申请者的档案页面
                    AppUtil.goToUser(FamilyApplyManageActivity.this,
                            mDatas.get(position - mPullToRefreshListView.getRefreshableView().getHeaderViewsCount()).anchorId);
                } catch (Exception e) {
                }
            }
        });
    }
    @Override
    public void onClick(View v) {
        switch (v.getId()) {
        case R.id.iv_clear:
            popClearView(iv_clear);
            break;
        case R.id.fl_clear_menu: //清理
            showConfirmDialog();
            break;
        default:
            break;
        }
    }
    /**
     * 弹出清空申请记录窗口
     */
    private void popClearView(View view) {
        View pop_layout = LayoutInflater.from(this).inflate(R.layout.item_famil_apply_pop, null);
        FrameLayout fl_clear_menu = (FrameLayout) pop_layout.findViewById(R.id.fl_clear_menu);
        fl_clear_menu.setOnClickListener(this);
        mPopupWindow = new PopupWindow(pop_layout, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
        mPopupWindow.setContentView(pop_layout);
        mPopupWindow.setFocusable(true);
        mPopupWindow.setOutsideTouchable(true);
        mPopupWindow.setBackgroundDrawable(new ColorDrawable(0x00000000));
        mPopupWindow.getContentView().setClickable(true);
        mPopupWindow.getContentView().setOnKeyListener(new OnKeyListener() {
            @Override
            public boolean onKey(View v, int keyCode, KeyEvent event) {
                if ((keyCode == KeyEvent.KEYCODE_BACK) && mPopupWindow != null && mPopupWindow.isShowing()) {
                    mPopupWindow.dismiss();
                    return true;
                }
                return false;
            }
        });
        mPopupWindow.showAsDropDown(view, 0, ApplicationUtil.dip2px(6));
    }
    /**
     * 弹出确认清空申请记录对话框
     */
    private void showConfirmDialog() {
        ConfirmDialog mConfirmDialog = new ConfirmDialog(FamilyApplyManageActivity.this) {
            @Override
            public void onCancleClick(View v) {
                dismiss();
                if (mPopupWindow != null && mPopupWindow.isShowing()) {
                    mPopupWindow.dismiss();
                }
            }
            @Override
            public void onConfirmClick(View v) {
                ansyClearApplyInfor();
                dismiss();
            }
        };
        mConfirmDialog.getContentTextView().setText("确认清空申请记录?");
        mConfirmDialog.show();
    }
    /**
     * 管理员点击“清空申请记录”后访问服务器
     */
    private void ansyClearApplyInfor() {
        RequestParams params = new RequestParams();
        params.put("uid", AppUser.getInstance().getUser().getuId());
        params.put("session_id", AppUser.getInstance().getUser().getuSessionId());
        params.put("family_id", AppUser.getInstance().getUser().getUserFamily().getId());//申请加入的帮会id
        AsyncXiuHttpHelper.post(Constants.GROUP_APPLY_CLEAN, params, new OnHttpListener<JSONObject>() {
            @Override
            public void onHttpListener(boolean httpSuccessed, JSONObject obj) {
                Log.i("-bqt", "=====点击清空申请记录后返回的数据:" + obj.toString());
                if (httpSuccessed) {
                    if (obj.optInt("result", -1) == 1) {
                        ApplicationUtil.showToast(FamilyApplyManageActivity.this, "清理成功");
                        mDatas.clear();
                        mAdapter.notifyDataSetChanged();
                        checkShowRefreshGuide(mDatas);
                    } else {
                        ApplicationUtil.showToast(FamilyApplyManageActivity.this, obj.optString("msg", "清理失败"));
                    }
                } else {
                    ApplicationUtil.showToast(FamilyApplyManageActivity.this, "网络错误");
                }
                if (mPopupWindow != null && mPopupWindow.isShowing()) {
                    mPopupWindow.dismiss();
                }
            }
        });
    }
    /**
     * 获取申请加入帮会信息
     * @param isDownload true:下拉刷新; false:加载更多
     */
    private void ansyApplyInfor(boolean isDownload) {
        if (isDownload) {
            pageIndex = 1;
        }
        RequestParams params = new RequestParams();
        params.put("uid", AppUser.getInstance().getUser().getuId());
        params.put("session_id", AppUser.getInstance().getUser().getuSessionId());
        params.put("family_id", AppUser.getInstance().getUser().getUserFamily().getId());
        params.put("page_index", pageIndex + "");//页码
        AsyncXiuHttpHelper.post(Constants.GROUP_APPLY_LIST, params, new OnHttpListener<JSONObject>() {
            @Override
            public void onHttpListener(boolean httpSuccessed, JSONObject obj) {
                Log.i("-bqt", "申请加入帮会列表返回数据:" + obj.toString());
                if (httpSuccessed) {
                    if (obj.optInt("result", -1) == 1) {
                        JSONArray jsonArray = obj.optJSONArray("family_join_list");
                        if (jsonArray != null && jsonArray.length() != 0) {
                            if (pageIndex == 1)
                                mDatas.clear();
                            for (int i = 0; i < jsonArray.length(); i++) {
                                BaseUserBean bean = new BaseUserBean(jsonArray.optJSONObject(i));
                                mDatas.add(bean);
                            }
                        }
                        pageIndex++;
                    } else {
                        ApplicationUtil.showToast(FamilyApplyManageActivity.this, "数据获取失败");
                    }
                } else {
                    ApplicationUtil.showToast(FamilyApplyManageActivity.this, "网络错误");
                }
                mPullToRefreshListView.onRefreshComplete();
                mAdapter.notifyDataSetChanged();
                checkShowRefreshGuide(mDatas);
            }
        });
    }
    /**
     * 管理员点击同意或拒绝后访问服务器。这是回调方法中调用的方法,其实可以直接将他设为回调方法的。
     * @param state 1 同意 ; 2 拒绝
     */
    private void ansyApplyManage(final int state, final BaseUserBean bean) {
        RequestParams params = new RequestParams();
        params.put("uid", AppUser.getInstance().getUser().getuId());
        params.put("session_id", AppUser.getInstance().getUser().getuSessionId());
        params.put("family_id", AppUser.getInstance().getUser().getUserFamily().getId());//申请加入[帮会]的id
        params.put("fm_uid", bean.anchorId + "");//申请加入帮会[用户]的id
        params.put("status", state + "");
        AsyncXiuHttpHelper.post(Constants.GROUP_APPLY_DEAL, params, new OnHttpListener<JSONObject>() {
            @Override
            public void onHttpListener(boolean httpSuccessed, JSONObject obj) {
                Log.i("-bqt", "=====点击同意或拒绝后返回的数据:" + obj.toString());
                if (httpSuccessed) {
                    if (obj.optInt("result", -1) == 1) {
                        if (mDatas != null)
                            mDatas.remove(bean);
                        if (mAdapter != null)
                            mAdapter.notifyDataSetChanged();
                        checkShowRefreshGuide(mDatas);
                        if (state == 1) {
                            ApplicationUtil.showToast(FamilyApplyManageActivity.this, "已同意");
                        } else {
                            ApplicationUtil.showToast(FamilyApplyManageActivity.this, "已拒绝");
                        }
                    } else {
                        ApplicationUtil.showToast(FamilyApplyManageActivity.this, obj.optString("msg", "操作失败"));
                    }
                } else {
                    ApplicationUtil.showToast(FamilyApplyManageActivity.this, R.string.unknow_err);
                }
            }
        });
    }
    @Override
    protected void asyncDownLoadData() {//下拉刷新
        ansyApplyInfor(true);
    }
    @Override
    protected void asyncUpLoadData() {//加载更多
        ansyApplyInfor(false);
    }
    @Override
    protected void checkShowRefreshGuide(List<BaseUserBean> datas) {
        super.checkShowRefreshGuide(datas);
        if (mDatas != null && mDatas.size() > 0) {
            iv_clear.setVisibility(View.VISIBLE);
        } else {
            iv_clear.setVisibility(View.INVISIBLE);
        }
    }
    @Override
    public void onManageClick(int type, BaseUserBean bean) {
        if (bean != null) {
            ansyApplyManage(type, bean);
        }
    }

}


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/white" >
    <include
        android:id="@+id/title_bar"
        android:layout_width="match_parent"
        android:layout_height="@dimen/title_bar_height"
        layout="@layout/view_top_bar2" />
    <com.handmark.pulltorefresh.library.PullToRefreshListView
        xmlns:ptr="http://schemas.android.com/apk/res-auto"
        android:id="@+id/lv_apply"
        android:layout_width="match_parent"
        android:layout_height="fill_parent"
        android:layout_below="@id/title_bar"
        android:descendantFocusability="afterDescendants"
        android:divider="@color/line_divider"
        android:dividerHeight="0.1dp"
        android:footerDividersEnabled="true"
        android:listSelector="@android:color/transparent"
        android:scrollbarThumbVertical="@drawable/scrollbar"
        ptr:ptrAnimationStyle="rotate"
        ptr:ptrDrawableEnd="@drawable/default_ptr_flip_bottom"
        ptr:ptrDrawableStart="@drawable/default_ptr_flip_bottom"
        ptr:ptrHeaderTextColor="@color/light_gray" />
    <ImageView
        android:id="@+id/iv_clear"
        android:layout_width="wrap_content"
        android:layout_height="48dp"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true"
        android:layout_centerVertical="true"
        android:src="@drawable/family_more_selector"
        android:visibility="gone" />
    <include
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@id/title_bar"
        layout="@layout/item_loading_error_layout" />

</RelativeLayout>  


adapter

public class FamilyApplyManageAdapter extends BaseAdapter implements OnClickListener{

    private Activity mActivity;
    private List<BaseUserBean> mList;
    private ViewHolder mViewHolder;
    private ManageOnClick manageOnClickListener;
    /**
     * 管理申请加入帮会的适配器
     */
    public FamilyApplyManageAdapter(Activity activity, List<BaseUserBean> list) {
        mActivity = activity;
        mList = list;
    }
    public void setManageOnClickListener(ManageOnClick manageOnClickListener) {
        this.manageOnClickListener = manageOnClickListener;
    }
    @Override
    public int getCount() {
        return mList == null ? 0 : mList.size();
    }
    @Override
    public Object getItem(int position) {
        return mList == null ? null : mList.get(position);
    }
    @Override
    public long getItemId(int position) {
        return position;
    }
    @Override
    public View getView(final int position, View convertView, ViewGroup parent) {
        if (convertView == null || convertView.getTag() == null) {
            convertView = View.inflate(mActivity, R.layout.item_family_apply_layout, null);
            mViewHolder = new ViewHolder();
            mViewHolder.iv_head = (ImageView) convertView.findViewById(R.id.iv_head);
            mViewHolder.tv_name = (TextView) convertView.findViewById(R.id.tv_name);
            mViewHolder.tv_agree = (TextView) convertView.findViewById(R.id.tv_agree);
            mViewHolder.tv_disagree = (TextView) convertView.findViewById(R.id.tv_disagree);
            convertView.setTag(mViewHolder);
        } else {
            mViewHolder = (ViewHolder) convertView.getTag();
        }
        BaseUserBean bean = mList.get(position);
        if (bean != null) {
            mViewHolder.tv_name.setText(bean.anr_nick_name);//昵称
            ImageHelper.loadImage(bean.anr_imageUrl, mViewHolder.iv_head, R.drawable.img_user_icon);
            mViewHolder.tv_agree.setTag(bean);
            mViewHolder.tv_agree.setOnClickListener(this);
            mViewHolder.tv_disagree.setTag(bean);
            mViewHolder.tv_disagree.setOnClickListener(this);
        }
        return convertView;
    }
    public static class ViewHolder {
        public ImageView iv_head;// 头像
        public TextView tv_name;// 名字
        public TextView tv_agree;//同意
        public TextView tv_disagree;// 拒绝
    }
    @Override
    public void onClick(View v) {
        switch (v.getId()) {
        case R.id.tv_disagree:
            BaseUserBean baseUserBean = (BaseUserBean) v.getTag();
            if (baseUserBean != null) {
                if(manageOnClickListener != null ) manageOnClickListener.onManageClick(2, baseUserBean);
            }
            break;
        case R.id.tv_agree:
            BaseUserBean bean = (BaseUserBean) v.getTag();
            if (bean != null) {
                if(manageOnClickListener != null ) manageOnClickListener.onManageClick(1, bean);
            }
            break;
        default:
            break;
        }
    }
    /****************************************
     * 
     * interface 
     * 
     ****************************************/
    public interface ManageOnClick{
        /**
         *  管理员点击同意或拒绝后回调
         */
        void onManageClick(int type , BaseUserBean bean);
    }
}

95秀-PullToRefreshListView 示例
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/normal_item_selector_no_line"
    android:minHeight="88dp" >
    <View
        android:layout_width="match_parent"
        android:layout_height="0.1px"
        android:layout_marginTop="88dp"
        android:background="@color/line_divider" />
    <ImageView
        android:id="@+id/iv_head"
        android:layout_width="62dp"
        android:layout_height="62dp"
        android:layout_marginTop="1dp"
        android:layout_centerVertical="true"
        android:layout_marginLeft="21dp"
        android:src="@drawable/img_user_icon" />
    <ImageView
        android:id="@+id/iv_head_cricle"
        android:layout_width="64dp"
        android:layout_height="64dp"
        android:layout_centerVertical="true"
        android:layout_marginLeft="20dp"
        android:background="@drawable/bg_family_head" />
    <TextView
        android:id="@+id/tv_agree"
        android:layout_width="44dp"
        android:layout_height="28dp"
        android:layout_alignParentRight="true"
        android:layout_centerVertical="true"
        android:layout_marginRight="20dp"
        android:background="@drawable/family_apply_ty_bg_selector"
        android:clickable="true"
        android:gravity="center"
        android:text="同意"
        android:textColor="@drawable/family_apply_ty_selector"
        android:textSize="12sp" />
    <TextView
        android:id="@+id/tv_disagree"
        android:layout_width="44dp"
        android:layout_height="28dp"
        android:layout_centerVertical="true"
        android:layout_marginLeft="24dp"
        android:layout_marginRight="12dp"
        android:layout_toLeftOf="@id/tv_agree"
        android:background="@drawable/family_apply_jj_bg_selector"
        android:clickable="true"
        android:gravity="center"
        android:text="拒绝"
        android:textColor="@drawable/family_apply_jj_selector"
        android:textSize="12sp" />
    <TextView
        android:id="@+id/tv_name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_marginLeft="12dp"
        android:layout_marginTop="26dp"
        android:layout_toLeftOf="@id/tv_disagree"
        android:layout_toRightOf="@id/iv_head"
        android:ellipsize="end"
        android:singleLine="true"
        android:text="包青天包青天,包青天"
        android:textColor="@color/charts_nick_name"
        android:textSize="13sp" />
    <TextView
        android:id="@+id/tv_describing"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/tv_name"
        android:layout_marginLeft="12dp"
        android:layout_marginTop="8dp"
        android:layout_toLeftOf="@id/tv_disagree"
        android:layout_toRightOf="@id/iv_head"
        android:ellipsize="end"
        android:singleLine="true"
        android:text="请求加入帮会"
        android:textColor="@color/tips_custom"
        android:textSize="11sp" />

</RelativeLayout>  


95秀-PullToRefreshListView 示例的更多相关文章

  1. 95秀-弹窗&plus;listview&plus;动画 示例

    Dialog布局 dialog.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLay ...

  2. 95秀-自定义对话框 dialog 合集

    普通的确认对话框 NormalDialog.java import android.app.Dialog; import android.content.Context; import android ...

  3. 95秀-ViewPager 使用实例

    Activity的样式     <style name="under_live_indicator" parent="android:Theme.NoTitleBa ...

  4. 95秀-异步http请求完整过程

    最终调用时的代码     private void ansyClearApplyInfor() {         RequestParams params = new RequestParams() ...

  5. 95秀-dialog 进度对话框 实用工具

    工具Util public class DialogUtil {     public static ProgressDialogView progressDialog;     /**      * ...

  6. 直播【95秀】JNI 基本实现 简洁

    2017-2-8 基本架构 1.使用SurfaceView在UI层面展示视频 2.通过JNI调用C代码控制视频的播放.停止 基本功能 1.从服务器获取正在直播的主播的列表信息 2.进入直播界面 3.可 ...

  7. HTTP调试 抓包 工具 Fiddle 简介 示例

    简介 1.常用抓包工具对比: Firebug虽然可以抓包,但是对于分析http请求的详细信息,不够强大.模拟http请求的功能也不够,且firebug常常是需要"无刷新修改",如果 ...

  8. MATLAB中的参数估计函数详解及调用示例【联合整理】

    前言 因为最近项目上的需要,才发现MATLAB的统计工具箱中的参数估计函数,觉得很简单很好用,现在把所有的参数估计函数整理一下,并在最后面附上调用示例. 参与人员 由于时间关系,这篇随笔是两个人一起整 ...

  9. selenium笔记&lpar;1&rpar;

    selenium笔记(1) 一.关闭页面:1.driver.close() 关闭当前页面2.driver.quit() 退出整个浏览器 二.定位元素:1.find_element_by_id: 根据i ...

随机推荐

  1. 一个将 footer 保持在底部的最好方法

    原文: Quick Tip: The Best Way To Make Sticky Footers 当你在布局网页时,有可能会遇到类似下面的这种情况 导致这一问题的原因是页面内容太少,无法将内容区域 ...

  2. Maven 配置 Selenium &plus; testNG &plus; reportNG 运行环境

    .markdown-preview:not([data-use-github-style]) { padding: 2em; font-size: 1.2em; color: rgb(56, 58, ...

  3. &lbrack;Xamarin&rsqb; 透過 intent-filter 來接管 http ,製作偽瀏覽器 (转帖)

    使用Android 的朋友一定對這畫面不陌生在開啟網址的時候,或是Youtube連結的時候,因為Android 發現,你手機安裝的App有哪些可以支援這些東西的瀏覽 所以,就可以使用甚麼東西來進行開啟 ...

  4. iOS 界面调试利器Reveal

    Reveal下载地址:http://revealapp.com/ ,目前要收费了,而且还不便宜,好东西都这样嘛~ 针对越狱设备和非越狱设备可以采取不同的方法,一种是在工程项目中加入Reveal.fra ...

  5. c&num; 数据库操作学习

    一. 如何处理数据库连接 1. 数据库连接可以分为“物理连接”和“逻辑连接”(默认使用连接池的情况下Pooling=true): 物理连接:创建数据库连接时,默认会有一定数量的物理连接(默认Min P ...

  6. &lbrack;Everyday Mathematics&rsqb;20150106

    (1). 设 $f\in C[0,T]$, $g$ 是 $T$-周期函数, 试证: $$\bex \vlm{n}\int_0^T f(x)g(nx)\rd x=\frac{1}{T}\int_0^T ...

  7. Linux Shell编程(12)——操作符

    赋值变量赋值初始化或改变一个变量的值=通用的变量赋值操作符,可以用于数值和字符串的赋值   1 var=27   2 category=minerals  # "="字符后面不能加 ...

  8. Python中的Warnings模块忽略告警信息

    写了个小工具,其中涉及到从远程数据库中查询并返回,数据库是utf8编码,但是我的工具用的是GB2312编码,因此在返回数据的时候,有部分数据出现了:Truncated incorrect DECIMA ...

  9. Django学习(二)---使用模板Templates

    学会使用渲染模板的方法来显示html内容. 一.Templates是什么: HTML文件 使用了Django模板语言(Django Tamplate Language DTL) 可以使用第三方模板 二 ...

  10. iOS发布证书申请

    一.  准备工作1.1.准备打包服务器 打包服务器搭建详见http://bbs.justep.com/thread-67724-1-1.html 或 http://www.cnblogs.com/Wo ...