android.location.Address.setCountryCode()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(129)

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

Address.setCountryCode介绍

暂无

代码示例

代码示例来源:origin: thuryn/your-local-weather

  1. address.setAdminArea(a.optString(WIRE_ADMINAREA));
  2. address.setCountryName(a.optString(WIRE_COUNTRYNAME));
  3. address.setCountryCode(a.optString(WIRE_COUNTRYCODE));

代码示例来源:origin: org.robolectric/shadows-maps

  1. @Implementation
  2. public List<Address> getFromLocation(double latitude, double longitude, int maxResults) throws IOException {
  3. wasCalled = true;
  4. this.lastLatitude = latitude;
  5. this.lastLongitude = longitude;
  6. if (shouldSimulateGeocodeException) {
  7. throw new IOException("Simulated geocode exception");
  8. }
  9. Address address = makeAddress();
  10. address.setAddressLine(0, addressLine1);
  11. address.setLocality(city);
  12. address.setAdminArea(state);
  13. address.setPostalCode(zip);
  14. address.setCountryCode(countryCode);
  15. return Arrays.asList(address);
  16. }

代码示例来源:origin: MKergall/osmbonuspack

  1. gAddress.setCountryCode(jAddress.get("country_code").getAsString());

代码示例来源:origin: com.github.japgolly.android.test/robolectric

  1. @Implementation
  2. public List<Address> getFromLocation(double latitude, double longitude, int maxResults) throws IOException {
  3. wasCalled = true;
  4. this.lastLatitude = latitude;
  5. this.lastLongitude = longitude;
  6. if (shouldSimulateGeocodeException) {
  7. throw new IOException("Simulated geocode exception");
  8. }
  9. Address address = makeAddress();
  10. address.setAddressLine(0, addressLine1);
  11. address.setLocality(city);
  12. address.setAdminArea(state);
  13. address.setPostalCode(zip);
  14. address.setCountryCode(countryCode);
  15. return oneElementList(address);
  16. }

代码示例来源:origin: grzegorznittner/chanu

  1. address.setCountryCode(readUTF(dis));
  2. address.setPostalCode(readUTF(dis));
  3. address.setPhone(readUTF(dis));

代码示例来源:origin: CUTR-at-USF/OpenTripPlanner-for-Android

  1. public CustomAddress(Address address) {
  2. super(address.getLocale());
  3. for (int i = 0; i <= address.getMaxAddressLineIndex(); i++){
  4. super.setAddressLine(i, address.getAddressLine(i));
  5. }
  6. super.setFeatureName(address.getFeatureName());
  7. super.setAdminArea(address.getAdminArea());
  8. super.setSubAdminArea(address.getSubAdminArea());
  9. super.setLocality(address.getLocality());
  10. super.setSubLocality(address.getSubLocality());
  11. super.setThoroughfare(address.getThoroughfare());
  12. super.setSubThoroughfare(address.getSubThoroughfare());
  13. super.setPostalCode(address.getPostalCode());
  14. super.setCountryCode(address.getCountryCode());
  15. super.setCountryName(address.getCountryName());
  16. super.setLatitude(address.getLatitude());
  17. super.setLongitude(address.getLongitude());
  18. super.setPhone(address.getPhone());
  19. super.setUrl(address.getUrl());
  20. super.setExtras(address.getExtras());
  21. }

相关文章