رفتن به مطلب
  • 0

معرفی کتابخانه ی ( LBubble ) +سورس + یه سوال


babi.jonz

سوال

سلام

این کتابخونه جالب رو میذارم که در حین لذت بردن

به سوال منم جواب بدید

میخوام یه ادیت تکست بدارم و یه باتن و متن های زیر هم قرار بگیرن عین برنامه های چت

در این سورس از اسکرول ویو استفاده شده

یه پست شبیه این زده بودم و به جواب هم رسیدم ولی کدهای این سورس فرق میکنه لطفا دانلود کنید و

راهنمایی.

buble.rar

post-4760-0-55200100-1472213303_thumb.png

لینک ارسال
به اشتراک گذاری در سایت های دیگر

2 پاسخ به این سوال تاکنون داده شده است

ارسال‌های توصیه شده

ممنون از کدی که قرار دادید

اصل مشکل شما واسه متغیر thetop بود که باید در Sub Globals تعریفش می کردید . کد رو یه خورده تغیر دادم ولی هنوز جای کار داره . خودتون ازش بر میاین

#Region  Project Attributes 
	#ApplicationLabel: B4A Example
	#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
    Dim ScrollView1 As ScrollView
    Dim bubble As LBubble
	Private Button1 As Button
	Private EditText1 As EditText
Dim thetop As Int=0
End Sub

Sub Activity_Create(FirstTime As Boolean)
	Activity.LoadLayout("main")
    Dim thetop As Int 'bubbles top
    ScrollView1.Initialize(100%y-30) ' scrollview bubble container
    Activity.AddView(ScrollView1,10,10,100%x-20,50%y-30) ' Add Scrollview to activity

    bubble.Initialize(Me,"thebubble") ' initialize LBubble

    ScrollView1.Panel.Width=ScrollView1.Width
    ScrollView1.Panel.Height=ScrollView1.Height
    thetop=20 'assign the top position of the first bubble
    bubble.Textsize=10 ' bubble text size
    bubble.TopTextsize=10 ' bubble title text size
    thetop=bubble.CreatelBubble(ScrollView1.Panel,"Lorem ipsum." & CRLF & "onsectetuer adipiscing elit, sed diam nonummy nibh euismod ...." & CRLF & "Lorem ipsum." & CRLF & "Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit" & CRLF & "Lorem itsum dolor.", "01-08-2013", thetop+20, 250, 3)
    thetop=bubble.CreatelBubble(ScrollView1.Panel,"Ok","Message-2", thetop+20, 350, 0)
    thetop=bubble.CreatelBubble(ScrollView1.Panel,"Lorem ipsum." & CRLF & "sed diam nonummy.", "Message-3", thetop+20, 350, 1)
    bubble.TopTextcolor=Colors.Red ' other bubble tittle color
    bubble.Textsize=10 ' other bubble text size
    bubble.TopTextsize=18 ' other bubble text size
    thetop=bubble.CreatelBubble(ScrollView1.Panel,"Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy...." & CRLF & "Lorem ipsum dolor." & CRLF & "Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper..." & CRLF & "Lorem ipsum dolor." & CRLF & "Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper...." & CRLF & "Loren ipsum." & CRLF & "in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui" & CRLF & "Lorem itsum." & CRLF & "et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilis....", "02-08-2013", thetop+20, 350, 2)
    If thetop>ScrollView1.Panel.Height Then ScrollView1.Panel.Height= thetop+30 ' Reallocate ScrollView1.Panel height
End Sub

Sub Activity_Resume
End Sub

Sub Activity_Pause (UserClosed As Boolean)
End Sub

Sub Button1_Click
	If EditText1.Text<>"" Then
		thetop=bubble.CreatelBubble(ScrollView1.Panel,EditText1.Text,EditText1.Text, thetop, 350, 0)
		Dim mu As StringUtils
		ScrollView1.ScrollPosition=ScrollView1.Panel.Height
		EditText1.Text=""
	End If
End Sub

لینک ارسال
به اشتراک گذاری در سایت های دیگر


Sub Process_Globals

End Sub

Sub Globals

Dim ScrollView1 As ScrollView

Dim bubble As LBubble

Private Button1 As Button

Private EditText1 As EditText

End Sub

Sub Activity_Create(FirstTime As Boolean)

Activity.LoadLayout("main")

Dim thetop As Int 'bubbles top

ScrollView1.Initialize(100%y-30) ' scrollview bubble container

Activity.AddView(ScrollView1,10,10,100%x-20,50%y-30) ' Add Scrollview to activity

bubble.Initialize(Me,"thebubble") ' initialize LBubble

ScrollView1.Panel.Width=ScrollView1.Width

ScrollView1.Panel.Height=ScrollView1.Height

thetop=20 'assign the top position of the first bubble

bubble.Textsize=10 ' bubble text size

bubble.TopTextsize=10 ' bubble title text size

' thetop=bubble.CreatelBubble(ScrollView1.Panel,"Lorem ipsum." & CRLF & "onsectetuer adipiscing elit, sed diam nonummy nibh euismod ...." & CRLF & "Lorem ipsum." & CRLF & "Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit" & CRLF & "Lorem itsum dolor.", "01-08-2013", thetop+20, 250, 3)

'thetop=bubble.CreatelBubble(ScrollView1.Panel,"Ok","Message-2", thetop+20, 350, 0)

'thetop=bubble.CreatelBubble(ScrollView1.Panel,"Lorem ipsum." & CRLF & "sed diam nonummy.", "Message-3", thetop+20, 350, 1)

bubble.TopTextcolor=Colors.Red ' other bubble tittle color

bubble.Textsize=10 ' other bubble text size

bubble.TopTextsize=18 ' other bubble text size

'thetop=bubble.CreatelBubble(ScrollView1.Panel,"Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy...." & CRLF & "Lorem ipsum dolor." & CRLF & "Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper..." & CRLF & "Lorem ipsum dolor." & CRLF & "Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper...." & CRLF & "Loren ipsum." & CRLF & "in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui" & CRLF & "Lorem itsum." & CRLF & "et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilis....", "02-08-2013", thetop+20, 350, 2)

If thetop>ScrollView1.Panel.Height Then ScrollView1.Panel.Height= thetop+30 ' Reallocate ScrollView1.Panel height

End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub Button1_Click

Dim thetop As Int

thetop=bubble.CreatelBubble(ScrollView1.Panel,EditText1.Text,EditText1.Text, thetop+0, 350, 0)

End Sub

لینک ارسال
به اشتراک گذاری در سایت های دیگر

بایگانی شده

این موضوع بایگانی و قفل شده و دیگر امکان ارسال پاسخ نیست.

  • کاربران آنلاین در این صفحه   0 کاربر

    • هیچ کاربر عضوی،در حال مشاهده این صفحه نیست.
×
×
  • اضافه کردن...