Functional Programming
is a model of programming that transform and compose stream of immutable sequences by applying map, filter and reduce. Events are immutable because you can't change history.Reactive Programming
is a model of programming focuses on data flow and change propagation.ReactiveX
is an API that focuses on asynchronous composition and manipulation of observable streams of data or events by using a combination of the Observer pattern, Iterator pattern, and features of Functional Programming.RxJava
is the open-source implementation ofReactiveX
in Java.RxJava
is a Java VM implementation ofReactiveX
(Reactive Extensions): a library for composing asynchronous and event-based programs by using observable sequences.RxAndroid
is a lightweight extension to RxJava that providers a Scheduler for Android’s Main Thread, as well as the ability to create a Scheduler that runs on any given Android Handler class.- The two main classes are
Observable
andSubscriber
. - `O
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Each YouTube video has 4 generated images. They are predictably formatted as follows: | |
http://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg | |
http://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg | |
http://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg | |
http://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg | |
The first one in the list is a full size image and others are thumbnail images. The default thumbnail image (ie. one of 1.jpg, 2.jpg, 3.jpg) is: | |
http://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The Very Basic | |
new AsyncTask<Void, Void, Void>() { | |
protected void onPreExecute() { | |
// Pre Code | |
} | |
protected Void doInBackground(Void... unused) { | |
// Background Code | |
return null; | |
} | |
protected void onPostExecute(Void unused) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Bitmap loadBitmapFromView(View v) { | |
int specWidth = View.MeasureSpec.makeMeasureSpec(900 /* any */, View.MeasureSpec.EXACTLY); | |
v.measure(specWidth, specWidth); | |
int questionWidth = v.getMeasuredWidth(); | |
Bitmap b = Bitmap.createBitmap( questionWidth, questionWidth, Bitmap.Config.ARGB_8888); | |
Canvas c = new Canvas(b); | |
c.drawColor(Color.WHITE); | |
v.layout(v.getLeft(), v.getTop(), v.getRight(), v.getBottom()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.view.animation.DecelerateInterpolator; | |
import android.view.animation.Interpolator; | |
class ReverseInterpolator implements Interpolator { | |
private Interpolator interpolator; | |
public ReverseInterpolator(Interpolator interpolator) { | |
this.interpolator = interpolator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default_platform :android | |
platform :android do | |
before_all do | |
ENV["SLACK_URL"] = "https://hooks.slack.com/services/ABC/123/XYZ" | |
end | |
######################### PUBLIC LANES ######################### | |
desc "Deploy a new Prod APK version to Play Store Alpha" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
reference link ->https://www.opengeeks.me/2015/08/filechooser-and-android-webview/ | |
https://github.com/OpenGeeksMe/Android-File-Chooser | |
*/ | |
import android.app.Activity; | |
import android.app.ProgressDialog; | |
import android.content.Intent; | |
import android.graphics.Bitmap; | |
import android.net.Uri; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="Convert RGBA to RGB"> | |
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
<meta charset=utf-8 /> | |
<title>Vladimir Bergier</title> | |
<style> | |
div { | |
width: 100%; |
The Material Components Library introduced with the 1.2.0-alpha03
the new ShapeableImageView
.
In your layout you can use:
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/image_view"
app:srcCompat="@drawable/..." />
Then in your code apply the ShapeAppearanceModel
to define your custom corners:
OlderNewer