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);
}
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);
}
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));
}
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);
}
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);
}
Aggregations