i have id "@+id/call" in single_item.xml when i use findVewById it (the layout setcontextview(R.layout.main)) .the app crash .how to fix the error
i have id @+id/call in single_item.xml when i use findVewById it (the layout setcontextview(R.layout.main)
Share
You are trying to find a View (R.id.call) that is declared in R.layout.single_item in the layour R.layout.main, so I guess it is throwing a Null Pointer Exception.
You should either declare your “@+id/call” element in your main.xml file, or set the context view to R.layout.single_item