Can not change color when selected icon bottom bar in android platform

Product: PDFTron android SDK

Product Version: 9.0.3-beta04
I had problem when try change color when select button on bottom bar when use custom bottom bar

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hi,

We have an example project for custom UI that demonstrates how you can achieve this.
Please see here for more details: pdftron-android-samples/styles.xml at 1a26c4dc59d9ede8e7acae1c8a7a49b0aafd1c3f · PDFTron/pdftron-android-samples · GitHub

You should see a Style called SampleBottomBarTheme This is the style you are looking for.

Please let us know if this solution works for you.

Best Regards,
Eamon

This solution work only when use the default bottom toolbar.
When use this case it not working

Just to clarify what you expect to see in the bottom bar, could you send a screenshot and some descriptions of what you would like to customize?

I created a sample here for reference using a custom bottom bar: GitHub - PDFTron/pdftron-android-samples at 24164 . Here the buttons are tinted according to the theme. Is this what you’re looking for?

Best Regards,
Branden

The problem when I select Reading Mode button and colour of button not fill although I had config selectedIconColor is red.


Hi,

Thanks for the additional information. Actually the current BottomBarBuilder API does not support selectable buttons. The addCustomButton method adds a non-selectable button, so when you tap the button it will not show the selected color.

In this case I can add some API for you to support adding selectable buttons. I will update you ASAP when this new API is available.

Best Regards,
Branden

Thank you for your reply, hope this issue will be resolved soon.

Best Regards,

Hi,

Just to clarify, are you doing any custom logic/behavior for these buttons, or are you simply changing the icons? If so, could you tell us how you have implemented and handled the custom behavior?

Also, could you tell us what the ids you are using for these buttons (it’s cut off in your image)?

I need change icon and can number of button on bottom bar can custom

Hi, This is now added to our stable snapshot version 9.0.3-beta07 you can try out. Snapshot build guide:

API:

BottomBarBuilder.addCustomSelectableButton

Could you please give it a try?
Thanks.

Its work with me!
I have a question is how can I download PDFNetAndroid SDK beta version, I dont see any where I can do that.
Thanks
Best Regards,

Hi, you can download nightly stable packages here: https://www.pdftron.com/nightly/
Be sure to select stable to obtain production ready builds. Experimental is dev builds.

Thanks.