Step by step,just use HorizontalStepView,VerticalStepView. step indicator,flow indicator,timeline,order process,express status .This is a WRAP from This Github Project.
StepView
Version: 0.2
Version: 0.2
- HorizontalStepView
Fields:- ba As anywheresoftware.b4a.BA
- DesignerCreateView (base As anywheresoftware.b4a.objects.PanelWrapper, lw As anywheresoftware.b4a.objects.LabelWrapper, props As anywheresoftware.b4a.objects.collections.Map) As void
- IsInitialized As boolean
- Initialize (ba As anywheresoftware.b4a.BA, EventName As java.lang.String) As void
- BringToFront As void
- SetLayout (arg0 As int, arg1 As int, arg2 As int, arg3 As int) As void
- SendToBack As void
- SetVisibleAnimated (arg0 As int, arg1 As boolean) As void
- RemoveView As void
- AddToParent (Parent As android.view.ViewGroup, left As int, top As int, width As int, height As int) As void
- Invalidate3 (arg0 As int, arg1 As int, arg2 As int, arg3 As int) As void
- Invalidate2 (arg0 As android.graphics.Rect) As void
- SetColorAnimated (arg0 As int, arg1 As int, arg2 As int) As void
- SetBackgroundImageNew (arg0 As android.graphics.Bitmap) As anywheresoftware.b4a.objects.drawable.BitmapDrawable
- Invalidate As void
- SetLayoutAnimated (arg0 As int, arg1 As int, arg2 As int, arg3 As int, arg4 As int) As void
- RequestFocus As boolean
- StepsViewIndicatorUnCompletedLineColor As int [write only]
- Left As int
- Background As android.graphics.drawable.Drawable
- Parent As java.lang.Object [read only]
- StepsViewIndicatorDefaultIcon As android.graphics.drawable.Drawable [write only]
- Color As int [write only]
- TextSize As int [write only]
- Enabled As boolean
- StepViewComplectedTextColor As int [write only]
- StepsViewIndicatorCompleteIcon As android.graphics.drawable.Drawable [write only]
- StepsViewIndicatorCompletedLineColor As int [write only]
- StepViewTexts As java.util.List [write only]
- Top As int
- Visible As boolean
- Padding As int[]
- Height As int
- Tag As java.lang.Object
- Width As int
- StepsViewIndicatorAttentionIcon As android.graphics.drawable.Drawable [write only]
- StepViewUnComplectedTextColor As int [write only]
- StepBean
Fields:- STEP_UNDO As int
- STEP_COMPLETED As int
- STEP_CURRENT As int
- IsInitialized As boolean
- Initialize (name As java.lang.String, state As int) As void
- State As int
- Name As java.lang.String
- VerticalStepView
Fields:- ba As anywheresoftware.b4a.BA
- DesignerCreateView (base As anywheresoftware.b4a.objects.PanelWrapper, lw As anywheresoftware.b4a.objects.LabelWrapper, props As anywheresoftware.b4a.objects.collections.Map) As void
- IsInitialized As boolean
- Initialize (ba As anywheresoftware.b4a.BA, EventName As java.lang.String) As void
- BringToFront As void
- SetLayout (arg0 As int, arg1 As int, arg2 As int, arg3 As int) As void
- SendToBack As void
- SetVisibleAnimated (arg0 As int, arg1 As boolean) As void
- reverseDraw (isReverSe As boolean) As void
- RemoveView As void
- AddToParent (Parent As android.view.ViewGroup, left As int, top As int, width As int, height As int) As void
- Invalidate3 (arg0 As int, arg1 As int, arg2 As int, arg3 As int) As void
- Invalidate2 (arg0 As android.graphics.Rect) As void
- SetColorAnimated (arg0 As int, arg1 As int, arg2 As int) As void
- SetBackgroundImageNew (arg0 As android.graphics.Bitmap) As anywheresoftware.b4a.objects.drawable.BitmapDrawable
- Invalidate As void
- SetLayoutAnimated (arg0 As int, arg1 As int, arg2 As int, arg3 As int, arg4 As int) As void
- RequestFocus As boolean
- StepsViewIndicatorUnCompletedLineColor As int [write only]
- Left As int
- Background As android.graphics.drawable.Drawable
- Parent As java.lang.Object [read only]
- StepsViewIndicatorDefaultIcon As android.graphics.drawable.Drawable [write only]
- Color As int [write only]
- TextSize As int [write only]
- Enabled As boolean
- StepsViewIndicatorComplectingPosition As int [write only]
- StepViewComplectedTextColor As int [write only]
- StepsViewIndicatorCompleteIcon As android.graphics.drawable.Drawable [write only]
- StepsViewIndicatorCompletedLineColor As int [write only]
- StepViewTexts As java.util.List [write only]
- Top As int
- Visible As boolean
- Padding As int[]
- Height As int
- Tag As java.lang.Object
- Width As int
- StepsViewIndicatorAttentionIcon As android.graphics.drawable.Drawable [write only]
- StepViewUnComplectedTextColor As int [write only]
Fields:- uncompleted_color As int
- uncompleted_text_color As int
Fields:- complted As int
- attention As int
- default_icon As int
Fields:- widget_horizontal_stepsview As int
- widget_vertical_stepsview As int
Fields:- steps_indicator As int
- rl_text_container As int
B4X:
#Region Project Attributes
#ApplicationLabel: StepViewB4A
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#AdditionalRes: ..\res
#AdditionalJar: com.android.support:support-v4
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private HorizontalStepView1 As HorizontalStepView
Private VerticalStepView1 As VerticalStepView
Dim stepsBeanList,list0 As List
Dim stepBean0,stepBean1,stepBean2,stepBean3,stepBean4,stepBean5 As StepBean
Dim bdCompleted,bdDefault,bdAttention As BitmapDrawable
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Layout1")
stepsBeanList.Initialize
list0.Initialize
'bdCompleted.Initialize(LoadBitmap(File.DirAssets,"complted.png"))
'bdDefault.Initialize(LoadBitmap(File.DirAssets,"default_icon.png"))
'bdAttention.Initialize(LoadBitmap(File.DirAssets,"attention.png"))
bdCompleted.Initialize(LoadBitmap(File.DirAssets,"checked.png"))
bdDefault.Initialize(LoadBitmap(File.DirAssets,"neutral.png"))
bdAttention.Initialize(LoadBitmap(File.DirAssets,"hourglass.png"))
stepBean0.Initialize("1-接单",stepBean0.STEP_COMPLETED)
stepBean1.Initialize("2-打包",stepBean0.STEP_COMPLETED)
stepBean2.Initialize("3-出发",stepBean0.STEP_CURRENT)
stepBean3.Initialize("4-送单",stepBean0.STEP_CURRENT)
stepBean4.Initialize("5-完成",stepBean0.STEP_UNDO)
stepBean5.Initialize("6-支付",stepBean0.STEP_UNDO)
stepsBeanList.add(stepBean0)
stepsBeanList.add(stepBean1)
stepsBeanList.add(stepBean2)
stepsBeanList.add(stepBean3)
stepsBeanList.add(stepBean4)
stepsBeanList.add(stepBean5)
HorizontalStepView1.StepViewTexts = stepsBeanList
HorizontalStepView1.TextSize = 16
HorizontalStepView1.StepsViewIndicatorCompletedLineColor = Colors.Green
HorizontalStepView1.StepsViewIndicatorUnCompletedLineColor = Colors.Red
HorizontalStepView1.StepViewComplectedTextColor = Colors.Green
HorizontalStepView1.StepViewUnComplectedTextColor= Colors.Yellow
HorizontalStepView1.StepsViewIndicatorCompleteIcon= bdCompleted
HorizontalStepView1.StepsViewIndicatorDefaultIcon= bdDefault
HorizontalStepView1.StepsViewIndicatorAttentionIcon= bdAttention
list0.add("1-您已提交定单,等待系统确认")
list0.add("2-您的商品需要从外地调拨,我们会尽快处理,请耐心等待")
list0.add("3-您的订单已经进入亚洲第一仓储中心1号库准备出库")
list0.add("4-您的订单预计6月23日送达您的手中,618期间促销火爆,可能影响送货时间,请您谅解,我们会第一时间送到您的手中")
list0.add("5-您的订单已打印完毕")
list0.add("6-您的订单已拣货完成")
list0.add("7-扫描员已经扫描")
list0.add("8-打包成功")
list0.add("9-您的订单在京东【华东外单分拣中心】发货完成,准备送往京东【北京通州分拣中心】")
list0.add("10-您的订单在京东【北京通州分拣中心】分拣完成")
list0.add("11-您的订单在京东【北京通州分拣中心】发货完成,准备送往京东【北京中关村大厦站】")
list0.add("12-您的订单在京东【北京中关村大厦站】验货完成,正在分配配送员")
list0.add("13-配送员【包牙齿】已出发,联系电话【130-0000-0000】,感谢您的耐心等待,参加评价还能赢取好多礼物哦")
list0.add("14-感谢你在京东购物,欢迎你下次光临!")
VerticalStepView1.StepsViewIndicatorComplectingPosition = (list0.Size - 9)
VerticalStepView1.reverseDraw(False)
VerticalStepView1.TextSize= 14
VerticalStepView1.StepViewTexts= list0
VerticalStepView1.StepsViewIndicatorCompletedLineColor = Colors.Green
VerticalStepView1.StepsViewIndicatorUnCompletedLineColor = Colors.Red
VerticalStepView1.StepViewComplectedTextColor = Colors.Green
VerticalStepView1.StepViewUnComplectedTextColor= Colors.Yellow
VerticalStepView1.StepsViewIndicatorCompleteIcon= bdCompleted
VerticalStepView1.StepsViewIndicatorDefaultIcon= bdDefault
VerticalStepView1.StepsViewIndicatorAttentionIcon= bdAttention
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub