Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3308640
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:32:43+00:00 2026-05-17T21:32:43+00:00

I need to input latitude and longitude separately in 2 EditText s and display

  • 0

I need to input latitude and longitude separately in 2 EditTexts and display the location at the click of a button. Somehow i’m not able to get the correct layout as i precisely require 2 EditTexts aligned side by side and a button below them.

Here is what i already have:

    <LinearLayout android:id="@+id/zoom" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_alignParentBottom="true" 
        android:layout_centerHorizontal="true" />

    <EditText  
        android:layout_width="wrap_content" 
        android:text="@+id/EditText01"      
        android:layout_height="wrap_content" 
        android:id="@+id/edLat" 
        android:layout_toRightOf="@+id/mapView">
    </EditText>
    <EditText 
        android:layout_marginLeft="-237dip"  
        android:layout_marginTop="100dip" 
        android:layout_width="wrap_content" 
        android:text="@+id/EditText01" 
        android:layout_height="wrap_content" 
        android:id="@+id/edLong" 
        android:layout_toRightOf="@+id/mapView">
    </EditText>
    <Button 
        android:layout_marginLeft="-237dip"            
        android:layout_marginTop="200dip" 
        android:layout_width="wrap_content" 
        android:text="Show Location" 
        android:layout_height="wrap_content" 
        android:id="@+id/btnShowLoc"  
        android:layout_toRightOf="@+id/mapView"></Button>

    <com.google.android.maps.MapView 

        android:id="@+id/mapView"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:enabled="true"
        android:clickable="true"
        android:apiKey="0p8EoZESYekrClENQbOlN5EN16DgXv7Rx0CPTMg" />

</LinearLayout>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T21:32:44+00:00Added an answer on May 17, 2026 at 9:32 pm

    The below code suits your requirements:

    <LinearLayout android:id="@+id/zoom" 
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content" 
            android:layout_alignParentBottom="true" 
            android:layout_centerHorizontal="true" 
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:orientation="vertical">
    
        <LinearLayout android:id="@+id/LinearLayout01" 
                      android:layout_width="wrap_content" 
                      android:layout_height="wrap_content"
                      android:orientation="horizontal">
    
              <EditText 
                android:layout_width="wrap_content"     
                android:layout_height="wrap_content"    
                android:id="@+id/edLat">
              </EditText>
    
              <EditText     
                android:layout_width="wrap_content"     
                android:layout_height="wrap_content"    
                android:id="@+id/edLong">
               </EditText>
        </LinearLayout>
    
        <Button 
            android:layout_width="wrap_content" 
            android:text="Show Location" 
            android:layout_height="wrap_content" 
            android:id="@+id/btnShowLoc">
        </Button>
    
        <com.google.android.maps.MapView 
    
            android:id="@+id/mapView"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:enabled="true"
            android:clickable="true"
            android:apiKey="0p8EoZESYekrClENQbOlN5EN16DgXv7Rx0CPTMg"
            />
    </LinearLayout>
    

    Note:

    you have written the below kind of code:

     <EditText android:layout_marginLeft="-237dip" android:layout_marginTop="100dip" android:layout_width="wrap_content" android:text="@+id/EditText01" android:layout_height="wrap_content" android:id="@+id/edLong" android:layout_toRightOf="@+id/mapView"></EditText>
    

    I would like to tell you that don’t give this kind of position to any control because in Android, there are different types of resolutions so it will not look the same design on every Android device.

    After seeing your code, i can say you should learn Layouts and code techniques first. Refer Android-sdk pages.

    Updated Answer with Images:<29-oct-2010>


    I think you forgot to add <uses-library android:name="com.google.android.maps" /> permission in AndroidManifest.xml file, add this permission inside the <application> tag.

    Check out the below image, the same above code working for me:

    alt text

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to be able to take an arbitrary text input that may have
i have an database with the values of latitude and longitude. i would need
I have given a location defined by latitude and longitude. Now i want to
We need some input on what is a good design pattern on using AJAX
I have a challenge I need some input on. I am currently recruiting programmers
I need to delete my input file securely once I have finished with it,
I need to capture the input stream from a microphone in my application, which
I need to validate the user input of a JSpinner , and if invalid,
I need a simple window with three input boxes and three labels (login name,
I need a modal dialog to gather some user input. I then need the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.