title: View.INVISIBLE isn't work for me but View.GONE work good
body: <p>I'm working for app that has a Webview that load my website, and has a progress bar that loading when the page in my webview is loading. For start check how to do it I tried to create two buttons: one is stop progress bar and the second is start it.</p>
  
  <p>My progress bar is load by default when the app is start. 
  Now I created the button that stop this and button that start but the button that need to start this again isn't working after I stop this by the button that need to stop this. 
  I thought that because that has Webview on all the page the loading start work again below the Webview and because it I defined that bottom margin of Webview will be to the progress bar and I saw that  when that the progress bar is work (when I open the app in start) the WebView to the progress bar (middle of the screen) and when I stop this by stop button it's up to end the screen. When I start this again by the start button it's not show the progress bar but it's up to middle of the screen.
  I searched in google but I'm not find anything.
  sorry for my bad English I'm only forteen years old...</p>
  
  <p>Here my xml code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:id="@+id/content_main"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:paddingBottom="0dp"
  android:paddingLeft="0dp"
  android:paddingRight="0dp"
  android:paddingTop="0dp"
  app:layout_behavior="@string/appbar_scrolling_view_behavior"
  tools:context="me.filtering.netsparkmobile.MainActivity"
  tools:showIn="@layout/app_bar_main"&gt;
  
  
  &lt;TextView
      android:text="!אבה ךורב"
      android:layout_width="70dp"
      android:layout_height="wrap_content"
      android:layout_centerVertical="true"
      android:layout_centerHorizontal="true"
      android:textColor="@color/colorAccent"
      android:textSize="@dimen/activity_vertical_margin"
      android:id="@+id/textView6" /&gt;
  
  
  
  
  &lt;WebView
      android:id="@+id/webview"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      /&gt;
  &lt;ProgressBar
      style="?android:attr/progressBarStyleLarge"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_centerVertical="true"
      android:layout_alignLeft="@+id/textView6"
      android:layout_alignStart="@+id/textView6"
      android:id="@+id/progressBar2" /&gt;
  
  
  &lt;Button xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/button_send"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="stop progressbar"
      android:onClick="stopPB" /&gt;
  
   &lt;Button
      android:id="@+id/button_send2"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="start progressbar"
      android:onClick="startPB"
      android:layout_alignParentTop="true"
      android:layout_alignParentRight="true"
      android:layout_alignParentEnd="true" /&gt;
  
      &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>And here part of  my JAVA code:</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity
      implements NavigationView.OnNavigationItemSelectedListener {
  
  ProgressBar PB1;
  int ProgressBarStatus=1;
  
  
  public void stopPB(View arg0) {
      ProgressBar PB1 = (ProgressBar) findViewById(R.id.progressBar2);
  
      PB1.setVisibility(View.GONE);
  }
  public void startPB(View arg0) {
  
      ProgressBar PB1 = (ProgressBar) findViewById(R.id.progressBar2);
      PB1.setVisibility(View.INVISIBLE);
  
  
  }
  </code></pre>