private void initView() { title = new MyTitleBarHelper(this, getWindow().getDecorView().findViewById(android.R.id.content)); title.setMiddleText("常用电话"); title.setOnclickListener(this); keeperTitle = (TextView) findViewById(R.id.my_title_tel); wuyeKeeper = (TextView) findViewById(R.id.tv_wuye); keeperTel = (TextView) findViewById(R.id.tv_tel); cell = (RelativeLayout) findViewById(R.id.phone_line_one); cellTitle = (TextView) findViewById(R.id.my_title_tel); img_tel_one = (ImageView) findViewById(R.id.img_tel_one); ll_wuye_keeper = (LinearLayout) findViewById(R.id.ll_wuye_keeper); // commTel = (TextView) findViewById(R.id.tel1); iv_title_bar_left = (ImageView) findViewById(R.id.iv_title_bar_left); tv_tel_pager = (TextView) findViewById(R.id.tv_tel_pager); // 创建布局管理器 mRecyclerView = (RecyclerView) findViewById(R.id.my_recycler_view); LinearLayoutManager mLayoutManager = new LinearLayoutManager(this); mLayoutManager.setOrientation(LinearLayoutManager.VERTICAL); mRecyclerView.setLayoutManager(mLayoutManager); adapter = new MyTelRecycleAdapter(); adapter.setOnItemClickListener(this); mRecyclerView.setAdapter(adapter); }
private void initViews() { myTitleBarHelper = new MyTitleBarHelper(this, getWindow().getDecorView().findViewById(android.R.id.content)); myTitleBarHelper.setLeftImgVisible(false); myTitleBarHelper.resetState(); myTitleBarHelper.setMiddleText("查询历史"); myTitleBarHelper.setRightImgVisible(false); myTitleBarHelper.setLeftImag(R.mipmap.btn_back); refreshLayout_no_receive = (SwipeRefreshLayout) findViewById(R.id.swipe_no_receive_layout); refreshLayout_no_receive.setColorSchemeResources(R.color.repair_line_color); refreshLayout_received = (SwipeRefreshLayout) findViewById(R.id.swipe_received_layout); refreshLayout_received.setColorSchemeResources(R.color.repair_line_color); express_no_receive = (Button) findViewById(R.id.express_no_receive); btn_express_received = (Button) findViewById(R.id.btn_express_received); empty_list_view = (TextView) findViewById(R.id.empty_list_view); lv_no_receive = (ListView) findViewById(R.id.lv_no_receive); lv_no_receive.setEmptyView(empty_list_view); lv_received = (ListView) findViewById(R.id.lv_received); lv_received.setEmptyView(empty_list_view); footBar = LayoutInflater.from(this).inflate(R.layout.item_progressbar, null); lv_no_receive.addFooterView(footBar); lv_received.addFooterView(footBar); mFootBarView = new FootBarHelper(footBar, this); mFootBarView.hideFooter(); }