Html.fromHtml("<h2>Title</h2><br><p>Description here</p>", Html.FROM_HTML_MODE_LEGACY);
apiService.login(login, pass)
.map(responseBody -> {
try {
return responseBody.string();
} catch (IOException e) {
e.printStackTrace();
}
return "";
})
.subscribeOn(Schedulers.newThread())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(s -> System.out.println(s), throwable -> {
// тут обработка ошибок
});
@BindingAdapter("android:history")
public static void setHistory(RecyclerView recyclerView, ArrayList<History> history) {
((HistoryAdapter)recyclerView.getAdapter()).setHistory(history);
}
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:history="@{тут_твой_список_с_историей}"/>