当前位置: 首页>>代码示例>>Java>>正文


Java DonutProgress.setProgress方法代码示例

本文整理汇总了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;
}
 
开发者ID:rahulkumar66,项目名称:Performance-Tweaker,代码行数:24,代码来源:CpuWakelocksAdapter.java

示例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;
}
 
开发者ID:rahulkumar66,项目名称:Performance-Tweaker,代码行数:20,代码来源:AlarmTriggerAdapter.java

示例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;
}
 
开发者ID:rahulkumar66,项目名称:Performance-Tweaker,代码行数:19,代码来源:KernelWakelockAdapter.java


注:本文中的com.github.lzyzsd.circleprogress.DonutProgress.setProgress方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。