android - Multiple Inheritance- Is there a way out? -


i in bit of trouble, have made app uses traditional menu (more social networking app), now, have decided replace menu swipe style menu based on jfeinstein10/slidingmenu library.

as far know , have read, way integrate library extend main activity sliding menu class, however, problem face since app uses google maps api, extends map activity,

    public class mainactivity extends mapactivity implements view.onclicklistener 

hence, not sure how further include sliding activity since java doesn't support multiple inheritance. further, can't use instance of other classes. know there other way example directly through constructor of integrating library well. help, !!

there method include library projects in project.

  1. import library project in workspace.

    file > import > android > existing code in workspace > browse library project > ok

  2. add reference of library project in project.

    right click on project > properties > android > add > choose library project > ok

another method adding jar file.

right click on project > properties > java build path > libraries > add external jar > browse jar file > ok

or

create folder named libs in project (if not present). copy jar file folder.

after can use library project per needs.

no need extend class name. needs imported.

import library_package_name.classname; 

hope helps !!


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -