Search code examples
androiduber-api

Uber RideRequestButton Android


Is there a way to customize the RideRequestButton provided by Uber API? I have tried:

android:textSize="20sp"

in my xml as well as

button.setTextsize(20);

in my activity.java, but to no success. Is there any other way through which I can customize the text? I want to increase the size of button text. By default text size is small for me.

Thank You in advance.


Solution

  • You can get the UserButton object inside the RideRequestButton and customize its properties.

    UberButton button = (UberButton) requestButton.getChildAt(0);
    button.setText(getString("Hello"));
    button.setTextSize(10);