Android Question Extra edit text box

Discussion in 'Android Questions' started by cadcamman, Mar 7, 2015.

  1. cadcamman

    cadcamman Member Licensed User

    Hi All

    can anyone help

    On my latest program I have had to add an additional (not used) edit text box or i get the finished button instead of the next button before the last edit text box in my program when i run it.

    cheers

    cadcamman
     
  2. mangojack

    mangojack Well-Known Member Licensed User

    Without seeing any code its difficult to know why the 'Finished' button is presented prior to the last Edit Text ..

    One option is to Force the 'Next' button. See This ...
     
  3. cadcamman

    cadcamman Member Licensed User

    Hi Mangojack

    thanks for the reply this is the code for my program it is only a simple one im not a very experience programmer i created the layout with the designer. i have tried deleting all the edit text boxes and recreating them but i always get the same result, there is an option to force done but not to force next this is set to false on all of the edittext boxes

    cheers cadcamman


    #Region Project Attributes
    #ApplicationLabel: rad
    #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.

    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.

    Dim Edt_p1_x As EditText
    Dim Edt_p1_y As EditText
    Dim Edt_p2_x As EditText
    Dim Edt_p2_y As EditText
    Dim Edt_p3_x As EditText
    Dim Edt_p3_y As EditText

    Dim p1_x As Float
    Dim p1_y As Float
    Dim p2_x As Float
    Dim p2_y As Float
    Dim p3_x As Float
    Dim p3_y As Float

    Dim a As Float
    Dim b As Float
    Dim c As Float
    Dim s As Float
    Dim z As Float
    Dim R As Float

    'Dim TheArea As Float
    'Dim Radius As Float

    Private Button1 As Button
    Private Label1 As Label
    Private Label2 As Label
    Private Label3 As Label
    Private Label4 As Label
    Private Label5 As Label
    Private Label6 As Label
    Private Label7 As Label
    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("Layout1")



    End Sub
    Sub calc

    Try
    p1_x = Edt_p1_x.Text
    Catch
    p1_x = 4
    End Try

    Try
    p1_y = Edt_p1_y.Text
    Catch
    p1_y = 1
    End Try

    Try
    p2_x = Edt_p2_x.Text
    Catch
    p2_x = -3
    End Try

    Try
    p2_y = Edt_p2_y.Text
    Catch
    p2_y = 7
    End Try

    Try
    p3_x = Edt_p3_x.Text
    Catch
    p3_x = 5
    End Try

    Try
    p3_y = Edt_p3_y.Text
    Catch
    p3_y = -2
    End Try

    a = Sqrt((Power((p1_x - p2_x),2) + Power((p1_y - p2_y),2))) 'points
    b = Sqrt((Power((p2_x - p3_x),2) + Power((p2_y - p3_y),2)))
    c = Sqrt((Power((p3_x - p1_x),2) + Power((p3_y - p1_y),2)))
    s = (a+b+c)/2
    z = Sqrt(s*(s-a)*(s-b)*(s-c))' Area of triangle
    R = a*b*c/(4*z) 'radius

    End Sub
    Sub Activity_Resume

    End Sub

    Sub Activity_Pause (UserClosed As Boolean)

    End Sub

    Sub Button1_Click
    calc
    End Sub
     
  4. mangojack

    mangojack Well-Known Member Licensed User

    Please use [code] Insert your code here ...[/code] when posting code .

    The designer does NOT have a 'Force Next' setting .. but you can do so in code.
    Did you read the thread link in the above post ? (remember to Add the Java Object library to your project)
     
    Cableguy likes this.
  5. Cableguy

    Cableguy Expert Licensed User

    Just how many times has this been written. .. ah if I could have 1 euro for each....
     
    RandomCoder, DonManfred and mangojack like this.
  6. Mahares

    Mahares Well Known Member Licensed User

    This is the most common mistake on the forum, particularly and justifiably from new users. What @Erel needs to do is for the first 5 threads of any user for instance, is to force the user to read the 'Posting Code Procedure' before the thread is posted to make sure no one overlooks the process of posting code.
     
    Cableguy and mangojack like this.
  7. cadcamman

    cadcamman Member Licensed User

    Thanks Mangojack that worked fine, still cant understand though why it was needed, it only gets that problem if i have six edittext boxes

    thanks again
    cadcamman
     
  8. mangojack

    mangojack Well-Known Member Licensed User

    Info like that would have been useful in your initial post. I did a test with 5 EDT's ...
    When I get time I will test with 6.
     
    DonManfred likes this.
  9. cadcamman

    cadcamman Member Licensed User

    Sorry, Didn't discover it was only with six till after
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice