Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about Android development and PDF

Add custom icons and make them work

More
9 years 5 months ago #11296 by jorisk
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!
More
9 years 4 months ago #11300 by jorisk
Up please...
More
9 years 4 months ago #11301 by nermeen
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?
More
9 years 4 months ago #11302 by jorisk
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:
Code:
SetBtnEnabled(btn_find, true); SetBtnEnabled(btn_return, true); SetBtnEnabled(btn_summary, true);
I also tried something like this but I got no best result.
Code:
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.
More
9 years 4 months ago #11304 by nermeen
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)
More
9 years 4 months ago #11305 by jorisk
Strange because Global.isLicenseActivated() return true...
Time to create page: 0.406 seconds
Powered by Kunena Forum