two progress bars with same styles (default) look different in android : In my android application i am using an open source library. This library has an activity which creates a progress bar (no style) using below code . say it progressBar1 .

    private void createProgressBar() {
        LayoutParams params = new LayoutParams(-1, -2); // match_parent , wrap_content
        params.addRule(13); //center in parent 
        ProgressBar = new ProgressBar(this);
        ProgressBar.setLayoutParams(params);
        RootLayout.addView(ProgressBar);
        ProgressBar.setVisibility(8); //View.GONE
    }

I am also creating a progress bar in my app using exact same code above , Say ProgressBar2.
But the two progress bars look different . I donot know whats the reason .
I want both the progress bars to look same .

I also tried changing the progressBar2 by adding it in xml and using from there using below code:

    <ProgressBar
            android:id="@+id/progressBar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:layout_centerVertical="true"
            android:indeterminate= "true"
            android:visibility="gone"/>

using it in java as:

progressBar = (ProgressBar) findViewById(R.id.progressBar);
progressBar.setVisibility(View.VISIBLE);

still the progressBar2 Looks the same and both progressBar1 and progressBar2 look different ... do not know why?

 
