- Posts: 6
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Lib abilities
- Dmitry Kazakov
- Topic Author
- Offline
- New Member
-
I mean that I had hide an action bar but free sapce was not occupied by pdf -- it was filled by greay background.It seems that app doesn’t support this automatically. Can you tell me which part of code is responsible for this?
So my questions is it possbile to fill all space with pdf content? Do I nned to modify NDK code?
Where I can find this file? I see only Global class in com.radaee.pdf packageGlobal.default_config..
You need to rerender the page after hiding the actionbar, to recalculate the render variables. (m_view.vRenderAsync(page)
- Dmitry Kazakov
- Topic Author
- Offline
- New Member
-
- Posts: 6
- Thank you received: 0
can not find render async method in classes involved in demo project nor in com.radaee.view package.
Post demo code to make it clear.
public class MainActivity extends Activity
{
private ReaderController m_vPDF = null;
private Document m_doc = new Document();
// private PDFHttpStream m_stream = new PDFHttpStream();
private PDFFileStream stream = new PDFFileStream();
@Override
protected void onCreate(Bundle savedInstanceState)
{
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(
WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
super.onCreate(savedInstanceState);
Global.Init( this );
m_vPDF = new ReaderController(this);
m_doc.Close();
// m_stream. open(" www.androidpdf.mobi/docs/MRBrochoure.pdf ");
//m_stream.open(" www.radaee.com/files/test.pdf ");
String str = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath();
stream.open(str + "/test.pdf");
int ret = m_doc.OpenStream(stream/*m_stream*/, null);
switch( ret )
{
case -1://need input password
finish();
break;
case -2://unknown encryption
finish();
break;
case -3://damaged or invalid format
finish();
break;
case -10://access denied or invalid file path
finish();
break;
case 0://succeeded, and continue
break;
default://unknown error
finish();
break;
}
if( ret == 0 )
{
m_vPDF.open(m_doc);
setContentView( m_vPDF );
}
}
@Override
public void onDestroy()
{
if( m_vPDF != null )
{
m_vPDF.close();
m_vPDF = null;
}
if( m_doc != null )
{
m_doc.Close();
m_doc = null;
}
// if( m_stream != null )
// {
// m_stream.close();
// m_stream = null;
// }
if( stream != null )
{
stream.close();
stream = null;
}
Global.RemoveTmp();
super.onDestroy();
}
}
You need to check the general demo project PDFViewerxxx, inside that you will find all the methods i told you about
- Dmitry Kazakov
- Topic Author
- Offline
- New Member
-
- Posts: 6
- Thank you received: 0
Unfortunatly app crashes with pdf with two pages as an inforgaphics and text as well. I have added onTrim call listener and see app receives TRIM_MEMORY_RUNNING_CRITICAL when a look trough pages with zoom.