I have a problem with getting the child\'s position of LinearLayout. First I\'m adding dynamically a number of buttons and then I\'m trying to return each child\'s
You must setContentView before start findViewById
setContentView(R.layout.main); tv = (TextView) findViewById(R.id.text);