Java Code Examples for org.telegram.tgnet.TLRPC#TL_messageMediaVenue
The following examples show how to use
org.telegram.tgnet.TLRPC#TL_messageMediaVenue .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ChatAttachAlertLocationLayout.java From Telegram with GNU General Public License v2.0 | 5 votes |
private void updatePlacesMarkers(ArrayList<TLRPC.TL_messageMediaVenue> places) { if (places == null) { return; } for (int a = 0, N = placeMarkers.size(); a < N; a++) { placeMarkers.get(a).marker.remove(); } placeMarkers.clear(); for (int a = 0, N = places.size(); a < N; a++) { TLRPC.TL_messageMediaVenue venue = places.get(a); try { MarkerOptions options = new MarkerOptions().position(new LatLng(venue.geo.lat, venue.geo._long)); options.icon(BitmapDescriptorFactory.fromBitmap(createPlaceBitmap(a))); options.anchor(0.5f, 0.5f); options.title(venue.title); options.snippet(venue.address); VenueLocation venueLocation = new VenueLocation(); venueLocation.num = a; venueLocation.marker = googleMap.addMarker(options); venueLocation.venue = venue; venueLocation.marker.setTag(venueLocation); placeMarkers.add(venueLocation); } catch (Exception e) { FileLog.e(e); } } }
Example 2
Source File: LocationCell.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
public void setLocation(TLRPC.TL_messageMediaVenue location, String icon, boolean divider) { needDivider = divider; nameTextView.setText(location.title); addressTextView.setText(location.address); imageView.setImage(icon, null, null); setWillNotDraw(!divider); }
Example 3
Source File: LocationCell.java From Telegram with GNU General Public License v2.0 | 5 votes |
public void setLocation(TLRPC.TL_messageMediaVenue location, String icon, String label, int pos, boolean divider) { needDivider = divider; circleDrawable.getPaint().setColor(getColorForIndex(pos)); nameTextView.setText(location.title); if (label != null) { addressTextView.setText(label); } else { addressTextView.setText(location.address); } imageView.setImage(icon, null, null); setWillNotDraw(!divider); }
Example 4
Source File: LocationCell.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
public void setLocation(TLRPC.TL_messageMediaVenue location, String icon, boolean divider) { needDivider = divider; nameTextView.setText(location.title); addressTextView.setText(location.address); imageView.setImage(icon, null, null); setWillNotDraw(!divider); }
Example 5
Source File: LocationActivityAdapter.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
public Object getItem(int i) { if (locationType == LocationActivity.LOCATION_TYPE_GROUP) { if (addressName == null) { return null; } else { TLRPC.TL_messageMediaVenue venue = new TLRPC.TL_messageMediaVenue(); venue.address = addressName; venue.geo = new TLRPC.TL_geoPoint(); if (customLocation != null) { venue.geo.lat = customLocation.getLatitude(); venue.geo._long = customLocation.getLongitude(); } else if (gpsLocation != null) { venue.geo.lat = gpsLocation.getLatitude(); venue.geo._long = gpsLocation.getLongitude(); } return venue; } } else if (currentMessageObject != null) { if (i == 1) { return currentMessageObject; } else if (i > 4 && i < places.size() + 4) { return currentLiveLocations.get(i - 5); } } else if (locationType == 2) { if (i >= 2) { return currentLiveLocations.get(i - 2); } return null; } else if (locationType == 1) { if (i > 4 && i < places.size() + 5) { return places.get(i - 5); } } else { if (i > 3 && i < places.size() + 4) { return places.get(i - 4); } } return null; }
Example 6
Source File: LocationActivityAdapter.java From Telegram with GNU General Public License v2.0 | 5 votes |
public Object getItem(int i) { if (locationType == LocationActivity.LOCATION_TYPE_GROUP) { if (addressName == null) { return null; } else { TLRPC.TL_messageMediaVenue venue = new TLRPC.TL_messageMediaVenue(); venue.address = addressName; venue.geo = new TLRPC.TL_geoPoint(); if (customLocation != null) { venue.geo.lat = customLocation.getLatitude(); venue.geo._long = customLocation.getLongitude(); } else if (gpsLocation != null) { venue.geo.lat = gpsLocation.getLatitude(); venue.geo._long = gpsLocation.getLongitude(); } return venue; } } else if (currentMessageObject != null) { if (i == 1) { return currentMessageObject; } else if (i > 4 && i < places.size() + 4) { return currentLiveLocations.get(i - 5); } } else if (locationType == 2) { if (i >= 2) { return currentLiveLocations.get(i - 2); } return null; } else if (locationType == 1) { if (i > 4 && i < places.size() + 5) { return places.get(i - 5); } } else { if (i > 3 && i < places.size() + 4) { return places.get(i - 4); } } return null; }
Example 7
Source File: LocationActivity.java From Telegram with GNU General Public License v2.0 | 5 votes |
private void updatePlacesMarkers(ArrayList<TLRPC.TL_messageMediaVenue> places) { if (places == null) { return; } for (int a = 0, N = placeMarkers.size(); a < N; a++) { placeMarkers.get(a).marker.remove(); } placeMarkers.clear(); for (int a = 0, N = places.size(); a < N; a++) { TLRPC.TL_messageMediaVenue venue = places.get(a); try { MarkerOptions options = new MarkerOptions().position(new LatLng(venue.geo.lat, venue.geo._long)); options.icon(BitmapDescriptorFactory.fromBitmap(createPlaceBitmap(a))); options.anchor(0.5f, 0.5f); options.title(venue.title); options.snippet(venue.address); VenueLocation venueLocation = new VenueLocation(); venueLocation.num = a; venueLocation.marker = googleMap.addMarker(options); venueLocation.venue = venue; venueLocation.marker.setTag(venueLocation); placeMarkers.add(venueLocation); } catch (Exception e) { FileLog.e(e); } } }
Example 8
Source File: LocationCell.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
public void setLocation(TLRPC.TL_messageMediaVenue location, String icon, String label, int pos, boolean divider) { needDivider = divider; circleDrawable.getPaint().setColor(getColorForIndex(pos)); nameTextView.setText(location.title); if (label != null) { addressTextView.setText(label); } else { addressTextView.setText(location.address); } imageView.setImage(icon, null, null); setWillNotDraw(!divider); }
Example 9
Source File: LocationCell.java From Telegram-FOSS with GNU General Public License v2.0 | 4 votes |
public void setLocation(TLRPC.TL_messageMediaVenue location, String icon, int pos, boolean divider) { setLocation(location, icon, null, pos, divider); }
Example 10
Source File: LocationCell.java From Telegram with GNU General Public License v2.0 | 4 votes |
public void setLocation(TLRPC.TL_messageMediaVenue location, String icon, int pos, boolean divider) { setLocation(location, icon, null, pos, divider); }
Example 11
Source File: LocationActivitySearchAdapter.java From Telegram with GNU General Public License v2.0 | 4 votes |
public TLRPC.TL_messageMediaVenue getItem(int i) { if (i >= 0 && i < places.size()) { return places.get(i); } return null; }
Example 12
Source File: LocationActivitySearchAdapter.java From Telegram-FOSS with GNU General Public License v2.0 | 4 votes |
public TLRPC.TL_messageMediaVenue getItem(int i) { if (i >= 0 && i < places.size()) { return places.get(i); } return null; }
Example 13
Source File: LocationActivitySearchAdapter.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
public TLRPC.TL_messageMediaVenue getItem(int i) { if (i >= 0 && i < places.size()) { return places.get(i); } return null; }
Example 14
Source File: LocationActivitySearchAdapter.java From TelePlus-Android with GNU General Public License v2.0 | 4 votes |
public TLRPC.TL_messageMediaVenue getItem(int i) { if (i >= 0 && i < places.size()) { return places.get(i); } return null; }
Example 15
Source File: BaseLocationAdapter.java From TelePlus-Android with GNU General Public License v2.0 | votes |
void didLoadedSearchResult(ArrayList<TLRPC.TL_messageMediaVenue> places);
Example 16
Source File: BaseLocationAdapter.java From Telegram with GNU General Public License v2.0 | votes |
void didLoadSearchResult(ArrayList<TLRPC.TL_messageMediaVenue> places);
Example 17
Source File: BaseLocationAdapter.java From Telegram-FOSS with GNU General Public License v2.0 | votes |
void didLoadSearchResult(ArrayList<TLRPC.TL_messageMediaVenue> places);
Example 18
Source File: BaseLocationAdapter.java From TelePlus-Android with GNU General Public License v2.0 | votes |
void didLoadedSearchResult(ArrayList<TLRPC.TL_messageMediaVenue> places);