public class

NavTrafficBar

extends SimpleConfigurableView
implements NavUIComponent
java.lang.Object
   ↳ SimpleConfigurableView
     ↳ com.tencent.navix.ui.component.NavTrafficBar

Summary

Nested Classes
enum NavTrafficBar.Mode 进度条模式  
Public Constructors
NavTrafficBar(Context context)
在代码中直接new的时候,会调用一个参数构造方法
NavTrafficBar(Context context, AttributeSet attrs)
在xml中使用自定义控件的时候,不管有没有使用我们自己的自定义属性都会调用两个参数构造方法
NavTrafficBar(Context context, AttributeSet attrs, int defStyleAttr)
这个构造方法系统不会默认调用,需要我们自己主动调用
Public Methods
void reset()
重置路况条进度,通常在开始导航前调用
void setBorderColor(int color)
设置边框颜色
void setBorderWidth(int width)
设置边框宽度
void setCarIcon(Bitmap carIcon)
设置自车标图标
void setLineWidth(int width)
设置边框宽度
void setMode(NavTrafficBar.Mode mode)
设置进度条模式
void setTrafficColorOfErase(int color)
设置路况条颜色 - 已走过
void setTrafficColorOfJam(int color)
设置路况条颜色 - 拥堵
void setTrafficColorOfSlow(int color)
设置路况条颜色 - 缓慢
void setTrafficColorOfSmooth(int color)
设置路况条颜色 - 畅通
void setTrafficColorOfUnknown(int color)
设置路况条颜色 - 未知
void setTrafficColorOfVerySlow(int color)
设置路况条颜色 - 非常缓慢
void updateNavDataInfo(NavDriveDataInfo navDriveDataInfo)
更新路况条进度
void updateRouteTraffic(List<NavDriveRouteData> driveNavRoutes)
更新路况条路况
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public NavTrafficBar (Context context)

在代码中直接new的时候,会调用一个参数构造方法

public NavTrafficBar (Context context, AttributeSet attrs)

在xml中使用自定义控件的时候,不管有没有使用我们自己的自定义属性都会调用两个参数构造方法

public NavTrafficBar (Context context, AttributeSet attrs, int defStyleAttr)

这个构造方法系统不会默认调用,需要我们自己主动调用

Public Methods

public void reset ()

重置路况条进度,通常在开始导航前调用

public void setBorderColor (int color)

设置边框颜色

public void setBorderWidth (int width)

设置边框宽度

public void setCarIcon (Bitmap carIcon)

设置自车标图标

public void setLineWidth (int width)

设置边框宽度

public void setMode (NavTrafficBar.Mode mode)

设置进度条模式

public void setTrafficColorOfErase (int color)

设置路况条颜色 - 已走过

public void setTrafficColorOfJam (int color)

设置路况条颜色 - 拥堵

public void setTrafficColorOfSlow (int color)

设置路况条颜色 - 缓慢

public void setTrafficColorOfSmooth (int color)

设置路况条颜色 - 畅通

public void setTrafficColorOfUnknown (int color)

设置路况条颜色 - 未知

public void setTrafficColorOfVerySlow (int color)

设置路况条颜色 - 非常缓慢

public void updateNavDataInfo (NavDriveDataInfo navDriveDataInfo)

更新路况条进度

public void updateRouteTraffic (List<NavDriveRouteData> driveNavRoutes)

更新路况条路况