how to bring to normal size after double click - 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

TOPIC: how to bring to normal size after double click

how to bring to normal size after double click 3 years 4 months ago #7930

  • asliyanage
  • asliyanage's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 100
  • Thank you received: 0
I found below method in pdfreader class.

public boolean OnPDFDoubleTapped(float x, float y)
{
if( m_status != STA_NORMAL ) return false;
m_view.vSetScale(m_view.vGetScale() + Global.zoomStep, x, y);
return true;
}

I need to bring the pdf when if double click happens when the pdf is in mazimum size.So how to identify the maximum size ?is there any status like STA_NORMAL for maximum size ?

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

how to bring to normal size after double click 3 years 4 months ago #7981

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 789
  • Karma: 20
  • Thank you received: 58
You can do it like:
if(m_view.vGetScale() == m_view.vGetMaxScale())
       Global.zoomStep *= -1; //this will reverse the zoom behavior

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

how to bring to normal size after double click 3 years 4 months ago #7985

  • asliyanage
  • asliyanage's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 100
  • Thank you received: 0
I change the code as below.Now it maximize if i double clicks the pdf and if i double click it comes to normal size.

public boolean OnPDFDoubleTapped(float x, float y)
{

if(m_view.vGetScale() == m_view.vGetMinScale()){
m_view.vSetScale(m_view.vGetMaxScale(),x,y );
}else{
m_view.vSetScale(m_view.vGetMinScale(),x,y );
}

}

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

  • Page:
  • 1
Powered by Kunena Forum