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


Java Speedometer类代码示例

本文整理汇总了Java中com.github.anastr.speedviewlib.Speedometer的典型用法代码示例。如果您正苦于以下问题:Java Speedometer类的具体用法?Java Speedometer怎么用?Java Speedometer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Speedometer类属于com.github.anastr.speedviewlib包,在下文中一共展示了Speedometer类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initSpeedView

import com.github.anastr.speedviewlib.Speedometer; //导入依赖的package包/类
private void initSpeedView() {
    svATMO.setTrembleDegree(0.1F);
    svATMO.setMinMaxSpeed(1, 10);
    svATMO.setStartEndDegree(180, 360);
    svATMO.setIndicator(Indicator.Indicators.SpindleIndicator);
    svATMO.setLowSpeedPercent(30);
    svATMO.setMediumSpeedPercent(70);
    svATMO.setSpeedometerTextRightToLeft(true);
    svATMO.setUnit("");
    svATMO.setLowSpeedColor(0xFF0099CC);
    svATMO.setMediumSpeedColor(0xFFFF8800);
    svATMO.setHighSpeedColor(0xFFFF1744);
    svATMO.setTickNumber(10);
    svATMO.setSpeedTextSize(0);
    svATMO.setSpeedTextPosition(Speedometer.Position.TOP_CENTER);
}
 
开发者ID:MadiBreizh,项目名称:ATMO972,代码行数:17,代码来源:MainActivity.java

示例2: CharacterViewHolder

import com.github.anastr.speedviewlib.Speedometer; //导入依赖的package包/类
CharacterViewHolder(View itemView) {
    super(itemView);
    iv_icon = (ImageView) itemView.findViewById(R.id.iv_icon);
    tv_name = (TextView) itemView.findViewById(R.id.tv_name);
    speedometer = (Speedometer) itemView.findViewById(R.id.speedometer);
}
 
开发者ID:anastr,项目名称:SpongebobList,代码行数:7,代码来源:MainActivity.java

示例3: onItemSelected

import com.github.anastr.speedviewlib.Speedometer; //导入依赖的package包/类
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
    speedometer.setSpeedometerMode(Speedometer.Mode.values()[position]);
    // simple usage:
    // speedometer.setSpeedometerMode(Speedometer.Mode.RIGHT);
}
 
开发者ID:anastr,项目名称:SpeedView,代码行数:7,代码来源:WorkWithModesActivity.java

示例4: onItemSelected

import com.github.anastr.speedviewlib.Speedometer; //导入依赖的package包/类
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
    speedometer.setSpeedTextPosition(Speedometer.Position.values()[position]);
    // simple usage:
    // speedometer.setSpeedTextPosition(Speedometer.Position.TOP_LEFT);
}
 
开发者ID:anastr,项目名称:SpeedView,代码行数:7,代码来源:SpeedTextPositionActivity.java

示例5: updateData

import com.github.anastr.speedviewlib.Speedometer; //导入依赖的package包/类
private void updateData(Speedometer speedometer) {
    this.viewSize = speedometer.getSize();
    this.speedometerWidth = speedometer.getSpeedometerWidth();
    this.padding = speedometer.getPadding();
    this.inEditMode = speedometer.isInEditMode();
}
 
开发者ID:anastr,项目名称:SpeedView,代码行数:7,代码来源:Indicator.java

示例6: onSizeChange

import com.github.anastr.speedviewlib.Speedometer; //导入依赖的package包/类
/**
 * must call in {@code speedometer.onSizeChanged()}
 * @param speedometer target speedometer.
 */
public void onSizeChange(Speedometer speedometer) {
    setTargetSpeedometer(speedometer);
}
 
开发者ID:anastr,项目名称:SpeedView,代码行数:8,代码来源:Indicator.java

示例7: setTargetSpeedometer

import com.github.anastr.speedviewlib.Speedometer; //导入依赖的package包/类
/**
 * to change indicator's data,
 * this method called by the library.
 * @param speedometer target speedometer.
 */
public void setTargetSpeedometer(Speedometer speedometer) {
    updateData(speedometer);
    updateIndicator();
}
 
开发者ID:anastr,项目名称:SpeedView,代码行数:10,代码来源:Indicator.java


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