Search in sources :

Example 1 with CircularProgressBar

use of com.instructure.speedgrader.views.CircularProgressBar in project instructure-android by instructure.

the class OnlineURLFragment method setupViews.

private void setupViews(View rootView) {
    previewImageHolder = (ImageView) rootView.findViewById(R.id.previewImage);
    urlButton = (Button) rootView.findViewById(R.id.urlButton);
    urlLabel = (HelveticaTextView) rootView.findViewById(R.id.urlLabel);
    loadingView = rootView.findViewById(R.id.loadingLayout);
    loadingView.setVisibility(View.VISIBLE);
    // allow long presses to show context menu
    previewImageHolder.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            openMedia(submission.getAttachments().get(0).getMimeType(), submission.getAttachments().get(0).getUrl(), submission.getAttachments().get(0).getDisplayName());
        }
    });
    CircularProgressBar progressBar = (CircularProgressBar) rootView.findViewById(R.id.progressBar);
    progressBar.setColor(CanvasContextColor.getCachedColor(getContext(), getCanvasContext().getContextId()));
}
Also used : CircularProgressBar(com.instructure.speedgrader.views.CircularProgressBar) HelveticaTextView(com.instructure.speedgrader.views.HelveticaTextView) ImageView(android.widget.ImageView) View(android.view.View)

Example 2 with CircularProgressBar

use of com.instructure.speedgrader.views.CircularProgressBar in project instructure-android by instructure.

the class SubmissionWebViewFragment method initLoadingView.

/**
 * For Crocodoc files, we use javascript to override some CSS styles. Since Javascript is so slow, it's a bit ugly since the user can see
 * the style changes taking place, and the view isn't scrollable until the changes take place. For Crocodoc files, we display a loading image
 * over the webview, then use a javascript interface to remove this loadingview when changes complete.
 * @param rootView
 */
private void initLoadingView(View rootView) {
    loadingView = (RelativeLayout) rootView.findViewById(R.id.webViewLoading);
    ((HelveticaTextView) loadingView.findViewById(R.id.emptyViewText)).setText(getString(R.string.loadingIndeterminate));
    CircularProgressBar progressBar = (CircularProgressBar) loadingView.findViewById(R.id.circularProgressBar);
    progressBar.setColor(CanvasContextColor.getCachedColor(getContext(), getCanvasContext().getContextId()));
}
Also used : CircularProgressBar(com.instructure.speedgrader.views.CircularProgressBar) HelveticaTextView(com.instructure.speedgrader.views.HelveticaTextView)

Example 3 with CircularProgressBar

use of com.instructure.speedgrader.views.CircularProgressBar in project instructure-android by instructure.

the class DocumentActivity method showLoading.

// endregion
// ///////////////////////////////////////////////////////////////
// View Helpers
// ///////////////////////////////////////////////////////////////
private void showLoading() {
    RelativeLayout loading = (RelativeLayout) findViewById(R.id.documentLoadingView);
    ((CircularProgressBar) loading.findViewById(R.id.circularProgressBar)).setColor((CanvasContextColor.getCachedColor(getContext(), mCanvasContext)));
    loading.setVisibility(View.VISIBLE);
}
Also used : RelativeLayout(android.widget.RelativeLayout) CircularProgressBar(com.instructure.speedgrader.views.CircularProgressBar)

Aggregations

CircularProgressBar (com.instructure.speedgrader.views.CircularProgressBar)3 HelveticaTextView (com.instructure.speedgrader.views.HelveticaTextView)2 View (android.view.View)1 ImageView (android.widget.ImageView)1 RelativeLayout (android.widget.RelativeLayout)1