Questionsforum
How to use same navigation drawer throughout the Application, indepandent of Activity It is urgent?

How to use same navigation drawer throughout the Application, indepandent of Activity It is urgent?



On 2014-06-14 02:18:22.0
priyabrat


Pls reply...It's urgent and if possible.....pls give some....idea on code...



On 2014-06-14 02:18:57.0
priyabrat

If you need anything throughout the application ,u should declare in manifest file.



On 2014-06-14 02:39:58.0
subha064

Or if you want you can use inheritance to avoid the duplicate code.

public BaseActivity extends Activity {
           //code for navigation drawer
}  
public class MyActivity1 extends BaseActivity {
}
public class MyActivity2 extends BaseActivity {
}

Source Here



On 2014-06-14 02:58:05.0
hablu

what about xml....Is it require to declare drawerlayout also everywhere or only in BaseActivity???



On 2014-06-14 03:27:32.0
priyabrat

Had you tried it ?
I don't think we need to declare drawerlayout everywhere.



On 2014-06-14 03:32:28.0
hablu

Yes..but not working....



On 2014-06-14 04:05:07.0
priyabrat

copyright@questionsforum.net