org.xutils.view.annotation.Event Java Examples

The following examples show how to use org.xutils.view.annotation.Event. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MagnetSearchActivity.java    From AndroidMagnetSearch with Apache License 2.0 6 votes vote down vote up
@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();
}
 
Example #2
Source File: MagnetSearchActivity.java    From AndroidMagnetSearch with Apache License 2.0 6 votes vote down vote up
@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();
}
 
Example #3
Source File: TorrentInfoActivity.java    From AndroidDownload with Apache License 2.0 6 votes vote down vote up
@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()+""));
//        }
    }
 
Example #4
Source File: MagnetSearchActivity.java    From AndroidDownload with Apache License 2.0 6 votes vote down vote up
@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();
}
 
Example #5
Source File: MagnetSearchActivity.java    From AndroidDownload with Apache License 2.0 6 votes vote down vote up
@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();
}
 
Example #6
Source File: PlayerActivity.java    From AndroidDownload with Apache License 2.0 5 votes vote down vote up
@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);
}
 
Example #7
Source File: AppSettingActivity.java    From AndroidDownload with Apache License 2.0 5 votes vote down vote up
@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+"");
    }
}
 
Example #8
Source File: AppSettingActivity.java    From AndroidDownload with Apache License 2.0 5 votes vote down vote up
@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+"");
    }
}
 
Example #9
Source File: AppSettingActivity.java    From AndroidDownload with Apache License 2.0 5 votes vote down vote up
@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();
}
 
Example #10
Source File: MainActivity.java    From Study_Android_Demo with Apache License 2.0 4 votes vote down vote up
@Event(R.id.btn)
private void changeText(View view){
    tv.setText("realmo change");
}
 
Example #11
Source File: MagnetSearchActivity.java    From AndroidMagnetSearch with Apache License 2.0 4 votes vote down vote up
@Event(value = R.id.btn_search)
private void magnetSearchClick(View view) {
    refreshLayout.startRefresh();
}
 
Example #12
Source File: BaseActivity.java    From AndroidDownload with Apache License 2.0 4 votes vote down vote up
@Event(value = R.id.close_view)
private void closeView(View view) {
    finish();
}
 
Example #13
Source File: PlayerActivity.java    From AndroidDownload with Apache License 2.0 4 votes vote down vote up
@Event(value = R.id.play_pause)
private void playPauseClick(View view) {
    playPause();
    controlViewShow();
}
 
Example #14
Source File: TorrentInfoActivity.java    From AndroidDownload with Apache License 2.0 4 votes vote down vote up
@Event(value = R.id.start_download)
private void startDownClick(View view) {
    checkList();
    torrentInfoPresenter.startTask(checkList);
    //finish();
}
 
Example #15
Source File: MainActivity.java    From AndroidDownload with Apache License 2.0 4 votes vote down vote up
@Event(value = R.id.down_manage)
private void downManageClick(View view) {
    Intent intent =new Intent(MainActivity.this,DownloadManagementActivity.class);
    startActivity(intent);
}
 
Example #16
Source File: MainActivity.java    From AndroidDownload with Apache License 2.0 4 votes vote down vote up
@Event(value = R.id.add_download)
private void searchClick(View view) {
    bottomSheet.show();
}
 
Example #17
Source File: UrlDownLoadActivity.java    From AndroidDownload with Apache License 2.0 4 votes vote down vote up
@Event(value = R.id.start_download)
private void startDownloadClick(View view) {
    urlDownLoadPresenter.startTask(urlInput.getText().toString().trim());
}
 
Example #18
Source File: MagnetSearchActivity.java    From AndroidDownload with Apache License 2.0 4 votes vote down vote up
@Event(value = R.id.btn_search)
private void magnetSearchClick(View view) {
    refreshLayout.startRefresh();
}
 
Example #19
Source File: DownloadManagementActivity.java    From AndroidDownload with Apache License 2.0 4 votes vote down vote up
@Event(value = R.id.open_magnet_search)
private void magnetSearchClick(View view) {
    intent =new Intent(DownloadManagementActivity.this,MagnetSearchActivity.class);
    startActivity(intent);
}
 
Example #20
Source File: DownloadManagementActivity.java    From AndroidDownload with Apache License 2.0 4 votes vote down vote up
@Event(value = R.id.open_setting)
private void appSettingClick(View view) {
    intent =new Intent(DownloadManagementActivity.this,AppSettingActivity.class);
    startActivity(intent);
}
 
Example #21
Source File: DownloadManagementActivity.java    From AndroidDownload with Apache License 2.0 4 votes vote down vote up
@Event(value = R.id.open_add_task_pop)
private void addTaskClick(View view) {
    bottomSheet.show();
}
 
Example #22
Source File: DownloadManagementActivity.java    From AndroidDownload with Apache License 2.0 4 votes vote down vote up
@Event(value = R.id.downloadfinish)
private void downloadfinishClick(View view) {
    viewPager.setCurrentItem(1);
}
 
Example #23
Source File: DownloadManagementActivity.java    From AndroidDownload with Apache License 2.0 4 votes vote down vote up
@Event(value = R.id.downloading)
private void downloadingClick(View view) {
    viewPager.setCurrentItem(0);
}
 
Example #24
Source File: BaseActivity.java    From AndroidMagnetSearch with Apache License 2.0 4 votes vote down vote up
@Event(value = R.id.close_view)
private void closeView(View view) {
    if(isClose)
        finish();
}