\r
<!-- The main content view -->\r
<LinearLayout\r
- xmlns:android="http://schemas.android.com/apk/res/android"\r
android:layout_width="match_parent"\r
android:layout_height="match_parent"\r
- android:background="@color/background_color"\r
- android:baselineAligned="false"\r
- android:orientation="horizontal"\r
- android:id="@+id/ListLayout"\r
- android:contentDescription="@string/list_layout"\r
- >\r
-\r
-\r
- <FrameLayout\r
- android:id="@+id/left_fragment_container"\r
- android:layout_width="0dp"\r
- android:layout_height="match_parent"\r
- android:layout_weight="1" />\r
-\r
- <FrameLayout\r
- android:id="@+id/right_fragment_container"\r
- android:layout_width="0dp"\r
- android:layout_height="match_parent"\r
- android:layout_weight="2" />\r
+ android:orientation="vertical">\r
+\r
+ <ProgressBar android:id="@+id/progressBar"\r
+ android:layout_width="match_parent"\r
+ android:layout_height="6dp"\r
+ android:padding="0dp"\r
+ android:layout_margin="0dp"\r
+ style="@style/Widget.ownCloud.TopProgressBar"\r
+ android:indeterminate="true"\r
+ android:indeterminateOnly="true"\r
+ android:background="#ffffff"\r
+\r
+ />\r
+\r
+ <LinearLayout\r
+ xmlns:android="http://schemas.android.com/apk/res/android"\r
+ android:layout_width="match_parent"\r
+ android:layout_height="wrap_content"\r
+ android:background="@color/background_color"\r
+\r
+ android:orientation="horizontal"\r
+ android:id="@+id/ListLayout"\r
+ android:contentDescription="@string/list_layout"\r
+ >\r
+\r
+ <FrameLayout\r
+ android:id="@+id/left_fragment_container"\r
+ android:layout_width="0dp"\r
+ android:layout_height="match_parent"\r
+ android:layout_weight="1" />\r
+\r
+ <FrameLayout\r
+ android:id="@+id/right_fragment_container"\r
+ android:layout_width="0dp"\r
+ android:layout_height="match_parent"\r
+ android:layout_weight="2" />\r
+ </LinearLayout>\r
+\r
</LinearLayout>\r
\r
<include\r
<color name="owncloud_blue">#1D2D44</color>
<color name="login_text_color">#AAAAAA</color>
+
<!-- Colors -->
<color name="color_accent">@color/owncloud_blue_bright</color>
<item name="colorAccent">@color/color_accent</item>
</style>
+ <!-- Progress bar -->
+ <style name="Widget.ownCloud.TopProgressBar" parent="android:Widget.Holo.ProgressBar.Horizontal">
+ <item name="android:progressDrawable">@drawable/actionbar_progress_horizontal</item>
+ <item name="android:indeterminateDrawable">@drawable/actionbar_progress_indeterminate_horizontal</item>
+ </style>
+
<style name="Theme.ownCloud.Fullscreen" parent="style/Theme.AppCompat">
<item name="android:windowFullscreen">true</item>
</style>
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();
}