title: How to Add Arraylist Lat Long value into new LatLng class
body: <p>Please Help me,
  I have stored my lat, long value into <code>arrayList&lt;String&gt;</code>, but I'm not able to add it to new LatLng class. </p>
  
  <p>I have to fetch Lat, Long value by <code>json</code> and add it to (String) <code>ArrayList&lt;String&gt;</code>.</p>
  
  <p>I want to add my all ArrayList Lat, Long into latlng class, where i can see it using polyline.</p>
  
  <p>But i'm able to get one lat and long and it shows in my google map. But i'm 
  not able to get all <code>ArrayList</code> value.
  I tried many times. And How to Measure Distance By Lat and Long
  Below is my code;</p>
  
  <pre><code>ArrayList&lt;String&gt; arr;
  
   if(b!=null){
             arr = (ArrayList&lt;String&gt;)b.getStringArrayList("array_list");
             // System.out.println(arr);
          }
      String s=arr.toString();
      System.out.println(s.substring(1, s.length()-1));
  
      String ss=s.substring(1,s.length()-1);
      System.out.println(ss);
      d=ss.split(",");
      for (int i=0;i&lt;d.length;i++){
          if(i%2==0){
              dd=d[i];
              System.out.println(dd +"all even");
          }else{
              nd=d[i];
  
              System.out.println(nd +"all odd");
          }
  
  
      }
  
      List&lt;LatLng&gt; point = new ArrayList&lt;LatLng&gt;();
      double pointY[]={Double.parseDouble(nd)};
      double pointX[]={Double.parseDouble(dd)};
      for (int i = 0 ; i &lt; pointX.length; i++){
  
          point.add(new LatLng(pointX[i],pointY[i]));
      }
  </code></pre>