Viewview=LayoutInflater.from(getApplicationContext()).inflate(R.layout.player,null);Viewview=inflater.inflate(R.layout.your_view_id,null);