Java Code Examples for org.xutils.view.annotation.Event

The following examples show how to use org.xutils.view.annotation.Event. These examples are extracted from open source projects. 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 Project: AndroidMagnetSearch   Source File: MagnetSearchActivity.java    License: 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 Project: AndroidMagnetSearch   Source File: MagnetSearchActivity.java    License: 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 Project: AndroidDownload   Source File: MagnetSearchActivity.java    License: 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 4
Source Project: AndroidDownload   Source File: MagnetSearchActivity.java    License: 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 5
Source Project: AndroidDownload   Source File: TorrentInfoActivity.java    License: 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 6
Source Project: AndroidDownload   Source File: AppSettingActivity.java    License: 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 7
Source Project: AndroidDownload   Source File: AppSettingActivity.java    License: 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 8
Source Project: AndroidDownload   Source File: AppSettingActivity.java    License: 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 9
Source Project: AndroidDownload   Source File: PlayerActivity.java    License: 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 10
Source Project: AndroidMagnetSearch   Source File: MagnetSearchActivity.java    License: Apache License 2.0 4 votes vote down vote up
@Event(value = R.id.btn_search)
private void magnetSearchClick(View view) {
    refreshLayout.startRefresh();
}
 
Example 11
Source Project: AndroidMagnetSearch   Source File: BaseActivity.java    License: Apache License 2.0 4 votes vote down vote up
@Event(value = R.id.close_view)
private void closeView(View view) {
    if(isClose)
        finish();
}
 
Example 12
@Event(value = R.id.downloading)
private void downloadingClick(View view) {
    viewPager.setCurrentItem(0);
}
 
Example 13
@Event(value = R.id.downloadfinish)
private void downloadfinishClick(View view) {
    viewPager.setCurrentItem(1);
}
 
Example 14
@Event(value = R.id.open_add_task_pop)
private void addTaskClick(View view) {
    bottomSheet.show();
}
 
Example 15
@Event(value = R.id.open_setting)
private void appSettingClick(View view) {
    intent =new Intent(DownloadManagementActivity.this,AppSettingActivity.class);
    startActivity(intent);
}
 
Example 16
@Event(value = R.id.open_magnet_search)
private void magnetSearchClick(View view) {
    intent =new Intent(DownloadManagementActivity.this,MagnetSearchActivity.class);
    startActivity(intent);
}
 
Example 17
Source Project: AndroidDownload   Source File: MagnetSearchActivity.java    License: Apache License 2.0 4 votes vote down vote up
@Event(value = R.id.btn_search)
private void magnetSearchClick(View view) {
    refreshLayout.startRefresh();
}
 
Example 18
Source Project: AndroidDownload   Source File: UrlDownLoadActivity.java    License: 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 19
Source Project: AndroidDownload   Source File: MainActivity.java    License: Apache License 2.0 4 votes vote down vote up
@Event(value = R.id.add_download)
private void searchClick(View view) {
    bottomSheet.show();
}
 
Example 20
Source Project: AndroidDownload   Source File: MainActivity.java    License: 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 21
Source Project: AndroidDownload   Source File: TorrentInfoActivity.java    License: 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 22
Source Project: AndroidDownload   Source File: PlayerActivity.java    License: Apache License 2.0 4 votes vote down vote up
@Event(value = R.id.play_pause)
private void playPauseClick(View view) {
    playPause();
    controlViewShow();
}
 
Example 23
Source Project: AndroidDownload   Source File: BaseActivity.java    License: Apache License 2.0 4 votes vote down vote up
@Event(value = R.id.close_view)
private void closeView(View view) {
    finish();
}
 
Example 24
Source Project: Study_Android_Demo   Source File: MainActivity.java    License: Apache License 2.0 4 votes vote down vote up
@Event(R.id.btn)
private void changeText(View view){
    tv.setText("realmo change");
}