Skip to content

Instantly share code, notes, and snippets.

Created March 12, 2017 12:09
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Hafiz-Waleed-Hussain/a3acd794e4942f296531018bdcad2a23 to your computer and use it in GitHub Desktop.
ArrayOfInteger using Rx Java 2 Android.
package async.waleed.rx;
import android.os.Bundle;
import android.util.Log;
import io.reactivex.Observable;
public class MainActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
Integer[] data = {1, 2, 3, 4};
.map(value -> value * value)
.map(value -> Integer.toString(value))
.forEach(string -> Log.i("Android", string));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment