Address setSubAdminArea - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Address setSubAdminArea method.

This code example shows how to use the following methods:setAdminArea, setFeatureName, setLatitude, setLocality, setLongitude
         * sub admin area 
         * locality 
         * thoroughfare 
         * feature name 
         */ 
        final Address a = new Address(Locale.getDefault());
 
        a.setLongitude(in.readDouble());
        a.setLatitude(in.readDouble());
        final String admin = in.readUTF();
        final String subAdmin = in.readUTF();
        final String locality = in.readUTF();
        final String thoroughfare = in.readUTF();
        final String feature = in.readUTF();
 
        if (admin.length() > 0)
            a.setAdminArea(admin);
        if (subAdmin.length() > 0)
            a.setSubAdminArea(subAdmin);
        if (locality.length() > 0)

5
CodeRank
This code example shows how to use the following methods:setAddressLine, setAdminArea, setExtras, setFeatureName, setLatitude
				Log.e(TAG, "Geocoder API response status not ok -- status=" + status);
				throw new RoutyException("There was a problem understanding an address."); 
			} else {  
				// TODO status is ok - parse the XML into an Address object 
				int lineNumber = 0;
				Address result = new Address(Locale.getDefault());
				 
				expr = "/GeocodeResponse/result";
				NodeList results = (NodeList) xpath.evaluate(expr, root, XPathConstants.NODESET);
				if (results.getLength() == 0) {
					return null; 
				} 
				 
				// GET THE PLACE NAME (ESTABLISHMENT) IF THERE IS ONE (EX. "UNIVERSITY OF TEXAS") 
				expr = "/GeocodeResponse/result[1]/address_component[type=\"establishment\"]/long_name";
				String establishment = (String) xpath.evaluate(expr, root, XPathConstants.STRING);
				result.setFeatureName(establishment);
//				Log.v(TAG, "establishment=" + establishment); 
				 
				// GET THE STREET NUMBER AND NAME 

5
CodeRank
This code example shows how to use the following methods:setSubAdminArea
	/** 
	 * @param subAdminArea 
	 * @see android.location.Address#setSubAdminArea(java.lang.String) 
	 */ 
	public void setSubAdminArea(String subAdminArea) {
		delegate.setSubAdminArea(subAdminArea);
	} 
 
	/** 
	 * @param sublocality 
	 * @see android.location.Address#setSubLocality(java.lang.String) 
	 */ 
	public void setSubLocality(String sublocality) {
		delegate.setSubLocality(sublocality);
	} 
 
	/** 
	 * @param subthoroughfare 
	 * @see android.location.Address#setSubThoroughfare(java.lang.String) 
	 */ 
3
CodeRank

Related Address setSubAdminArea Questions & Answers:

setSubAdminArea Method Overview
Sets the sub-administrative area name of the address to the given String, which may be null
See Code Examples for other Android Address Methods: