import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
-import android.view.Window;
+import android.widget.ProgressBar;
import android.widget.Toast;
import com.owncloud.android.MainApp;
private boolean mDualPane;
private View mLeftFragmentContainer;
private View mRightFragmentContainer;
+ private ProgressBar mProgressBar;
private static final String KEY_WAITING_TO_PREVIEW = "WAITING_TO_PREVIEW";
private static final String KEY_SYNC_IN_PROGRESS = "SYNC_IN_PROGRESS";
@Override
protected void onCreate(Bundle savedInstanceState) {
Log_OC.v(TAG, "onCreate() start");
- requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
+ //requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
super.onCreate(savedInstanceState); // this calls onAccountChanged() when ownCloud Account
// is valid
// Navigation Drawer
initDrawer();
+ mProgressBar = (ProgressBar) findViewById(R.id.progressBar);
+
mDualPane = getResources().getBoolean(R.bool.large_land_layout);
mLeftFragmentContainer = findViewById(R.id.left_fragment_container);
mRightFragmentContainer = findViewById(R.id.right_fragment_container);
//getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
- setSupportProgressBarIndeterminateVisibility(mSyncInProgress
- /*|| mRefreshSharesInProgress*/);
+ mProgressBar.setVisibility((mSyncInProgress) ? View.VISIBLE : View.INVISIBLE);
+ //setSupportProgressBarIndeterminateVisibility(mSyncInProgress
+ /*|| mRefreshSharesInProgress*/ //);
// always AFTER setContentView(...) ; to work around bug in its implementation
initDrawer();
}
removeStickyBroadcast(intent);
Log_OC.d(TAG, "Setting progress visibility to " + mSyncInProgress);
- setSupportProgressBarIndeterminateVisibility(mSyncInProgress
- /*|| mRefreshSharesInProgress*/);
+ mProgressBar.setVisibility((mSyncInProgress) ? View.VISIBLE : View.INVISIBLE);
+ //setSupportProgressBarIndeterminateVisibility(mSyncInProgress
+ /*|| mRefreshSharesInProgress*/ //);
setBackgroundText();
} // TODO what about other kind of previews?
}
- setSupportProgressBarIndeterminate(false);
+ //setSupportProgressBarIndeterminate(false);
+ mProgressBar.setVisibility(View.INVISIBLE);
} finally {
if (intent != null) {
getApplicationContext()
);
synchFolderOp.execute(getAccount(), MainApp.getAppContext(), this, null, null);
-
- setSupportProgressBarIndeterminateVisibility(true);
+
+ mProgressBar.setVisibility(View.VISIBLE);
+ //setSupportProgressBarIndeterminateVisibility(true);
setBackgroundText();
}