前言
部分Android设备是存在旋钮功能,大多是发送的是KeyEvent.KEYCODE_DPAD_UP和KeyEvent.KEYCODE_DPAD_DOWN。
    /** Key code constant: Directional Pad Up key.
     * May also be synthesized from trackball motions.
     */
    public static final int KEYCODE_DPAD_UP         = 19;
    /** Key code constant: Directional Pad Down key.
     * May also be synthesized from trackball motions.
     */
    public static final int KEYCODE_DPAD_DOWN       = 20;
当旋转时,我们的应用就会出现:一个绿色边框包围着。
其实不仅仅旋钮,Android设备接上鼠标也存在这种绿色选中边框。

好文章