Put xml file "api_keys.xml" in the directory "res/value/".
api_keys.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="THE_MOVIE_DB_API_TOKEN">XXXXX</string>
</resources>| taskObservable.subscribe(new Observer<Task>() { | |
| @Override | |
| public void onSubscribe(Disposable d) { | |
| } | |
| @Override | |
| public void onNext(Task task) { // run on main thread | |
| Log.d(TAG, "onNext: : " + task.getDescription()); | |
| } |
| Observable<Task> taskObservable = Observable // create a new Observable object | |
| .fromIterable(DataSource.createTasksList()) // apply 'fromIterable' operator | |
| .subscribeOn(Schedulers.io()) // designate worker thread (background) | |
| .observeOn(AndroidSchedulers.mainThread()); // designate observer thread (main thread) |
| <?xml version="1.0" encoding="utf-8"?> | |
| <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > | |
| <!-- Drop Shadow Stack --> | |
| <item> | |
| <shape> | |
| <padding | |
| android:bottom="1dp" | |
| android:left="1dp" | |
| android:right="1dp" |
| /** | |
| * Text view that allows changing the letter spacing of the text. | |
| * | |
| * @author Pedro Barros (pedrobarros.dev at gmail.com) | |
| * @since May 7, 2013 | |
| */ | |
| public static class LetterSpacingTextView extends TextView { | |
| private float spacing = Spacing.NORMAL; | |
| private CharSequence originalText = ""; |
| /* | |
| * Copyright (C) 2017 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| public class MaxHeightLinearLayout extends LinearLayout { | |
| private int maxHeightDp; | |
| public MaxHeightLinearLayout(Context context) { | |
| super(context); | |
| } | |
| public MaxHeightLinearLayout(Context context, AttributeSet attrs) { | |
| super(context, attrs); |
| // app module build.gradle | |
| apply plugin: 'com.android.application' | |
| android { | |
| compileSdkVersion rootProject.compileSdkVersion | |
| buildToolsVersion rootProject.buildToolsVersion | |
| defaultConfig { | |
| applicationId "com.segunfamisa.gradleextraproperties" | |
| minSdkVersion rootProject.minSdkVersion | |
| targetSdkVersion rootProject.targetSdkVersion |