PeterStaev / NativeScript-Drop-Down

A NativeScript DropDown widget.
Apache License 2.0
105 stars 65 forks source link

Can't style the text color of select box under Android 7 (emulator) #56

Closed ickata closed 7 years ago

ickata commented 7 years ago

Hi,

I'm not able to set the text color of the main select box under Android 7 (testing on emulator). I get this: http://2.1m.yt/ZZ6F4Nx.png

Drop-down items apply the style: http://1.1m.yt/Z8OsTAh.png

The select box is well styled under iOS: http://4.1m.yt/NgtUBE.png

My code:

View:

<Page xmlns="http://www.nativescript.org/tns.xsd" xmlns:dd="nativescript-drop-down" loaded="onload">
   <GridLayout class="padding" rows="auto, auto, auto, auto, auto, auto, auto, auto, auto" columns="auto, *">
      <!-- some other UI components here... -->
      <dd:DropDown items="{{ peoplecount }}" selectedIndex="{{ numpeople }}" selectedIndexChanged="changePeopleCount" horizontalAlignment="right" row="3" col="1" />
      <!-- some other UI components here... -->
   </GridLayout>
</Page>

CSS:

DropDown {
   width: 60;
   height: 40;
   margin-bottom: 4;
   color: #333;
   background-color: #eee;
   border-color: #eee;
   border-width: 1;
   border-radius: 5;
   text-align: center;
}

Environment:

$ node --version
v6.9.1
$ tns --version
2.4.2
PeterStaev commented 7 years ago

Hey @ickata , this seems to be related to some default padding being added to the view. As a temporary fix you can add padding: 0 (or whatever value suits your layout) to your CSS.

ickata commented 7 years ago

@PeterStaev , thank you for the quick response! padding: 6 0 0; did it.