java - Android LayoutInflater get EditText Data -


This is my GoogleMapAPI, I believe users can first type marker information, and then create markers You can use it for

But log cat always has the "string marker Infoco = marker InfoGate text (.) ToString ();" Unsuccessful

Sorry I'm a newbie for coding. Please help me

  public void onMapLongClick (last LatLng point) {AlertDialog.Builder builder1 = new AlertDialog.Builder (it). Builder1.setTitle (R.string.funtion); builder1.setItems (options, new DialogInterface.OnClickListener () {public void onClick (DialogInterface communicate, integer SelectedItem) {Toast.makeText (MainActivity.this, "[SelectedItem] you select the letter" + option, Toast.LENGTH_SHORT). show (); dialog.dismiss (); if (SelectedItem == 1) {AlertDialog.Builder builder2; context mContext = MainActivity.this; LayoutInflater inflater = getLayoutInflater (); builder2 = new AlertDialog.Builder (mContext); markerInfo = ( EditText) findViewById (R.id.markerInfo); builder2.setView (inflater.inflate (R.layout.markerinfo, nULL)) .setPositiveButton (R.string.OK, new DialogInterface.OnClickListener () {public void onClick (DialogInterface marker , Int id) {string markerInfo = markerInfo.getText () toString () ;. map.addMarker (New Mar kerOptions () .position (point) .title (MarkerInfo) .icon (BitmapDescriptorFactory.defaultMarker (BitmapDescriptorFactory.HUE_RED)));}}) .setNegativeButton (R.string.cancel, New DialogInterface.OnClickListener () {public void click (DialogInterface marker, int id) {}}); Builder2.setTitle (R.string.typeinfo); Alert Dialog Marker = Builder 2.create (); Marker.show (); }}}); Alert Demo Warning = builder 1.create (); Alert.show (); }    

R.id.markerInfo is declared that insido markerinfo.xml , you EditText

  code> markerinfo.xml  for the "blown" version Have to use. Inflater.inflate (R. Late Marcarinfo, Faucet); MarkerInfo = (Editing Text) view.findViewById (R.id.markerInfo); Builder2.setView (see);    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -