本文整理汇总了Java中com.github.lzyzsd.circleprogress.DonutProgress.setProgress方法的典型用法代码示例。如果您正苦于以下问题:Java DonutProgress.setProgress方法的具体用法?Java DonutProgress.setProgress怎么用?Java DonutProgress.setProgress使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.github.lzyzsd.circleprogress.DonutProgress
的用法示例。
在下文中一共展示了DonutProgress.setProgress方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getView
import com.github.lzyzsd.circleprogress.DonutProgress; //导入方法依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View row = inflater.inflate(R.layout.cpu_wakelock_row, parent, false);
TextView wakelockName = row.findViewById(R.id.cpu_wakelock_name);
TextView packageNameView = row.findViewById(R.id.cpu_wakelock_duration);
TextView wakelockDetail = row.findViewById(R.id.cpu_wakelock_count);
ImageView packageIcon = row.findViewById(R.id.package_icon);
DonutProgress progress = row.findViewById(R.id.cpu_wakelock_progress);
Wakelock wakelock = partialWakelocks.get(position);
String packageName=wakelock.getFqn(UidNameResolver.getInstance());
Drawable drawable = wakelock.getIcon(UidNameResolver.getInstance());
if (drawable != null) {
packageIcon.setImageDrawable(drawable);
}
wakelockName.setText(wakelock.getName());
packageNameView.setText(packageName);
wakelockDetail.setText(DateUtils.formatDuration(wakelock.getDuration())
+ " Count: " + wakelock.getCount());
progress.setMax(totalTime);
progress.setProgress((wakelock.getDuration()*100)/totalTime);
return row;
}
示例2: getView
import com.github.lzyzsd.circleprogress.DonutProgress; //导入方法依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup container) {
View row = inflater.inflate(R.layout.alarm_trigger_custom_list_item1, container, false);
TextView AlarmPackageName = row.findViewById(R.id.alarm_package_name);
TextView WakeupCount = row.findViewById(R.id.wakeup_count);
TextView name = row.findViewById(R.id.alarm_appname);
ImageView icon = row.findViewById(R.id.alarm_icon);
DonutProgress progress = row.findViewById(R.id.donut_progress);
Alarm alarm = alarms.get(position);
icon.setImageDrawable(alarm.getIcon(uidNameResolver));
String packageName = alarm.getPackageName();
AlarmPackageName.setText(uidNameResolver.getLabel(packageName));
name.setText(packageName);
WakeupCount.setText("x" + alarm.getWakeups() + " times");
progress.setMax(100);
progress.setProgress(alarm.getWakeups() * 100 / totaltime);
return row;
}
示例3: getView
import com.github.lzyzsd.circleprogress.DonutProgress; //导入方法依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View rowView = inflater.inflate(R.layout.kernel_wakelock_row, parent, false);
TextView mKernelWakelock = rowView.findViewById(R.id.kernel_wakelock_name);
TextView WakeupInfo = rowView.findViewById(R.id.wakelock_duration);
TextView wakeUpCount = rowView.findViewById(R.id.kernel_wakelock_count);
DonutProgress progress = rowView.findViewById(R.id.donut_progress);
NativeKernelWakelock nativeWakeLock = kernelWakelocks.get(position);
String kernelWakelock = kernelWakelocks.get(position).getName();
mKernelWakelock.setText(kernelWakelock);
WakeupInfo.setText(SysUtils.secToString(nativeWakeLock.getDuration() / 1000));
progress.setMax(100);
progress.setProgress( nativeWakeLock.getDuration() * 100 / totaltime);
wakeUpCount.setText("x" + nativeWakeLock.getCount() + " " + context.getString(R.string.times));
return rowView;
}