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

Resize problem on PDFViewDual

More
10 years 9 months ago #9050 by barwoź
Hello
i have a problem with PDFViewDual, actually i can't resize my pdf file. After pinch screen aplication quiclky moves to center of page and then resize.
there is a problem with page slider too - page not refresh after slide and doesn't move to that page before touch screen.
Please help me, i haven't got any idea how to solve it.
code:
Code:
import android.content.Context; import android.util.Log; import android.view.MotionEvent; import com.radaee.pdf.Document; import com.radaee.reader.PDFLayoutView; import com.radaee.view.PDFView; import com.radaee.view.PDFView.PDFPos; import com.radaee.view.PDFView.PDFViewListener; import com.radaee.view.PDFViewCurl; import com.radaee.view.PDFViewDual; import com.radaee.view.PDFViewHorz; import com.radaee.view.PDFViewVert; public class PDFDoc extends PDFViewDual{ private static final String TAG = "PDFDoc"; public PDFDoc(Context context) { super(context); } public Document viewGetDoc() { return m_doc; } @Override public boolean vMovingFinished() { Log.i(TAG,"vMovingFinished"); return super.vMovingFinished(); } public boolean vTouchEvent(MotionEvent event) { return super.vTouchEvent(event); } public void setViewListener(PDFViewListener listener) { m_listener=listener; } public int ilestron() { return m_doc.GetPageCount(); } public PDFPos getPosition() { PDFPos pos=vGetPos(0,0); if(pos!=null) { Log.i(TAG, "getPostion"+m_h+" "+m_w+" "+vGetX()+" "+vGetY()); pos.x=-vGetX(); pos.y=-vGetY(); if(pos.y<0) pos.y=0; pos.pageno=vGetPage((int)-pos.x, (int)-pos.y); } return pos; } public PDFPos getRealPostion() { PDFPos pos=vGetPos(0,0); return pos; } public int getWidthLayer() { int szerokosc = (int)m_doc.GetPageWidth(0); return szerokosc; } public void vScrollPDF(int newX, int newY){ Log.i(TAG,"vScrollPDF"+newX+" "+newY); if(m_scroller != null){ m_scroller.setFinalX(newX); m_scroller.setFinalY(newY); m_scroller.computeScrollOffset(); } } public int get_scrollerX() { return m_scroller.getCurrX(); } public int get_scrollerY() { return m_scroller.getCurrY(); } /*public PDFPos vSetPos(PDFPos pos, float x, float y) { // TODO Auto-generated method stub pos.x = x; pos.y = y; return pos; }*/ }
More
10 years 9 months ago #9063 by Davide
Hi,
I have take a look at your code, can you give us more info about your problem?
What is your target? What do you wanna create with this code?
Time to create page: 0.422 seconds
Powered by Kunena Forum