# Lightweight Picker, Device Detection and More

DevFeed: [Lightweight Picker, Device Detection and More](<https://devfeed.tech/articles/lightweight-picker-device-detection-and-more-19350.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/lightweight-picker-device-detection/>)

Author: Shai Almog

Published: 2018-05-21T00:00:00Z

Content type: article

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [GUI](<https://devfeed.tech/topics/gui.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [Android](<https://devfeed.tech/topics/android.md>), [Development](<https://devfeed.tech/topics/development.md>), [API](<https://devfeed.tech/topics/api.md>), [media3](<https://devfeed.tech/topics/media3.md>)

Tags: [3d](<https://devfeed.tech/tags/3d.md>), [api](<https://devfeed.tech/tags/api.md>), [apple](<https://devfeed.tech/tags/apple.md>), [code](<https://devfeed.tech/tags/code.md>), [development](<https://devfeed.tech/tags/development.md>), [ios](<https://devfeed.tech/tags/ios.md>), [simulator](<https://devfeed.tech/tags/simulator.md>), [update](<https://devfeed.tech/tags/update.md>)

## AI overview

The article describes a new lightweight picker implementation in Codename One that uses native picker interfaces when available and falls back to a lightweight UI otherwise. It also introduces a device-detection library for supported use cases such as statistics and accurate device DPI calculation, and briefly updates a Facebook clone course.

## Source excerpt

One of the worst components in Codename One is the picker component. Its origin lies in the migration to iOS 7 where the native picker introduced a 3d effect that was hard to replicate with our old graphics layer. We had no choice. We used a native widget for that picker and regretted that decision ever since. It looks bad on the simulator, it misbehaves and with every update from Apple things break. This has again proven to us the importance of the lightweight architecture of Codename One!