uber / uber/rides-android-sdk

Is there any programmatically way to change colour for RideRequestButton?

Open
#78 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
Java
Stars
293
Forks
132
PR merge metrics
No merged PRs in 30d

Description

Hi, I wish to change the RideRequestButton background to white and black text and vice versa depends on the current application theme. But the only way I did is, created 2 RideRequestButton in xml, one with uber:ub__style="black" and uber:ub__style="white", and hide either one of them depends on the current application theme. Is that possible to create one function to do this in RideRequestButton? Thanks a lot... :)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting RideRequestButton and the existing uber:ub__style XML handling to understand how the black and white variants are selected. Confirm whether a single button can switch styles at runtime, and consider how the behavior should be verified for both application themes; the issue provides no named file or test.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.