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

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

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

Address.toString介绍

暂无

代码示例

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

  1. public static void appendLog(Context context, String tag, String text1, double value1, String text2, double value2, String text3, long value3, String text4, Address value4) {
  2. checkPreferences(context);
  3. if (!logToFileEnabled || (logFilePathname == null)) {
  4. return;
  5. }
  6. appendLog(context, tag, text1, String.valueOf(value1), text2, String.valueOf(value2), text3, String.valueOf(value3), text4, (value4 != null)? value4.toString() : "null");
  7. }

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

  1. public static void appendLog(Context context, String tag, String text1, Address value1) {
  2. checkPreferences(context);
  3. if (!logToFileEnabled || (logFilePathname == null)) {
  4. return;
  5. }
  6. appendLog(context, tag, text1, (value1 != null)? value1.toString() : "null");
  7. }

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

  1. public static void appendLog(Context context, String tag, String text1, android.location.Location value1, String text2, Address value2) {
  2. checkPreferences(context);
  3. if (!logToFileEnabled || (logFilePathname == null)) {
  4. return;
  5. }
  6. appendLog(context, tag, text1, (value1 != null)? value1.toString() : "null", text2, (value2 != null)? value2.toString() : "null");
  7. }

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

  1. private void geoLocate(){
  2. Log.d(TAG, "geoLocate: geolocating");
  3. String searchString = mSearchText.getText().toString();
  4. Geocoder geocoder = new Geocoder(MapActivity.this);
  5. List<Address> list = new ArrayList<>();
  6. try{
  7. list = geocoder.getFromLocationName(searchString, 1);
  8. }catch (IOException e){
  9. Log.e(TAG, "geoLocate: IOException: " + e.getMessage() );
  10. }
  11. if(list.size() > 0){
  12. Address address = list.get(0);
  13. Log.d(TAG, "geoLocate: found a location: " + address.toString());
  14. //Toast.makeText(this, address.toString(), Toast.LENGTH_SHORT).show();
  15. moveCamera(new LatLng(address.getLatitude(), address.getLongitude()), DEFAULT_ZOOM,
  16. address.getAddressLine(0));
  17. }
  18. }

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

  1. Log.i(TAG, address.toString());

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

  1. Log.i(TAG, gAddr.toString());
  2. if (gAddr.getLocality() != null) {
  3. this.mapRequest.setCity(gAddr.getLocality());

相关文章