uber / uber/RIBs

[Android] Using toolbar

Open
#314 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Android
Dominant language
Kotlin
Stars
7.9k
Forks
914
PR merge metrics
No merged PRs in 30d

Description

Hello,

We are currently trying to build a new Android application using RIBs architecture which you provide. As many Android application, we use a toolbar which enables us to navigate threw RIBs with back navigation icon.

We don't want to set a toolbar in each RIBs layout to avoid code duplication, so we set a toolbar into the RootView.

Here is our issue : how can we propagate click on navigation icon event to the current RIB attached ?

Currently, we are using RxBinding, therefore the event action is handled by RootInteractor. We use dagger injection to pass toolbar object to each RIB, but it seems to be an unpleasing solution

We’d be very grateful if you could give some advice to manage more easily toolbar behaviour threw RIBs.

Best regards,

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

The issue mentions a toolbar in RootView and event handling in RootInteractor, but names no files or tests. Start by reviewing the Android RIBs navigation and interactor structure; done would be a documented or implemented way for the current attached RIB to receive toolbar back-navigation events without duplicating toolbars or injecting the toolbar into every RIB.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.