목록2017/02 (13)
오늘도 공부
출처 : http://www.cnblogs.com/zhaoyanjun/p/5535651.htmlButton 防抖处理 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 ) ; //监听长按时..
Rx CheetSheet] 다중 터치 방지하기 - throttleFirst() http://kunny.github.io/tip/rx/2016/04/08/rx_cheatsheet_throttle_first/
http://eyeahs.github.io/rxjava/blog/2016/10/11/rxjava-wiki-backpressure/
출처 : http://beust.com/weblog/2015/06/01/easy-sqlite-on-android-with-rxjava/Easy SQLite on Android with RxJavaWhenever I consider using an ORM library on my Android projects, I always end up abandoning the idea and rolling my own layer instead for a few reasons:My database models have never reached the level of complexity that ORM’s help with.Every ounce of performance counts on Android and I can..
https://github.com/amitshekhariitbhu/RxJava2-Android-Sampleshttps://github.com/kaushikgopal/RxJava-Android-Samples
Do these modifications to your animation files:enter.xml: exit.xml: You'll have your second activity sliding in from right to the left.For a better understadnig on how to play around with the fromXDelta and toXDelta values for the animations, here is a very basic illustration on the values: This way you can easily understand why you add android:fromXDelta="0%" and android:toXDelta="-100%" for yo..
public class TileBitmapProvider implements BitmapProvider { private final TileProvider provider; private final Bitmap.Config bitmapConfig; private final int backgroundColor; private final BitmapPool bitmapPool; private final Rect frameRect = new Rect(); public TileBitmapProvider(final TileProvider provider, final BitmapPool bitmapPool, final Bitmap.Config bitmapConfig, final int backgroundColor)..
class ViewController: UIViewController { @IBOutlet weak var imgMain: UIImageView! @IBOutlet weak var btnPrev: UIButton! @IBOutlet weak var btnNext: UIButton! var idx = 0 var array_img = ["img1.jpeg" , "img2.jpeg" , "img3.jpeg"] override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. initView(_pos : 0); } func initView(_pos : Int)..
List list = new ArrayList(); Iterator iterator = list.iterator(); // while (iterator.hasNext()) { for (Iterator iterator = list.iterator(); iterator.hasNext();) { String string = iterator.next(); if (string.isEmpty()) { // Remove the current element from the iterator and the list. iterator.remove(); } }
출처 : http://blog.danlew.net/2016/06/13/multicasting-in-rxjava/ 멀티 캐스팅은 RxJava에서 중복 된 작업을 줄이기위한 핵심 방법입니다.당신이 이벤트를 멀티 캐스트하면 보내 같은 이벤트를 모두 다운 스트림 사업자 / 가입자. 이 기능은 네트워크 요청과 같이 값 비싼 작업을 수행 할 때 유용합니다. 각 가입자마다 똑같은 네트워크 요청을 반복적으로 실행하고 싶지는 않습니다. 결과를 멀티 캐스팅하기 만하면됩니다.멀티 캐스트에는 두 가지 방법이 있습니다.를 사용 ConnectableObservable을 통해 ( publish()또는replay()1 )사용 SubjectConnectableObservable또는 전에 수행 된 Subject작업은 한 번만 발생합니다..
아이폰 공부 시작합니다
출처 : http://kunny.github.io/community/2016/02/08/gdg_korea_android_weekly_02_1/MissingBackpressureExceptionMissingBackpressureException은 Observable에서 항목(item)을 보내는(emit) 속도보다 처리하는 속도가 느릴 때 발생합니다.RxJava 가이드 문서 내 Backpressure 항목에도 이와 관련된 항목이 기술되어 있는데, 문서에서 예로 든 사례(zip 연산자를 사용하는 경우)를 사용하지 않는 경우에도 상당히 높은 확률로 경험할 수 있습니다.RxAndroid를 사용하는 경우, 수신된 데이터를 UI에 표시하기 위해 observeOn(AndroidSchedulers.mainThread()..
you may use Observable for example: handling GUI eventsworking with short sequences (less than 1000 elements total) ========================================================= You may use Flowable for example: cold and non-timed sourcesgenerator like sourcesnetwork and database accessors
