Hi,
try to modify this:
if ((max_w > max_h || ((Activity) context).getResources()
.getConfiguration().orientation == ((Activity) context)
.getResources().getConfiguration().ORIENTATION_LANDSCAPE)
&& (max_w > w || ((Activity) context).getResources()
.getConfiguration().orientation == ((Activity) context)
.getResources().getConfiguration().ORIENTATION_LANDSCAPE))
m_view.vSetScale(0, 0, 0);
else
m_view.vSetScale((m_view.vGetMaxScale() / 2), 0, 0);// fit page
with this:
if ((max_w > max_h || getResources().getConfiguration().orientation == getResources().getConfiguration().ORIENTATION_PORTRAIT)
&& (max_w > w || getResources().getConfiguration().orientation == getResources().getConfiguration().ORIENTATION_PORTRAIT))
m_view.vSetScale(0, 0, 0);
else
m_view.vSetScale((m_view.vGetMaxScale() / 2), 0, 0);// fit page with correct scale
Then You have to find a way to set the correct scale in m_view.vSetScale of the else condition!