Html.fromHtml("<h2>Title</h2><br><p>Description here</p>", Html.FROM_HTML_MODE_LEGACY);
public function validatePhone($attribute, $params)
{
if (!$this->hasErrors()) {
$user = User::findOne(['phone' => $this->$attribute]);
if ($user ) {
$this->addError($attribute, 'Телефон занят');
}
}
['phone', 'validatePhone'],
$client = new SoapClient('https://ws.intime.ua/API/ws/API20/?wsdl', [
'login' => '',
'password' => '',
'exceptions' => 1,
]);
$result = $client->AuthData([
'ID' => '12345',
'KEY' => '1234'
]);
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))