(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.
public String extractName(HouseClass house) { | |
return house.getKing(); | |
//getting the king name of any house | |
} |
public Result executePlan(WarStrategy strategy) { | |
//WarStrategy is implemented by all the houses | |
} |
class Targaryens { | |
public Targaryens() { | |
//Each time we use Targaryens, we need to create Dragons instance | |
Dragons dragons = new Dragons(); | |
dragons.callForWar(); | |
} | |
} |
(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.
<menu xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto"> | |
<group android:checkableBehavior="single"> | |
<item | |
android:id="@+id/nav_camera" | |
android:icon="@drawable/ic_menu_camera" | |
android:title="Import" /> | |
<item | |
android:id="@+id/nav_gallery" |
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.graphics.Bitmap.Config; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.PorterDuff.Mode; | |
import android.graphics.PorterDuffXfermode; | |
import android.graphics.Rect; | |
import android.graphics.drawable.BitmapDrawable; |
package com.hariofspades.artist; | |
import android.os.Bundle; | |
import android.support.design.widget.FloatingActionButton; | |
import android.support.design.widget.Snackbar; | |
import android.support.v7.app.AppCompatActivity; | |
import android.support.v7.widget.Toolbar; | |
import android.view.View; | |
import android.view.Menu; | |
import android.view.MenuItem; |
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:fitsSystemWindows="true" | |
tools:context="com.hariofspades.artist.MainActivity"> | |
<android.support.design.widget.AppBarLayout |
<?xml version="1.0" encoding="utf-8"?> | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" android:layout_height="match_parent"> | |
<ImageView | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:id="@+id/wall" | |
/> | |
<View | |
android:layout_width="match_parent" |
package com.hariofspades.gradientartist; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.drawable.Drawable; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.widget.ImageView; | |
import android.widget.RelativeLayout; |