本文整理了Java中org.slf4j.Marker.equals()
方法的一些代码示例,展示了Marker.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Marker.equals()
方法的具体详情如下:
包路径:org.slf4j.Marker
类名称:Marker
方法名:equals
[英]Markers are considered equal if they have the same name.
[中]如果标记具有相同的名称,则认为它们是相等的。
代码示例来源:origin: stackoverflow.com
public class MarkerDemoActivity extends android.support.v4.app.FragmentActivity
implements OnMarkerClickListener
{
private Marker myMarker;
private void setUpMap()
{
.......
googleMap.setOnMarkerClickListener(this);
myMarker = googleMap.addMarker(new MarkerOptions()
.position(latLng)
.title("My Spot")
.snippet("This is my spot!")
.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)));
......
}
@Override
public boolean onMarkerClick(final Marker marker) {
if (marker.equals(myMarker))
{
//handle click here
}
}
}
代码示例来源:origin: wildfly/wildfly
public synchronized boolean remove(Marker referenceToRemove) {
if (referenceList == null) {
return false;
}
int size = referenceList.size();
for (int i = 0; i < size; i++) {
Marker m = referenceList.get(i);
if (referenceToRemove.equals(m)) {
referenceList.remove(i);
return true;
}
}
return false;
}
代码示例来源:origin: ch.qos.logback/logback-classic
if (other.marker != null)
return false;
} else if (!marker.equals(other.marker))
return false;
代码示例来源:origin: stackoverflow.com
// Since we are consuming the event this is necessary to
// manage closing opened markers before opening new ones
Marker lastOpened = null;
mMap.setOnMarkerClickListener(new OnMarkerClickListener() {
public boolean onMarkerClick(Marker marker) {
// Check if there is an open info window
if (lastOpened != null) {
// Close the info window
lastOpened.hideInfoWindow();
// Is the marker the same marker that was already open
if (lastOpened.equals(marker)) {
// Nullify the lastOpened object
lastOpened = null;
// Return so that the info window isn't opened again
return true;
}
}
// Open the info window for the marker
marker.showInfoWindow();
// Re-assign the last opened such that we can close it later
lastOpened = marker;
// Event was handled by our code do not launch default behaviour.
return true;
}
});
代码示例来源:origin: stackoverflow.com
// Since we are consuming the event this is necessary to
// manage closing openned markers before openning new ones
Marker lastOpenned = null;
mMap.setOnMarkerClickListener(new OnMarkerClickListener() {
public boolean onMarkerClick(Marker marker) {
// Check if there is an open info window
if (lastOpenned != null) {
// Close the info window
lastOpenned.hideInfoWindow();
// Is the marker the same marker that was already open
if (lastOpenned.equals(marker)) {
// Nullify the lastOpenned object
lastOpenned = null;
// Return so that the info window isn't openned again
return true;
}
}
// Open the info window for the marker
marker.showInfoWindow();
// Re-assign the last openned such that we can close it later
lastOpenned = marker;
// Event was handled by our code do not launch default behaviour.
return true;
}
});
代码示例来源:origin: camunda/camunda-bpm-platform
public synchronized boolean remove(Marker referenceToRemove) {
if (refereceList == null) {
return false;
}
int size = refereceList.size();
for (int i = 0; i < size; i++) {
Marker m = (Marker) refereceList.get(i);
if (referenceToRemove.equals(m)) {
refereceList.remove(i);
return true;
}
}
return false;
}
代码示例来源:origin: stackoverflow.com
if(o instanceof PicassoMarker) {
Marker marker = ((PicassoMarker) o).mMarker;
return mMarker.equals(marker);
} else {
return false;
代码示例来源:origin: stackoverflow.com
if (marker.equals(mPerth)) {
final Handler handler = new Handler();
final long start = SystemClock.uptimeMillis();
代码示例来源:origin: stackoverflow.com
@Override
public boolean onMarkerClick(Marker marker) {
// TODO Auto-generated method stub
if((marker.equals(mCustomerMarker)){
Toast.makeText(ShowMapWhenLoginActivity.this, "clicked", 100).show();
}
return false;
}
代码示例来源:origin: stackoverflow.com
googleMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {
@Override
public void onInfoWindowClick(Marker marker) {
if (marker.equals("s780"))
Toast.makeText(getActivity(), "Marker 727", Toast.LENGTH_SHORT).show();
else //You missed this else
if (marker.equals("s149"))
Toast.makeText(getActivity(), "Marker 725", Toast.LENGTH_SHORT).show();
else
Toast.makeText(getActivity(), "Argument:"+marker, Toast.LENGTH_SHORT).show();
代码示例来源:origin: stackoverflow.com
@Override
public boolean onMarkerClick(final Marker marker) {
if (marker.equals(myMarker))
{
//Do nothing
}
}
代码示例来源:origin: stackoverflow.com
@Override
public boolean onMarkerClick(final Marker marker) {
if (marker.equals(myMarker))
{
//handle click here
}
}
代码示例来源:origin: stackoverflow.com
/**
* handle marker click event
*/
@Override
public boolean onMarkerClick(Marker marker) {
// TODO Auto-generated method stub
if(marker.equals(marker_1)){
Log.w("Click", "test");
return true;
}
return false;
}
代码示例来源:origin: stackoverflow.com
@Override
public boolean onMarkerClick(final Marker marker) {
if (marker.equals(markerA)) {
// action fired when markerA is clicked
}else if(marker.equals(markerB)){
// action fired when markerA is clicked
}
return false;
}
代码示例来源:origin: stackoverflow.com
mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {
@Override
public boolean onMarkerClick(Marker marker) {
if (marker.equals(hashMarkers.get("the number of the marker"))) {
//here you can call your custom infoWindow or set the content
return true;
} else {
return false;
}
}
});
代码示例来源:origin: stackoverflow.com
mMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {
@Override
public void onInfoWindowClick(Marker marker) {
if(marker.equals(celMarker)){
Intent intent = new Intent(Map2.this, Balinsasayaw.class);
startActivity(intent);
}else if(marker.equals(chaMarker)){
Intent intent = new Intent(Map2.this, Chateu.class);
startActivity(intent);
}
}
});
代码示例来源:origin: stackoverflow.com
@Override
public boolean onMarkerClick(final Marker marker) {
if (marker.equals(myMarker)) {
//handle click here
marker.remove();
}
}
代码示例来源:origin: ch.qos.logback/logback-examples
@Override
public FilterReply decide(Marker marker, Logger logger, Level level, String format, Object[] params, Throwable t) {
if (!isStarted()) {
return FilterReply.NEUTRAL;
}
if ((markerToAccept.equals(marker))) {
return FilterReply.ACCEPT;
} else {
return FilterReply.NEUTRAL;
}
}
代码示例来源:origin: stackoverflow.com
mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {
@Override
public boolean onMarkerClick(Marker marker) {
if (marker.equals(mMarker))
marker.hideInfoWindow();
return true;
}
});
代码示例来源:origin: stackoverflow.com
mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {
Marker currentShown;
public boolean onMarkerClick(Marker marker) {
if (marker.equals(currentShown)) {
marker.hideInfoWindow();
currentShown = null;
} else {
marker.showInfoWindow();
currentShown = marker;
}
return true;
}
});
内容来源于网络,如有侵权,请联系作者删除!