java - Override parts of Activity class from TestProject -


i have 2 projects, sourceproject , testproject. in source-project have following class:

public class myactivity extends activity {     @override     public void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.main);         log.i("", "normal mode");     } } 

in test project i'd change/override log message example. of course can following , put new class under same package path , change class following:

public class myactivity extends activity {     @override     public void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.main);         log.i("", "test mode");     } } 

but let's have more functionality in class , use functionality (in test class well). can't extend sourceproject-class "myactivity" because it's named equally. if change name "myactivityx extends myactivity" doesn't compiled application.

does have solution, doesn't require me copy complete source class test project , modify there?

if work under linux have link instead of file in 1 of projects.

$ ln -s {/path/to/file-name} {link-name} 

i don't know if there links under windows.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -