Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1
  • 2

TOPIC:

How to show pdfnav.xml(PDFNavAct) file in my app ? 7 years 2 months ago #11807

  • rachnasagar
  • rachnasagar's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 69
  • Thank you received: 0
I know that ...
I want to call my apps activity in your viewlib.
When I am using

startActivity(new Intent(PDFNavAct.this,com.rachnasagar.MainActivity.class));--- I have to call this in your lib activity and its not working .
Because I have to go back to my Mainactivity.

com.rachnasagar cannot be resolved to a type

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

How to show pdfnav.xml(PDFNavAct) file in my app ? 7 years 2 months ago #11812

  • rachnasagar
  • rachnasagar's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 69
  • Thank you received: 0
See...

I have my project A in which I have used the library ViewLib .
In Viewlib (libraray) there is an activity name PDFNavAct.

I need to implement that when I back press in PDFNavAct activity, then it close and open my project A Mainactivity..

For this I wants to implement this method in PDFNavAct activity
@Override
public void onBackPressed() {
super.onBackPressed();

startActivity(new Intent(getApplicationContext(),com.example..Mainactivity));
this.finish();
}

But it is not working ...

Can you please tell me the solution for it , so that I will press back and I com to my home activity i.e Mainactivity.

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

How to show pdfnav.xml(PDFNavAct) file in my app ? 7 years 2 months ago #11825

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
if your MainActivity is the caller activity you don't have to override the onBackPressed method, when you tap the back button the PDFNavAct will be closed as default Android activity behavior.
Make sure not to call finish in your MainActivity after starting PDFNavAct.

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

  • Page:
  • 1
  • 2
Powered by Kunena Forum