hi to all
my question and objective is simples
i want to make a simple text save and open
button1 save
button2 open
questions
1- how i make to when a user click at button1 open a edittext to user put a name and save the file.txt
exemple: i m click at button1 open a textbox and i put name : teste , the app save a Textos/teste.txt ??
2- how can i click in button2 and select the file i want?
for exemple i m click at button 2 and show me all files in Textos folder and i select what i want, teste.txt for exemple ? *-*
this code is working to save and open but i cant save with the name i want
and i cant open a file i want in the texto folder *-*
thx to all
remember i m not programmer only curious xD
my question and objective is simples
i want to make a simple text save and open
button1 save
button2 open
questions
1- how i make to when a user click at button1 open a edittext to user put a name and save the file.txt
exemple: i m click at button1 open a textbox and i put name : teste , the app save a Textos/teste.txt ??
2- how can i click in button2 and select the file i want?
for exemple i m click at button 2 and show me all files in Textos folder and i select what i want, teste.txt for exemple ? *-*
this code is working to save and open but i cant save with the name i want
and i cant open a file i want in the texto folder *-*
B4X:
Sub Button1_Click
If EditText1.Text.Length > 0 Then
File.WriteString(File.DirRootExternal, "Textos/1.txt", EditText1.Text)
'Msgbox=("Seu Texto foi salvo com sucesso na pasta Textos", "Like Apps")
Msgbox("Seu Texto foi salvo com sucesso na pasta Textos", "")
Else
' Msgbox=("Entre com o texto antes de salvar!","Like Apps")
Msgbox("Entre com o texto antes de salvar", "")
End If
End Sub
Sub Button2_Click
EditText1.Text = File.ReadString(File.DirRootExternal, "Textos/1.txt")
End Sub
thx to all
remember i m not programmer only curious xD