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

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

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

Address.setAddressLine介绍

暂无

代码示例

代码示例来源:origin: sytolk/TaxiAndroidOpen

  1. addr.setAddressLine(0, route + " " + streetNumber);

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

  1. gAddress.setAddressLine(addressIndex++, jResult.get("name").getAsString());
  2. gAddress.setThoroughfare(jResult.get("name").getAsString());
  3. displayName = jResult.get("name").getAsString();
  4. gAddress.setAddressLine(addressIndex++, jResult.get("postcode").getAsString());
  5. gAddress.setPostalCode(jResult.get("postcode").getAsString());
  6. displayName += ", " + jResult.get("postcode").getAsString();
  7. gAddress.setAddressLine(addressIndex++, jResult.get("city").getAsString());
  8. gAddress.setLocality(jResult.get("city").getAsString());
  9. displayName += ", " + jResult.get("city").getAsString();
  10. gAddress.setAddressLine(addressIndex++, jResult.get("country").getAsString());
  11. gAddress.setCountryName(jResult.get("country").getAsString());
  12. displayName += ", " + jResult.get("country").getAsString();

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

  1. gAddress.setAddressLine(addressIndex++, jAddress.get("road").getAsString());
  2. gAddress.setThoroughfare(jAddress.get("road").getAsString());
  3. gAddress.setAddressLine(addressIndex++, jAddress.get("postcode").getAsString());
  4. gAddress.setPostalCode(jAddress.get("postcode").getAsString());
  5. gAddress.setAddressLine(addressIndex++, jAddress.get("city").getAsString());
  6. gAddress.setLocality(jAddress.get("city").getAsString());
  7. } else if (jAddress.has("town")){
  8. gAddress.setAddressLine(addressIndex++, jAddress.get("town").getAsString());
  9. gAddress.setLocality(jAddress.get("town").getAsString());
  10. } else if (jAddress.has("village")){
  11. gAddress.setAddressLine(addressIndex++, jAddress.get("village").getAsString());
  12. gAddress.setLocality(jAddress.get("village").getAsString());
  13. gAddress.setAddressLine(addressIndex++, jAddress.get("country").getAsString());
  14. gAddress.setCountryName(jAddress.get("country").getAsString());

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

  1. address.setAddressLine(i, split[i]);

代码示例来源: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: 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. int numAddressLines = dis.readInt();
  2. for (int i = 0; i < numAddressLines; ++i) {
  3. address.setAddressLine(i, 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. }

相关文章