V
V
Vadim0282014-09-15 19:32:34
Android
Vadim028, 2014-09-15 19:32:34

How to achieve full display of long texts in option dropdown elements on webview?

How can I fix the display of [select] [option]... elements containing long text?
Standard display does not show 3rd or more lines if the text is long.
90bba065b4a0422eab735a3be8c8767c.jpg

String html =
                        "<!DOCTYPE html>" +
                                "<html>" +
                                "<head>" +
                                "</head>" +
                                "<body>" +
                                "<select>" +
                                "<option value=\"1\">Длинный очень длинный текст более двух строк, чтобы убедиться в проблеме</option>" +
                                "<option value=\"2\">Длинный очень длинный текст на втором элементе чтобы перенеслось на две и более строки</option>" +
                                "</select>" +
                                "</body>" +
                                "</html>";


                mWebView.loadData(html, "text/html; charset=UTF-8", "UTF-8");

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question