How to enable/disable ViewGroup efficiently in android

view story

http://stackoverflow.com – I want to show a list and shows its detailed view click on items.Here is my code public class MyView extends RelativeLayout { private LinearLayout contentLayout; private Context context = null; private View contentView = null; private LayoutInflater layoutInflater = null; private DetailsView detailView = null; public MyView(Context context) { super(context); this.context = context; initLayout(); } private void initLayout() { layoutInflater = (LayoutInflater) context .getSystemService(Service.LAYOUT_INFLATER_SERVICE); (HowTos)