Search in sources :

Example 36 with ProgressBar

use of android.widget.ProgressBar in project android_frameworks_base by ResurrectionRemix.

the class NotificationTemplateViewWrapper method resolveTemplateViews.

private void resolveTemplateViews(StatusBarNotification notification) {
    mPicture = (ImageView) mView.findViewById(com.android.internal.R.id.right_icon);
    mPicture.setTag(ImageTransformState.ICON_TAG, notification.getNotification().getLargeIcon());
    mTitle = (TextView) mView.findViewById(com.android.internal.R.id.title);
    mText = (TextView) mView.findViewById(com.android.internal.R.id.text);
    final View progress = mView.findViewById(com.android.internal.R.id.progress);
    if (progress instanceof ProgressBar) {
        mProgressBar = (ProgressBar) progress;
    } else {
        // It's still a viewstub
        mProgressBar = null;
    }
    mActionsContainer = mView.findViewById(com.android.internal.R.id.actions_container);
}
Also used : TextView(android.widget.TextView) ImageView(android.widget.ImageView) View(android.view.View) TransformableView(com.android.systemui.statusbar.TransformableView) ProgressBar(android.widget.ProgressBar)

Example 37 with ProgressBar

use of android.widget.ProgressBar in project android_frameworks_base by ResurrectionRemix.

the class RevealActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    final LinearLayout layout = new LinearLayout(this);
    layout.setOrientation(LinearLayout.VERTICAL);
    ProgressBar spinner = new ProgressBar(this, null, android.R.attr.progressBarStyleLarge);
    layout.addView(spinner, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
    View revealView = new MyView(this);
    layout.addView(revealView, new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
    setContentView(layout);
    revealView.setOnClickListener(this);
}
Also used : LayoutParams(android.widget.LinearLayout.LayoutParams) ProgressBar(android.widget.ProgressBar) View(android.view.View) LinearLayout(android.widget.LinearLayout)

Example 38 with ProgressBar

use of android.widget.ProgressBar in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class ProcessStatsMemDetail method addDetailsItem.

private void addDetailsItem(ViewGroup parent, CharSequence title, float level, CharSequence value) {
    LayoutInflater inflater = getActivity().getLayoutInflater();
    ViewGroup item = (ViewGroup) inflater.inflate(R.layout.app_item, null);
    inflater.inflate(R.layout.widget_progress_bar, (ViewGroup) item.findViewById(android.R.id.widget_frame));
    parent.addView(item);
    item.findViewById(android.R.id.icon).setVisibility(View.GONE);
    TextView titleView = (TextView) item.findViewById(android.R.id.title);
    TextView valueView = (TextView) item.findViewById(android.R.id.text1);
    titleView.setText(title);
    valueView.setText(value);
    ProgressBar progress = (ProgressBar) item.findViewById(android.R.id.progress);
    progress.setProgress(Math.round(level * 100));
}
Also used : ViewGroup(android.view.ViewGroup) LayoutInflater(android.view.LayoutInflater) TextView(android.widget.TextView) ProgressBar(android.widget.ProgressBar)

Example 39 with ProgressBar

use of android.widget.ProgressBar in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class StorageVolumePreference method onBindViewHolder.

@Override
public void onBindViewHolder(PreferenceViewHolder view) {
    final ImageView unmount = (ImageView) view.findViewById(R.id.unmount);
    if (unmount != null) {
        unmount.setImageTintList(ColorStateList.valueOf(Color.parseColor("#8a000000")));
        unmount.setOnClickListener(mUnmountListener);
    }
    final ProgressBar progress = (ProgressBar) view.findViewById(android.R.id.progress);
    if (mVolume.getType() == VolumeInfo.TYPE_PRIVATE && mUsedPercent != -1) {
        progress.setVisibility(View.VISIBLE);
        progress.setProgress(mUsedPercent);
        progress.setProgressTintList(ColorStateList.valueOf(mColor));
    } else {
        progress.setVisibility(View.GONE);
    }
    super.onBindViewHolder(view);
}
Also used : ImageView(android.widget.ImageView) ProgressBar(android.widget.ProgressBar)

Example 40 with ProgressBar

use of android.widget.ProgressBar in project android_frameworks_base by ResurrectionRemix.

the class ActionBarView method initIndeterminateProgress.

public void initIndeterminateProgress() {
    mIndeterminateProgressView = new ProgressBar(mContext, null, 0, mIndeterminateProgressStyle);
    mIndeterminateProgressView.setId(R.id.progress_circular);
    mIndeterminateProgressView.setVisibility(GONE);
    addView(mIndeterminateProgressView);
}
Also used : ProgressBar(android.widget.ProgressBar)

Aggregations

ProgressBar (android.widget.ProgressBar)193 TextView (android.widget.TextView)66 View (android.view.View)63 ImageView (android.widget.ImageView)41 LinearLayout (android.widget.LinearLayout)30 Context (android.content.Context)18 ViewGroup (android.view.ViewGroup)16 WindowManager (android.view.WindowManager)14 FrameLayout (android.widget.FrameLayout)14 Drawable (android.graphics.drawable.Drawable)13 Dialog (android.app.Dialog)12 Button (android.widget.Button)12 RelativeLayout (android.widget.RelativeLayout)12 LayoutInflater (android.view.LayoutInflater)11 SuppressLint (android.annotation.SuppressLint)10 LayoutParams (android.widget.LinearLayout.LayoutParams)9 Intent (android.content.Intent)8 LayoutParams (android.view.ViewGroup.LayoutParams)8 AlertDialog (android.app.AlertDialog)7 TypedArray (android.content.res.TypedArray)7