If you think the Android project bgBanking listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
/*******************************************************************************
* Copyright (c) 2012 MASConsult Ltd/*fromwww.java2s.com*/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/package eu.masconsult.bgbanking.ui;
importstatic android.os.Build.VERSION.SDK_INT;
importstatic android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH;
import android.app.ProgressDialog;
import android.content.Context;
/**
* Progress dialog in Holo Light theme
*/publicclass LightProgressDialog extends ProgressDialog {
/**
* Create progress dialog
*
* @param context
* @param resId
* @return dialog
*/publicstatic ProgressDialog create(Context context, int resId) {
return create(context, context.getResources().getString(resId));
}
/**
* Create progress dialog
*
* @param context
* @param message
* @return dialog
*/publicstatic ProgressDialog create(Context context, CharSequence message) {
ProgressDialog dialog;
if (SDK_INT >= ICE_CREAM_SANDWICH) {
dialog = new LightProgressDialog(context);
} else {
dialog = new ProgressDialog(context);
dialog.setInverseBackgroundForced(true);
}
dialog.setMessage(message);
dialog.setIndeterminate(true);
dialog.setProgressStyle(STYLE_SPINNER);
return dialog;
}
private LightProgressDialog(Context context) {
super(context, THEME_HOLO_LIGHT);
}
}