--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+ <solid android:color="@color/white"/>
+ <padding
+ android:left="@dimen/standard_padding"
+ android:top="4dp"
+ android:right="@dimen/standard_padding"
+ android:bottom="4dp"/>
+ <corners
+ android:radius="2dp"/>
+</shape>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ownCloud Android client application
+
+ Copyright (C) 2012 Bartek Przybylski
+ Copyright (C) 2015 ownCloud Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License version 2,
+ as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+ <style name="ProgressDialogTheme" parent="ownCloud.Dialog">
+ </style>
+</resources>
\ No newline at end of file
<color name="login_text_hint_color">#757575</color>
<color name="primary_button_color">@color/owncloud_blue_accent</color>
<color name="secondary_button_color">#D6D7D7</color>
+ <color name="transparent">#00000000</color>
<!-- Colors -->
<color name="color_accent">@color/owncloud_blue_accent</color>
<style name="ownCloud.Dialog" parent="Theme.AppCompat.Light.Dialog" />
<style name="ProgressDialogTheme" parent="ownCloud.Dialog">
- <item name="android:windowFrame">@null</item>
- <item name="android:windowBackground">@null</item>
+ <item name="colorAccent">@color/color_accent</item>
+ <item name="android:textColorPrimary">@color/primary</item>
+ <item name="android:windowFrame">@color/transparent</item>
+ <item name="android:windowBackground">@color/transparent</item>
+ <item name="android:windowTitleBackgroundStyle">@drawable/process_dialog_background</item>
</style>
<style name="ownCloud.Button" parent="Widget.AppCompat.Button">
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
+import android.widget.ProgressBar;
import android.widget.SimpleAdapter;
import android.widget.Toast;
final AlertDialog.Builder builder = new Builder(this);
switch (id) {
case DIALOG_WAITING:
- ProgressDialog pDialog = new ProgressDialog(this);
+ final ProgressDialog pDialog = new ProgressDialog(this, R.style.ProgressDialogTheme);
pDialog.setIndeterminate(false);
pDialog.setCancelable(false);
pDialog.setMessage(getResources().getString(R.string.uploader_info_uploading));
+ pDialog.setOnShowListener(new DialogInterface.OnShowListener() {
+ @Override
+ public void onShow(DialogInterface dialog) {
+ ProgressBar v = (ProgressBar) pDialog.findViewById(android.R.id.progress);
+ v.getIndeterminateDrawable().setColorFilter(getResources().getColor(R.color.color_accent),
+ android.graphics.PorterDuff.Mode.MULTIPLY);
+
+ }
+ });
return pDialog;
case DIALOG_NO_ACCOUNT:
builder.setIcon(android.R.drawable.ic_dialog_alert);
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.view.KeyEvent;
+import android.widget.ProgressBar;
import com.owncloud.android.R;
/// create indeterminate progress dialog
final ProgressDialog dialog = new ProgressDialog(getActivity(), R.style.ProgressDialogTheme);
dialog.setIndeterminate(true);
+ dialog.setOnShowListener(new DialogInterface.OnShowListener() {
+ @Override
+ public void onShow(DialogInterface dialog) {
+ ProgressBar v = (ProgressBar) getDialog().findViewById(android.R.id.progress);
+ v.getIndeterminateDrawable().setColorFilter(getResources().getColor(R.color.color_accent),
+ android.graphics.PorterDuff.Mode.MULTIPLY);
+
+ }
+ });
/// set message
int messageId = getArguments().getInt(ARG_MESSAGE_ID, R.string.placeholder_sentence);
dialog.setMessage(getString(messageId));
-
+
/// set cancellation behavior
boolean cancelable = getArguments().getBoolean(ARG_CANCELABLE, false);
if (!cancelable) {
public boolean onKey(DialogInterface dialog, int keyCode,
KeyEvent event) {
- if( keyCode == KeyEvent.KEYCODE_BACK){
+ if( keyCode == KeyEvent.KEYCODE_BACK) {
return true;
}
return false;