Our Ti.UI.Button is currently using the Java android.widget.Button class. It should be updated to use the newer "MaterialToolbar" class. The newer class supports the material theme and new styles such as "outline" and "text-only" buttons.
Ti.UI.Button supports a style property which is currently iOS only. We should add support for this property on Android. The iOS-only Ti.UI.iOS.SystemButtonStyle should be deprecated and its style constants should be moved to Ti.UI as shown below.
- Ti.UI.BUTTON_STYLE_OPTION_POSITIVE // = Ti.UI.iOS.SystemButtonStyle.DONE
- Ti.UI.BUTTON_STYLE_OPTION_NEUTRAL // = Ti.UI.iOS.SystemButtonStyle.PLAIN/BORDERED
The Ti.UI.BUTTON_STYLE_FILLED matches Android's old solid button behavior. The other styles are new on Android.
Note that iOS only supports text-only buttons. Apple dropped support for bordered buttons a while ago. So, using any other unsupported style on iOS causes it to use text-only buttons.
Each button style can be tested with the attached ButtonStyleTest.js script, which will display what's shown in the screenshots below.
The app must use a "Theme.MaterialComponents" based theme or else an exception will occur. So, app's using a custom theme based from "Theme.AppCompat" or similar will crash. This is normal and the exception will state that the theme will need to change.