com.google.android.gms.maps.model.Marker.getSnippet()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(7.7k)|赞(0)|评价(0)|浏览(195)

本文整理了Java中com.google.android.gms.maps.model.Marker.getSnippet()方法的一些代码示例,展示了Marker.getSnippet()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Marker.getSnippet()方法的具体详情如下:
包路径:com.google.android.gms.maps.model.Marker
类名称:Marker
方法名:getSnippet

Marker.getSnippet介绍

暂无

代码示例

代码示例来源:origin: commonsguy/cw-omnibus

@SuppressLint("InflateParams")
 @Override
 public View getInfoContents(Marker marker) {
  if (popup == null) {
   popup=inflater.inflate(R.layout.popup, null);
  }

  TextView tv=(TextView)popup.findViewById(R.id.title);

  tv.setText(marker.getTitle());
  tv=(TextView)popup.findViewById(R.id.snippet);
  tv.setText(marker.getSnippet());

  return(popup);
 }
}

代码示例来源:origin: commonsguy/cw-omnibus

@SuppressLint("InflateParams")
 @Override
 public View getInfoContents(Marker marker) {
  if (popup == null) {
   popup=inflater.inflate(R.layout.popup, null);
  }

  TextView tv=(TextView)popup.findViewById(R.id.title);

  tv.setText(marker.getTitle());
  tv=(TextView)popup.findViewById(R.id.snippet);
  tv.setText(marker.getSnippet());

  return(popup);
 }
}

代码示例来源:origin: commonsguy/cw-omnibus

@SuppressLint("InflateParams")
 @Override
 public View getInfoContents(Marker marker) {
  if (popup == null) {
   popup=inflater.inflate(R.layout.popup, null);
  }

  TextView tv=(TextView)popup.findViewById(R.id.title);

  tv.setText(marker.getTitle());
  tv=(TextView)popup.findViewById(R.id.snippet);
  tv.setText(marker.getSnippet());

  return(popup);
 }
}

代码示例来源:origin: commonsguy/cw-omnibus

@SuppressLint("InflateParams")
 @Override
 public View getInfoContents(Marker marker) {
  if (popup == null) {
   popup=inflater.inflate(R.layout.popup, null);
  }

  TextView tv=(TextView)popup.findViewById(R.id.title);

  tv.setText(marker.getTitle());
  tv=(TextView)popup.findViewById(R.id.snippet);
  tv.setText(marker.getSnippet());

  return(popup);
 }
}

代码示例来源:origin: commonsguy/cw-omnibus

@SuppressLint("InflateParams")
 @Override
 public View getInfoContents(Marker marker) {
  if (popup == null) {
   popup=inflater.inflate(R.layout.popup, null);
  }

  TextView tv=(TextView)popup.findViewById(R.id.title);

  tv.setText(marker.getTitle());
  tv=(TextView)popup.findViewById(R.id.snippet);
  tv.setText(marker.getSnippet());

  return(popup);
 }
}

代码示例来源:origin: commonsguy/cw-omnibus

@SuppressLint("InflateParams")
 @Override
 public View getInfoContents(Marker marker) {
  if (popup == null) {
   popup=inflater.inflate(R.layout.popup, null);
  }

  TextView tv=(TextView)popup.findViewById(R.id.title);

  tv.setText(marker.getTitle());
  tv=(TextView)popup.findViewById(R.id.snippet);
  tv.setText(marker.getSnippet());

  return(popup);
 }
}

代码示例来源:origin: googlemaps/android-maps-utils

public View getInfoContents(Marker arg0) {
    View view =  LayoutInflater.from(mContext).inflate(R.layout.amu_info_window, null);
    TextView infoWindowText = (TextView) view.findViewById(R.id.window);
    if (arg0.getSnippet() != null) {
      infoWindowText.setText(Html.fromHtml(arg0.getTitle() + "<br>" + arg0.getSnippet()));
    } else {
      infoWindowText.setText(Html.fromHtml(arg0.getTitle()));
    }
    return view;
  }
});

代码示例来源:origin: square/assertj-android

public MarkerAssert hasSnippet(String snippet) {
 isNotNull();
 String actualSnippet = actual.getSnippet();
 assertThat(actualSnippet) //
   .overridingErrorMessage("Expected snippet <%s> but was <%s>.", snippet, actualSnippet) //
   .isEqualTo(snippet);
 return this;
}

代码示例来源:origin: commonsguy/cw-omnibus

@SuppressLint("InflateParams")
@Override
public View getInfoContents(Marker marker) {
 if (popup == null) {
  popup=inflater.inflate(R.layout.popup, null);
 }
 if (lastMarker == null
   || !lastMarker.getId().equals(marker.getId())) {
  lastMarker=marker;
  TextView tv=(TextView)popup.findViewById(R.id.title);
  tv.setText(marker.getTitle());
  tv=(TextView)popup.findViewById(R.id.snippet);
  tv.setText(marker.getSnippet());
  Uri image=images.get(marker.getId());
  ImageView icon=(ImageView)popup.findViewById(R.id.icon);
  if (image == null) {
   icon.setVisibility(View.GONE);
  }
  else {
   icon.setVisibility(View.VISIBLE);
   Picasso.with(ctxt).load(image).resize(iconWidth, iconHeight)
       .centerCrop().noFade()
       .placeholder(R.drawable.placeholder)
       .into(icon, new MarkerCallback(marker));
  }
 }
 return(popup);
}

代码示例来源:origin: googlemaps/android-samples

@Override
  public View getInfoContents(Marker marker) {
    // Inflate the layouts for the info window, title and snippet.
    View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,
        (FrameLayout) findViewById(R.id.map), false);
    TextView title = ((TextView) infoWindow.findViewById(R.id.title));
    title.setText(marker.getTitle());
    TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));
    snippet.setText(marker.getSnippet());
    return infoWindow;
  }
});

代码示例来源:origin: googlemaps/android-samples

String snippet = marker.getSnippet();
TextView snippetUi = ((TextView) view.findViewById(R.id.snippet));
if (snippet != null && snippet.length() > 12) {

代码示例来源:origin: SkyTreasure/Airbnb-Android-Google-Map-View

@Override
 public View getInfoContents(Marker marker) {
  View popup=inflater.inflate(R.layout.marker_tooltip, null);

  TextView tv=(TextView)popup.findViewById(R.id.title);

  tv.setText(marker.getTitle());
  tv=(TextView)popup.findViewById(R.id.snippet);
  tv.setText(marker.getSnippet());

  return(popup);
 }
}

代码示例来源:origin: mg6maciej/android-maps-extensions

public String getSnippet() {
  if (marker != null) {
    return marker.getSnippet();
  } else {
    return markerOptions.getSnippet();
  }
}

代码示例来源:origin: wiglenet/wigle-wifi-wardriving

public View getInfoContents(Marker arg0) {
    View view =  LayoutInflater.from(mContext).inflate(R.layout.amu_info_window, null);
    TextView infoWindowText = (TextView) view.findViewById(R.id.window);
    if (arg0.getSnippet() != null) {
      infoWindowText.setText(Html.fromHtml(arg0.getTitle() + "<br>" + arg0.getSnippet()));
    } else {
      infoWindowText.setText(Html.fromHtml(arg0.getTitle()));
    }
    return view;
  }
});

代码示例来源:origin: mitchtabian/Google-Maps-Google-Places

private void rendowWindowText(Marker marker, View view){
  String title = marker.getTitle();
  TextView tvTitle = (TextView) view.findViewById(R.id.title);
  if(!title.equals("")){
    tvTitle.setText(title);
  }
  String snippet = marker.getSnippet();
  TextView tvSnippet = (TextView) view.findViewById(R.id.snippet);
  if(!snippet.equals("")){
    tvSnippet.setText(snippet);
  }
}

代码示例来源:origin: zadr50/Gojek

@Override
public void onInfoWindowClick(Marker marker) {
  Toast.makeText(this, marker.getTitle()+" - " + marker.getSnippet(), Toast.LENGTH_LONG).show();
}

代码示例来源:origin: zadr50/Gojek

@SuppressLint("InflateParams")
  @Override
  public View getInfoContents(Marker marker) {
    if (popup == null) {
      popup=inflater.inflate(R.layout.popup, null);
    }

    TextView tv=(TextView)popup.findViewById(R.id.title);

    tv.setText(marker.getTitle());
    tv=(TextView)popup.findViewById(R.id.snippet);
    tv.setText(marker.getSnippet());

    return(popup);
  }
}

代码示例来源:origin: zadr50/Gojek

@SuppressLint("InflateParams")
  @Override
  public View getInfoContents(Marker marker) {
    if (popup == null) {
      popup=inflater.inflate(R.layout.popup, null);
    }

    TextView tv=(TextView)popup.findViewById(R.id.title);

    tv.setText(marker.getTitle());
    tv=(TextView)popup.findViewById(R.id.snippet);
    tv.setText(marker.getSnippet());

    return(popup);
  }
}

代码示例来源:origin: livroandroid/5ed

@Override
  public View getInfoContents(Marker marker) {
    // View com o conteúdo
    LinearLayout linear = new LinearLayout(getBaseContext());
    linear.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));
    linear.setOrientation(LinearLayout.VERTICAL);
    
    TextView tTitle = new TextView(getBaseContext());
    tTitle.setText(marker.getTitle());
    tTitle.setTextColor(Color.RED);
    linear.addView(tTitle);
    
    TextView tSnippet = new TextView(getBaseContext());
    tSnippet.setText(marker.getSnippet());
    tSnippet.setTextColor(Color.BLUE);
    linear.addView(tSnippet);
    return linear;
  }
});

代码示例来源:origin: zadr50/Gojek

private boolean acceptOrder() {
  boolean ret=false;
  Penumpang penumpang = new Penumpang(this);
  mNoHpPenumpang = mSelMarker.getSnippet();
  if (penumpang.AcceptOrder(mNomorHp, mNoHpPenumpang)){
    ret=true;
  }
  return ret;
}
private void getLocation() {

相关文章