@Event(value = R.id.right_view) private void chheckAllClick(View view) { // for(TorrentInfoEntity torrent:list){ // torrent.setCheck(!isCheckAll); // } // torrentInfoAdapter.notifyDataSetChanged(); // if(isCheckAll){ // isCheckAll=false; // rightBtn.setText(R.string.check_all); // setTopBarTitle(R.string.check_file); // }else{ // isCheckAll=true; // rightBtn.setText(R.string.cancel_check_all); // setTopBarTitle(String.format(getString(R.string.check_count),list.size()+"",list.size()+"")); // } } @Event(value = R.id.start_download)
@Event(value = R.id.downloading) private void downloadingClick(View view) { viewPager.setCurrentItem(0); } @Event(value = R.id.downloadfinish)
@Event(value = R.id.downloadfinish) private void downloadfinishClick(View view) { viewPager.setCurrentItem(1); } @Event(value = R.id.open_add_task_pop)
@Event(value = R.id.start_download) private void startDownloadClick(View view) { urlDownLoadPresenter.startTask(urlInput.getText().toString().trim()); }
@Event(value = R.id.open_setting) private void appSettingClick(View view) { intent =new Intent(DownloadManagementActivity.this,AppSettingActivity.class); startActivity(intent); } private void initBottomMenu(){
@Event(value = R.id.add_download) private void searchClick(View view) { bottomSheet.show(); }
@Event(value = R.id.open_add_task_pop) private void addTaskClick(View view) { bottomSheet.show(); } @Event(value = R.id.open_setting)
@Event(value = R.id.btn_search) private void magnetSearchClick(View view) { refreshLayout.startRefresh(); } @Event(value = R.id.bt_source)
@Event(value = R.id.down_manage) private void downManageClick(View view) { Intent intent =new Intent(MainActivity.this,DownloadManagementActivity.class); startActivity(intent); }
@Event(value = R.id.down_count_plus) private void downCountPlusClick(View view) { int count=Integer.valueOf(downCountText.getText().toString()); if(count<Const.MAX_DOWN_COUNT){ count++; downCountText.setText(count+""); appSettingPresenter.setDownCount(count+""); } } @Event(value = R.id.down_count_cut)
@Event(value = R.id.down_count_cut) private void downCountCutClick(View view) { int count=Integer.valueOf(downCountText.getText().toString()); if(count>Const.MIN_DOWN_COUNT){ count--; downCountText.setText(count+""); appSettingPresenter.setDownCount(count+""); } }
@Event(value = R.id.close_view) private void closeView(View view) { finish(); } }
@Event(value = R.id.close_view) private void closeView(View view) { if(isClose) finish(); }
@Event(value = R.id.play_pause) private void playPauseClick(View view) { playPause(); controlViewShow(); } @Event(value = R.id.more_view)
@Event(value = R.id.start_download) private void startDownClick(View view) { checkList(); torrentInfoPresenter.startTask(checkList); //finish(); } private void checkList(){
@Event(value = R.id.more_view) private void moreViewClick(View view) { if (null == aPlayer) { return; } if(mPopupWindow==null){ mPopupWindow = new PlayerPopupWindow(this,mRootView,aPlayer); } mPopupWindow.showAtLocation(mRootView, Gravity.RIGHT, 0, 0); }
@Event(R.id.navigationBar_title_tv) private void titleClick(View view) { if (!view.isSelected()) { barChartWebView.refreshEchartsWithOption(getLineChartOptions()); } else { barChartWebView.refreshEchartsWithOption(getLineAndBarChartOption()); } view.setSelected(!view.isSelected()); }
@Event(value = R.id.set_local_path) private void setLocalPathClick(View view) { FilePicker.from(AppSettingActivity.this) .chooseForFloder() .isSingle() .setMaxCount(0) //.setFileTypes("TORRENT") .requestCode(REQUEST_CODE_CHOOSE) .start(); } @Event(value = R.id.down_count_plus)
@Event(value = R.id.bt_source) private void btSourceClick(View view) { if(sourceDialog==null) { sourceDialog=new LovelyChoiceDialog(this) .setTopColorRes(R.color.colorMain) .setIcon(R.drawable.ic_source) .setItems(btSources, new LovelyChoiceDialog.OnItemSelectedListener<String>() { @Override public void onItemSelected(int position, String item) { rule = GsonUtil.getMagnetRule(rules).get(item); searchSourceText.setText(String.format(getString(R.string.search_source), item)); refreshLayout.startRefresh(); } }); } sourceDialog.show(); }
@Event(value = R.id.bt_sort) private void btSortClick(View view) { if(sortDialog==null) { sortDialog= new LovelyChoiceDialog(this) .setTopColorRes(R.color.colorMain) .setIcon(R.drawable.ic_sort) .setItems(Arrays.asList(getString(R.string.date),getString(R.string.hot)), new LovelyChoiceDialog.OnItemSelectedListener<String>() { @Override public void onItemSelected(int position, String item) { if(item.equals(getString(R.string.date))){ searchSort=Const.SEARCH_SORT_DATE; }else{ searchSort=Const.SEARCH_SORT_HOT; } searchSortText.setText(String.format(getString(R.string.search_sort), item)); refreshLayout.startRefresh(); } }); } sortDialog.show(); }