(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| @keyframes fade { | |
| from { opacity: 1.0; } | |
| 50% { opacity: 0.5; } | |
| to { opacity: 1.0; } | |
| } | |
| @-webkit-keyframes fade { | |
| from { opacity: 1.0; } | |
| 50% { opacity: 0.5; } | |
| to { opacity: 1.0; } |
| public class PagerActivity extends AppCompatActivity { | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.activity_paper); | |
| ViewPager pager = (ViewPager) findViewById(R.id.pager); | |
| pager.setAdapter(new PageAdapter(getSupportFragmentManager())); | |
| } |
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <color name="red_50">#fde0dc</color> | |
| <color name="red_100">#f9bdbb</color> | |
| <color name="red_200">#f69988</color> | |
| <color name="red_300">#f36c60</color> | |
| <color name="red_400">#e84e40</color> | |
| <color name="red_500">#e51c23</color> | |
| <color name="red_600">#dd191d</color> | |
| <color name="red_700">#d01716</color> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| // Returns a function, that, as long as it continues to be invoked, will not | |
| // be triggered. The function will be called after it stops being called for | |
| // N milliseconds. If `immediate` is passed, trigger the function on the | |
| // leading edge, instead of the trailing. | |
| function debounce(func, wait, immediate) { | |
| var timeout; | |
| return function() { | |
| var context = this, args = arguments; | |
| clearTimeout(timeout); |
| import android.accessibilityservice.AccessibilityService; | |
| import android.accessibilityservice.AccessibilityServiceInfo; | |
| import android.util.Log; | |
| import android.view.accessibility.AccessibilityEvent; | |
| public class RecorderService extends AccessibilityService { | |
| static final String TAG = "RecorderService"; | |
| private String getEventType(AccessibilityEvent event) { |