I know only one way to get a view by id:
getViewById(R.drawable.imageButton)
But how am I supposed to get this imageButton if i don’t have an activity (developing a widget application)
I am able to get a context. I suppose it is enough to get the view – context contains only one widget isn’t it? And if not – then how to get each widget views ?
For Widgets you have to work with RemoteViews, for example
Here you can find a tutorial of how to use them