NativeScript-Drop-Down icon indicating copy to clipboard operation
NativeScript-Drop-Down copied to clipboard

Incorrect styling of dropdown on android

Open mmerbes opened this issue 3 years ago • 3 comments

When using the drop-down on android the font is squeezed to a small size in the top left hand corner of the drop down. The select items font size is also too small. All of this displays at the excepted size on iOS. This is only a problem on android. Any kind of styling I have tried via css classes has changed nothing.

Screenshot_20220216-112005 Screenshot_20220216-112021

Html <StackLayout class="drop-down-holder"> <Dropdown #dropDown height="50" [items]="choices" [(ngModel)]="selectedIndex" [selectedIndex]="selectedIndex" itemsTextAlignment="center" class="item-drop-down" (selectedIndexChanged)="updateIndex($event)" fontSize="30" ngDefaultControl > </Dropdown> </StackLayout> CSS but the .item-drop-down stylings don't seem to do anything. ` .drop-down-holder { border-width: 2; border-color: $border-light; background-color: $background-light; width: 100%; margin-top: 25px; }

.item-drop-down { width: 100%; padding: 15px; font-size: 100%; } ` I would like some way to change the font size to an acceptable level.

mmerbes avatar Feb 16 '22 16:02 mmerbes

Hey @mmerbes , I do not think setting 100% would work. Try removing the fontSize property and put something big in the style, like font-size: 50. See if that would change anything.

PeterStaev avatar Feb 16 '22 17:02 PeterStaev

The 100% styling works on iOS interestingly enough. And that was just my latest attempt after something simple like font-size: 50 failed. As far as I can styling on android is broken.

mmerbes avatar Feb 16 '22 17:02 mmerbes

Encountering same problem here, when I open the dropdown, the styling is okay at first: image

but when I open it back, the styling is broken: image

tested only in android.

zeejay09 avatar Mar 25 '22 00:03 zeejay09