support for android:max attribute