سورس ScrollViewColors

با سلام و درود 

 

در این سورس Scroll View Colors یاد میگیرید که به آیتم های لود شده در اسکرول ویو چطوری برا کلیک و رها کردن کلیک رنگ بدید .

 

دانلود سورس

 

#Region  Project Attributes 
	#ApplicationLabel: ScrollViewColors
	#VersionCode: 1
	#VersionName:   
	'SupportedOrientations possible values: unspecified, landscape or portrait.
	#SupportedOrientations: unspecified
	#CanInstallToExternalStorage: False
#End Region


#Region  Activity Attributes 
	#FullScreen: False
	#IncludeTitle: True
#End Region

Sub Process_Globals
End Sub

Sub Globals
	
	Private ListView1 As ListView
	Dim click1,click2 As ColorDrawable
	Dim SLLVOnScroll1 As SLLVOnScroll

End Sub

Sub Activity_Create(FirstTime As Boolean)
	Activity.LoadLayout("1")
	
	click1.Initialize(Colors.Blue,0)  ' رنگ اول
	click2.Initialize(Colors.Red,0) 'رنگ دوم
	
	SLLVOnScroll1.Initialize(ListView1,"ListView1",click1,click2)
	
	For i = 0 To 100
		ListView1.AddSingleLine(" خط شماره "&i)
	Next
	ListView1.SingleLineLayout.Label.Gravity=Gravity.CENTER
	ListView1.SingleLineLayout.Label.Typeface=Typeface.LoadFromAssets("byekan.ttf")
	ListView1.FastScrollEnabled=True
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub ListView1_ItemClick (Position As Int, Value As Object)
	ToastMessageShow(Value,False)
End Sub

 

دیدگاهتان را بنویسید