Change
progress = (ProgressBar) webview.findViewById(R.id.ProgressBar);
to
progress = (ProgressBar)findViewById(R.id.ProgressBar);
Progressbar
belongs to main.xml
. findViewById
looks for a view in the current inflated layout. You have set the content of layout main.xml
to your activity.