Android Question Resolved: save content of Better Sliding Panels

Discussion in 'Android Questions' started by anOparator, Jul 2, 2015.

  1. anOparator

    anOparator Active Member Licensed User

    I added editText to sliding panels.
    EditText.text and the log for Left_Click shows changes happening, but I have been unable to Save a file after updating it.

    Please send info/help on saving editText with these scripted views.

    Thanks for all references.
     
    Last edited: Jul 2, 2015
  2. anOparator

    anOparator Active Member Licensed User

    Code:
    Sub Process_Globals
      
    Dim i As Int 'Create the views
    Code:
    Sub Globals
       
    Dim sd As SlidingData 'The object that holds the data for SlidingPanels
       Dim story As EditText
    Code:
    Sub Activity_Create(FirstTime As Boolean)
       
    'Create the panels.
       'In this example we are just creating 6 "dummy" panels with different colors.
       'It is possible to load a layout for each panel but this is slow and initializing the GUI
       'will take some time. It is really better to manually create the complete by code here.
    If FirstTime Then
       
    If File.Exists(File.DirDefaultExternal, "0.txt") = False Then
       
    File.Copy(File.DirAssets, "0.txt"File.DirDefaultExternal, "0.txt")
       
    File.Copy(File.DirAssets, "1.txt"File.DirDefaultExternal, "1.txt")
       
    File.Copy(File.DirAssets, "2.txt"File.DirDefaultExternal, "2.txt")
       
    End If
    End If
       
    Dim panels(3As Panel
       
    For i = 0 To panels.Length - 1
         panels(i).Initialize(
    "panels")
         panels(i).Color = 
    Colors.White
         story.Initialize(
    "")
         story.Text = 
    File.ReadString(File.DirDefaultExternal,  i & ".txt")
         story.TextSize = 
    20
         story.TextColor = 
    Colors.Black
         story.Gravity = 
    1
         panels(i).AddView(story, 
    5595%x430dip)
         
    Activity.AddView(panels(i), 100%x0100%x100%y - 80dip'add the panel to the layout
       Next
    Code:
    Sub Left_Click
       ChangePanel(SlidingPanels.PANEL_LEFT)

       
    'The next line cycles .txt files on device screen
    File.ReadString(File.DirDefaultExternal, sd.currentPanel  & ".txt")
       
    Log (story.Text)  ' Only shows file # 2 of the panel array in the log.
       Log ("CLICK TO FILE # "  & sd.currentPanel & ".txt")
    Am trying to show the device screen contents in the log. By knowing the object name to log I should the be able to :banghead Save the file. :banghead
     

    Attached Files:

  3. anOparator

    anOparator Active Member Licensed User

    mySolution,
    Using ActionBar, it's more efficient for the task , bye bye Android 2.2 :(
     
Loading...