I have a checkbox that a user selects to append text to a file and I keep getting this error
" java.lang.ClassCastException: java.io.BufferedWriter cannot be cast to android.content.Intent
This is the code I am using. When the user clicks the checkbox append the word test into a file.
:sign0104: Hope this code is right. Thanks as always for any help or guidance
Sub CheckBoxShowImage_CheckedChange(Checked As Boolean)
Dim cb As TextReader
cb.Initialize(File.OpenInput(DirName, FileName))
Dim ck As TextWriter
ck.Initialize(File.OpenOutput(DirName, FileName, False))
ck.WriteLine("test") ' writes test to file
myImageView.Initialize(myImageView)
If Checked = True Then
StartActivity(ck)
myImageView.Visible = True
Else
myImageView.Visible = False
End If
End Sub
" java.lang.ClassCastException: java.io.BufferedWriter cannot be cast to android.content.Intent
This is the code I am using. When the user clicks the checkbox append the word test into a file.
:sign0104: Hope this code is right. Thanks as always for any help or guidance
Sub CheckBoxShowImage_CheckedChange(Checked As Boolean)
Dim cb As TextReader
cb.Initialize(File.OpenInput(DirName, FileName))
Dim ck As TextWriter
ck.Initialize(File.OpenOutput(DirName, FileName, False))
ck.WriteLine("test") ' writes test to file
myImageView.Initialize(myImageView)
If Checked = True Then
StartActivity(ck)
myImageView.Visible = True
Else
myImageView.Visible = False
End If
End Sub