android


Can we Open Multiple DrawerLayout in One Activity


Can we open multiple DrawerLayout in one activity.
i mean when open on one DrawerLayout and onclick on item open another drawerlayout.
(Nested Drawer layout).
Yes you can using Fragments.
From the Fragment's onCreateView() you can include a button somewhere that has OnClickListenerwhere in you put this code .
open a new Drawer :
//For me a better way in avoiding a `null pointer` in getting the DrawerLayout
final DrawerLayout drawer = (DrawerLayout) getActivity().findViewById(R.id.drawer_layout);
btn.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
// TODO Auto-generated method stub
//Opens the Drawer
drawer.openDrawer(Your View, Usually a ListView);
}
return false;
});
And close Drawer :
drawer.closeDrawer(Your View, Usually a ListView);
Hope it helps .

Related Links

Android 4.4.4 can not connect to Nordic semi SDK 13 devices
Unable to set drawable as background on a textview in api 19
Android Make one request with post method, but it save 2 data in database
Android command is depreciated after updating SDK
The resolution doesn't fit the screen
Camera2 API Real-Time OCR
Android ListView generated from SQLite database not displaying on phone screen (but displaying on emulator)
How to filter (not search) Listview BaseAdapter
The Activity restart after saving data in Firebase
How do I use ConstraintSet in Android to stack TextViews horizontally?
Turbolinks Android Adaptor - back button where to start
How to fix Android ListView Rendering Error where the checkboxes of the list items disappear?
SharedPreferences on first run are not saved when pressing Back Button
getfeatures of kml layer
How to add Firebase ChildEventlistener in Broadcast receiver
Running ex. Facebook app INSIDE my app frame

Categories

HOME
microsoftgraph
gridview
spark-streaming
string
apache-jena
amp-html
css3
twig
interface
knitr
r-googlesheets
javacc
soa
rds
jetty
retrofit2
frontend
pkcs#11
vimdiff
stellar.js
onedrive-api
template-engine
cfml
topology
asciidoctor-pdf
breadth-first-search
cgbitmapcontext
href
string-concatenation
strongname
data.stackexchange.com
definitelytyped
iis-express
hibernate-validator
simplecv
sammy.js
sendbird
hunspell
sharding
apiary.io
zoomify
reactivekit
css-position
p4merge
chef-solo
azure-arm
claims
logback-groovy
placeholder
clang++
rfc3339
facebook-social-plugins
fwrite
openal
hammer.js
carrot2
azure-cli
appdomain
boxing
mach-o
mouseleave
universal-analytics
watch-os-2
windows-azure-queues
hclust
observablecollection
appscale
nss
cortex-m
database-relations
iokit
rubaxa-sortable
mirror
procedural-programming
sip-server
cocos3d
human-computer-interface
maven-scm
scriptaculous
kendo-dataviz
scrypt
apache-abdera
twisted.web
uimanageddocument
xcode3.2
veracity
multiplexing
hibernateexception
screen-size
saxparseexception
umra
twitterizer
qglwidget
undefined-index
instantiationexception
silent
globals
pagemethods
perl5.12

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App