(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.
| This article describes how our FragmentBack works under the hood. | |
| BaseFragment | |
| First step to create back-sensitive fragments is to define interface that we can call to notify particular fragments about back-press. It contains only one method onBackPressed() which returns a value that indicates if back-press event was consumed by the fragment. | |
| In this example we use base class, but you can define it via interface as well. | |
| public class BaseFragment extends Fragment { | |
| /** | |
| * Could handle back press. |
| This article describes how our FragmentBack works under the hood. | |
| BaseFragment | |
| First step to create back-sensitive fragments is to define interface that we can call to notify particular fragments about back-press. It contains only one method onBackPressed() which returns a value that indicates if back-press event was consumed by the fragment. | |
| In this example we use base class, but you can define it via interface as well. | |
| public class BaseFragment extends Fragment { | |
| /** | |
| * Could handle back press. |
| /** | |
| * @param array A sorted array of ints to search through. This must be sorted. | |
| * @param key an int to seach the array for | |
| * @param start position where the arrays starts | |
| * @param end position where the array ends | |
| * @return wheter the key exists in the array | |
| */ | |
| public static boolean binarySearchRecursive(int[] array, int key, int start, int end) { | |
| int middle = (start + end) / 2; |
(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.
In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc
Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server
Use this link and get $10 free. Just select the $5 plan unless this a production app.