Add custom icons and make them work - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Android development and PDF
  • Page:
  • 1
  • 2

TOPIC: Add custom icons and make them work

Add custom icons and make them work 2 years 2 months ago #11296

  • jorisk
  • jorisk's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 37
  • Karma: 1
  • Thank you received: 0
Hello,

As you suggested in my last request , I changed my PDFReaderAct class to use the new PDFViewAct class. It works great and fix the zoom bug in landscape, thank you very much for this.

Now I have few problems with the PDFTopBar behaviour (that I control in the PDFViewController class): when I add custom icons in bar_cmd.xml, they are not displayed. It is like they are "GONE" or transparent, I don't know. The place of the icons is used and I can click them, but it is just a blank space. Do you know what could fix the problem?

Also, I would like to know how I can quit my PDFViewAct after a click in PDFViewController.

Thanks by advance!

Please Log in or Create an account to join the conversation.

Add custom icons and make them work 2 years 1 month ago #11300

  • jorisk
  • jorisk's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 37
  • Karma: 1
  • Thank you received: 0
Up please...

Please Log in or Create an account to join the conversation.

Add custom icons and make them work 2 years 1 month ago #11301

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
Dear Jorisk,

Make sure that you are using an icon with a compatible color and that you are initializing it as the other buttons, you may need to check the SetBtnEnabled which changes the background color basen on it's status.

What do you mean by quit my PDFViewAct after a click in PDFViewController?

Please Log in or Create an account to join the conversation.

Add custom icons and make them work 2 years 1 month ago #11302

  • jorisk
  • jorisk's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 37
  • Karma: 1
  • Thank you received: 0
Hello Nermeen,

It doesn't come from the compatible colors of my icon because I have the problem even if I try using your native icons.
Only "ic_action_search" is displaying, and I guess it is a problem with SetBtnEnabled but if I try to put these methods in the PDFViewController constructor, it is still not working:
SetBtnEnabled(btn_find, true);
SetBtnEnabled(btn_return, true);
SetBtnEnabled(btn_summary, true);
I also tried something like this but I got no best result.
btn_find.setVisibility(View.VISIBLE);
btn_return.setVisibility(View.VISIBLE);
btn_summary.setVisibility(View.VISIBLE);

My second question is that I would like to add a onClickListener() to a button that quit the reader (PDFViewAct). A little like onBackPressed method.

Please Log in or Create an account to join the conversation.

Add custom icons and make them work 2 years 1 month ago #11304

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
In this case, it might be a license activation problem...
please check the license check part (if(Global.isLicenseActivated())) in PDFViewController constructor.

For the back button, you can add it to the bar_cmd, and add a new method to the PDFLayoutListener (onPDFClose) to be handled by the activity..
Then in the on click listener of the back button call the new created method (onPDFClose)

Please Log in or Create an account to join the conversation.

Add custom icons and make them work 2 years 1 month ago #11305

  • jorisk
  • jorisk's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 37
  • Karma: 1
  • Thank you received: 0
Strange because Global.isLicenseActivated() return true...

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Powered by Kunena Forum