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 -> {
// тут обработка ошибок
});
AlertDialog.Builder builder=new AlertDialog.Builder(getActivity());
AlertDialog dialog = builder
.setView(customDialog)
.setPositiveButton(android.R.string.ok, this)
.setNegativeButton(android.R.string.cancel, null)
.create());
dialog.setOnShowListener(dialogInterface ->
dialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(view -> {
// тут код
dialog.dismiss();
}
}));
textView.setText(Html.fromHtml(yourHtml))