Notice
Recent Posts
Recent Comments
반응형
목록2017/01/07 (1)
오늘도 공부
RxView 예제 모음
출처 : http://www.cnblogs.com/zhaoyanjun/p/5535651.html Button 防抖处理 button = (Button) findViewById( R.id.bt ) ; RxView.clicks( button ) .throttleFirst( 2 , TimeUnit.SECONDS ) //两秒钟之内只取一个点击事件,防抖操作 .subscribe(new Action1() { @Override public void call(Void aVoid) { Toast.makeText(MainActivity.this, "点击了", Toast.LENGTH_SHORT).show(); } }) ; 按钮的长按时间监听 button = (Button) findViewById( R.id.bt ) ; //监听长按..
Android/RXAndroid
2017. 1. 7. 16:03
