Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

style for the view poping up in the webview when a user selects a combo box

Tags:

android

styles

I need to find what style/theme is used by the webview for the view that pops when the user clicks a combo box in the html page.

enter image description here

On certain phones, the text gets chopped and I need to reduce the text size or allow each line to span multiple lines.

I have tried 5 styles so far, without success:

<style name="teststyle1" parent="@android:style/Widget.DropDownItem.Spinner">
    <item name="android:singleLine">false</item>
    <item name="android:textStyle">bold</item>
    <item name="android:textColor">#FF00FF</item>
    <item name="android:checkMark">@drawable/another_btn_radio</item>
</style>

<style name="teststyle2" parent="@android:style/Widget.TextView.SpinnerItem">
    <item name="android:singleLine">false</item>
    <item name="android:textStyle">bold</item>
    <item name="android:textColor">#FF00FF</item>
    <item name="android:checkMark">@drawable/another_btn_radio</item>
</style>

<style name="teststyle3" parent="@android:style/Widget.DropDownItem">
    <item name="android:singleLine">false</item>
    <item name="android:textStyle">bold</item>
    <item name="android:textColor">#FF00FF</item>
    <item name="android:checkMark">@drawable/another_btn_radio</item>
</style>

<style name="teststyle4" parent="@android:style/Widget.Spinner">
    <item name="android:singleLine">false</item>
    <item name="android:textStyle">bold</item>
    <item name="android:textColor">#FF00FF</item>
    <item name="android:checkMark">@drawable/another_btn_radio</item>
</style>

<style name="teststyle5" parent="@android:style/Widget.Spinner">
    <item name="android:singleLine">false</item>
    <item name="android:textStyle">bold</item>
    <item name="android:textColor">#FF00FF</item>
    <item name="android:checkMark">@drawable/another_btn_radio</item>
</style>

Any help would be greatly appreciated.

like image 858
Richard Lalancette Avatar asked Jul 20 '12 13:07

Richard Lalancette


People also ask

What is a WebView and how do you Add one to your layout?

The WebView class is an extension of Android's View class that allows you to display web pages as a part of your activity layout. It does not include any features of a fully developed web browser, such as navigation controls or an address bar. All that WebView does, by default, is show a web page.

Which method from the WebView class loads a Web page?

The loadUrl() and loadData() methods of Android WebView class are used to load and display web page.

Which of the following can you use to display an HTML Web page in an Android application?

Android WebView is used to display HTML in an android app. We can use android WebView to load HTML page into android app.


2 Answers

Allow Multiple lines would be better. If you only set the size. It would be changed if you want to add some words sometime.

like image 196
Bright Great Avatar answered Oct 08 '22 03:10

Bright Great


This change is actually going to be done on the HTML side of things not in android. Use the webkit-appearance CSS tag to specify an appearance style then you can work with the wrapping using CSS.

URL: http://css-infos.net/property/-webkit-appearance

like image 25
Gimballon Avatar answered Oct 08 '22 01:10

Gimballon