If I am Understanding your problem well, then this code could be helpfull
LinearLayout linearLayout = (LinearLayout)inflater.inflate(R.layout.news_categories_item, null);
Button b1 = (Button)linearLayout.findViewById(R.id.button1);
linearLayout.addView(b1);