make background transparent for progressbar
<p>I'm using <a href="https://github.com/81813780/AVLoadingIndicatorView" rel="nofollow">this library</a> for progress indicator while I do the background work via web service. I want to make the background transparent while the progressbar is showing. Is there any way to make the window transparent programmatically just like it does with progress dialog? </p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>public class MainActivity extends AppCompatActivity{

    private EditText email, pass;
    private SessionManager session;
    private SQLiteHandler db;
    private AVLoadingIndicatorView pb;
    private static final String LOGIN = "http://ubooktoday.com/android/login";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        
        email = (EditText)findViewById(R.id.et1);
        pass = (EditText)findViewById(R.id.et2);

        session = new SessionManager(getApplicationContext());
        db = new SQLiteHandler(getApplicationContext());
        pb = new AVLoadingIndicatorView(this);

        if (session.isLoggedIn()) {
            startActivity(new Intent(MainActivity.this, ListVActivity.class));
            finish();
        }
    }
    
    public void login(View view){

        if (!email.getText().toString().equals("") &amp;&amp; !pass.getText().toString().equals("")) {
            loginRequest();
        }else{
            Toast.makeText(getApplicationContext(), "Please enter the details", Toast.LENGTH_SHORT).show();
        }
        

    }

    private void loginRequest() {

        startAnim();

        StringRequest stringRequest = new StringRequest(Request.Method.POST, LOGIN,
                new Response.Listener&lt;String&gt;() {
                    @Override
                    public void onResponse(String response) {

                        stopAnim();

                        try {
                            JSONObject jObj = new JSONObject(response);

                            String status = jObj.getString("status");

                            // Now check status value
                            if (status.equals("0")) {

                                Toast.makeText(getApplicationContext(), jObj.getString("message"), Toast.LENGTH_LONG).show();
                            } else if (status.equals("1")) {

                                session.setLogin(true);
                                db.addUser(jObj.getString("spa_name"), jObj.getString("user_id"));

                                startActivity(new Intent(MainActivity.this, ListVActivity.class));
                                finish();



                            }
                        } catch (JSONException e) {
                            // JSON error
                            e.printStackTrace();
                            Toast.makeText(getApplicationContext(), "Json error: " + e.getMessage(), Toast.LENGTH_LONG).show();
                        }
                    }
                }, new Response.ErrorListener() {
            @Override
            public void onErrorResponse(VolleyError error) {
                Toast.makeText(getApplicationContext(), "VolleyError" + error.toString(), Toast.LENGTH_LONG).show();
            }
        }) {
            @Override
            protected Map&lt;String, String&gt; getParams() {
                Map&lt;String, String&gt; params = new HashMap&lt;String, String&gt;();
                params.put("email", email.getText().toString());
                params.put("pass", pass.getText().toString());
                return params;
            }

        };

        RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
        requestQueue.add(stringRequest);
    }

    public void startAnim(){
        findViewById(R.id.avloadingIndicatorView).setVisibility(View.VISIBLE);
        
    }

    public void stopAnim(){
        findViewById(R.id.avloadingIndicatorView).setVisibility(View.GONE);
       
    }
}</code></pre>
</div>
</div>
</p>