Class Info |
|---|
public final class UserAddress 用户地址信息,用户选择某地址后返回的数据。 |
Qualifier and Type | Method Name and Description |
|---|---|
UserAddress | parseIntent(Intent data) 从Intent对象中解析出用户选择的地址信息。 |
String | 返回第一行地址。如果省略,则默认为“”。 |
String | 返回第二行地址。如果省略,则默认为“”。 |
String | 返回第三行地址。如果省略,则默认为“”。 |
String | 返回第四行地址。如果省略,则默认为“”。 |
String | 返回第五行地址。如果省略,则默认为“”。 |
String | 返回行政区域名称。如果省略,则默认为“”。 |
String | 返回公司名称。如果省略,则默认为“”。 |
String | 返回国家名称。如果省略,则默认为“”。 |
String | 返回国家码。如果省略,则默认为“”。 |
String | 返回Email地址。如果省略,则默认为“”。 |
String | 返回城市或城镇等信息。如果省略,则默认为“”。 |
String | getName() 返回姓名信息。如果省略,则默认为“”。 |
String | 返回移动电话号码。如果省略,则默认为“”。 |
String | 返回邮政编码。如果省略,则默认为“”。 |
Method |
|---|
public static UserAddress parseIntent(Intent data) 从Intent对象中解析用户地址数据,在Activity的onActivityResult中调用。 用户在选择地址后,地址结果信息将会携带在intent对象中,通过onActivityResult方法返回,使用parseIntent方法可以从Intent对象中解析出用户选择的地址信息。 |
Parameters
Name | Description |
|---|---|
data | 包含用户地址数据的Intent对象。 |
Returns
Type | Description |
|---|---|
UserAddress | 用户地址信息,用户选择某地址后返回的数据。 |
Method |
|---|
public final String getAddressLine1() 返回第一行地址。 |
Returns
Type | Description |
|---|---|
String | 第一行地址。如果省略,则默认为“”。 |
Method |
|---|
public final String getAddressLine2() 返回第二行地址。 |
Returns
Type | Description |
|---|---|
String | 第二行地址。如果省略,则默认为“”。 |
Method |
|---|
public final String getAddressLine3() 返回第三行地址。 |
Returns
Type | Description |
|---|---|
String | 第三行地址。如果省略,则默认为“”。 |
Method |
|---|
public final String getAddressLine4() 返回第四行地址。 |
Returns
Type | Description |
|---|---|
String | 第四行地址。如果省略,则默认为“”。 |
Method |
|---|
public final String getAddressLine5() 返回第五行地址。 |
Returns
Type | Description |
|---|---|
String | 第五行地址。如果省略,则默认为“”。 |
Method |
|---|
public final String getAdministrativeArea() 返回行政区域名称。 |
Returns
Type | Description |
|---|---|
String | 行政区域名称。如果省略,则默认为“”。 |
Method |
|---|
public final String getCompanyName() 返回公司名称。 |
Returns
Type | Description |
|---|---|
String | 公司名称。如果省略,则默认为“”。 |
Method |
|---|
public final String getCountryCode() 返回国家名称。 |
Returns
Type | Description |
|---|---|
String | 国家名称。如果省略,则默认为“”。 |
Method |
|---|
public final String getCountryISOCode() 返回国家码。 |
Returns
Type | Description |
|---|---|
String | 国家码。参见ISO 3166标准,如US、CN、MY。如果省略,则默认为“”。 |
Method |
|---|
public final String getEmailAddress() 返回Email地址。 |
Returns
Type | Description |
|---|---|
String | Email地址。如果省略,则默认为“”。 |
Method |
|---|
public final String getLocality() 返回城市或城镇等信息。 |
Returns
Type | Description |
|---|---|
String | 城市或城镇等信息。如果省略,则默认为“”。 |
Method |
|---|
public final String getName() 返回姓名信息。 |
Returns
Type | Description |
|---|---|
String | 姓名信息。如果省略,则默认为“”。 |