رفتن به مطلب
انجمن اندروید ایران | آموزش برنامه نویسی اندروید و موبایل
  • android.png.1fab383bc8500cd93127cebc65b1dcab.png

مشکل =ران میکنم برای تست صفحه سفیده(شاید دیتابس مشکل دارد)


پست های پیشنهاد شده

دوستان مشکلم جدیه کمک کنید من کد فایل و عکس ارور را هم قرار دادم ممنون

[align=justify][align=left]    کد           =[shcode=java][/shcode][shcode=java][/shcode]#ApplicationLabel: کتاب

    #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

    'These global variables will be declared once when the application starts.

    'These variables can be accessed from all modules.

Dim timer1 As Timer

Dim s As SQL

Dim fasl As String

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 ImageView1 As ImageView

Private Scrollview1 As ScrollView

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("from")

   

    timer1.Initialize("Timer1",2000)

    timer1.Enabled=True

   

'    File.Delete(File.DirInternal,"data.db")

    If File.Exists(File.DirInternal,"data1.db")= False Then

    File.Copy(File.DirAssets,"data1.db",File.DirInternal,"data1.db")

    End If

   

    If s.IsInitialized=False Then

    s.Initialize(File.DirInternal,"data1.db",False)

    End If

   

    Dim cur As Cursor

    cur=s.ExecQuery("SELECT * FROM data1 ")

   

   

    Dim h As Int

    h=2%y

    For i =0 To cur.RowCount-1

    cur.Position=i

   

    Dim Btn As Button

    Btn.Initialize("Btn")

    Btn.Text=cur.GetString("Onvan")

    Btn.Tag=cur.GetInt("fasl")

   

    Dim b As BitmapDrawable

    b.Initialize(LoadBitmap(File.DirAssets,"f.png"))

   

    Btn.Background=b

    Scrollview1.Panel.AddView(Btn,0,h,40%x,25%y)

       

    h=h+27%y

    Next

End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub timer1_Tick

Dim an As Animation

an.InitializeAlpha("an",1,0)

an.Duration=1000

an.Start(ImageView1)

End Sub

Sub an_AnimationEnd

timer1.Enabled=False

ImageView1.Visible=False

End Sub

Sub Btn_Click

    Dim B As Button

    B=Sender

fasl=B.Tag

StartActivity(Act_matlab)

End Sub

[/align]

[/align]

[align=justify]    'These variables can be accessed from all modules.

End Sub

Sub Globals

[align=left]    'These global variables will be redeclared each time the activity is created.

    'These variables can only be accessed from this module.

    Private ImageView1 As ImageView

    Private ScrollView1 As ScrollView

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("from2")

   

    If File.Exists(File.DirInternal,"data1.db")=False Then

    File.Copy(File.DirAssets,"data1.db",File.DirInternal,"data1.db")

    End If

   

    If Main.s.IsInitialized=False Then

    Main.s.Initialize(File.DirInternal,"data1.db",False)

    End If

Dim cur As Cursor

cur=Main.s.ExecQuery("SELEKT *FROM data1 WHERE Fasl="&Main.fasl)

cur.Position=0

  ImageView1.Bitmap=Namayesh

 

  Dim label1 As Label

  label1.Initialize("Label1")

  label1.Text=cur.GetString("Matn")

 

  ScrollView1.Panel.AddView(label1,0,0,ScrollView1.Width,ScrollView1.Height)

  Dim su As StringUtils

  label1.TextSize=30

  label1.Height=su.MeasureMultilineTextHeight(label1,label1.Text)

  ScrollView1.Panel.Height=su.MeasureMultilineTextHeight(label1,label1.Text)+10%y

End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub Namayesh As Bitmap

Dim cur As Cursor

cur=Main.s.ExecQuery("SELEKT Aks FROM data1  WHERE Fasl="&Main.fasl)

cur.Position=0

Dim bytes() As Byte

bytes=cur.GetBlob("Aks")

Dim input As InputStream

input.InitializeFromBytesArray(bytes,0,bytes.Length)

Dim b As Bitmap

b.Initialize2(input)

input.Close

Return(b)

End Sub[/align]

[/align]


5841b7988df53_Screenshot-08_16_201505_57_28__ver001.png.df2eb36046fe67a99399e85b3125a214.png

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

سلام دوست عزیز

کوئری که نوشتین اشتباهه

سلکت و اشتباه نوشتین

[shcode=java]select * from data1 where Fasl=1[/shcode]

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

سلام دوست عزیز

کوئری که نوشتین اشتباهه

سلکت و اشتباه نوشتین

[shcode=java]select * from data1 where Fasl=1[/shcode]

ممنون ولی منظورتون نفهمیدم کویری کدوم خط اشتباه ودرستش میشه همینی که نوشتین؟

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

خود کوئری اشتباه نیست، کلمه select رو اشتباه نوشتید، یعنی به جای select نوشتید selekt. باید k رو پاک کنید و به جاش c بزارید.

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

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...