Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android TV support for FIAM-display (proper focus for modal view) #195

Open
stari4ek opened this issue Jan 12, 2019 · 6 comments
Open

Android TV support for FIAM-display (proper focus for modal view) #195

stari4ek opened this issue Jan 12, 2019 · 6 comments

Comments

@stari4ek
Copy link

What feature would you like to see?

Set focus to action button in FIAM display by default.
Otherwise default focus goes to scrollview with text and clicking "enter" on D-Pad dismisses modal view instead of performing "Click" on action button.

How would you use it?

It provides better usability for Android TV system and standard Android if external keyboard is used

@stari4ek
Copy link
Author

It can be easily fixed updating modal layouts:

        <Button
            android:id="@+id/button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:focusable="true"
            android:focusableInTouchMode="true"
            tools:text="Wishlist"
            tools:textColor="#000000">

            <requestFocus/>
        </Button>
  android:focusable="true"
  android:focusableInTouchMode="true"
  <requestFocus/>

But it's really hard to apply this workaround when firebase-inappmessaging-display is used as external library.
I've tried to override layout with tools:override but it does not work for me (most probably cause it should override layout from layout-land)
And the only way is to build library locally

@vkryachko
Copy link
Member

/assign @MeghaB

stari4ek added a commit to stari4ek/firebase-android-sdk that referenced this issue Jan 14, 2019
…port for FIAM-display (proper focus for modal view)
@MeghaB
Copy link
Contributor

MeghaB commented Jan 14, 2019

Hi @stari4ek - Thanks for the suggestion! In the meantime, the android sdk for FIAM-display is open sourced and so you can definitely apply the workaround to use yourself.
Cheers!

@stari4ek
Copy link
Author

Yeah. I've ended up with prebuilt aar with workaround applied.

@stari4ek
Copy link
Author

Since there is no source code published for firebase-inappmessage-display starting from 17.0.3 (as date of writing, current version is 18.0.2) (#441) - and this issue can't be workarounded easily

@stari4ek
Copy link
Author

looks like with 18.0.2 there is a bit different behavior.
action button sometime gets focus sometime don't, but clicking with d-pad when it's not in the focus does not dismiss message, which is good.
Checked with card/modal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants