本文整理匯總了Java中android.net.Uri.getQueryParameters方法的典型用法代碼示例。如果您正苦於以下問題:Java Uri.getQueryParameters方法的具體用法?Java Uri.getQueryParameters怎麽用?Java Uri.getQueryParameters使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.net.Uri
的用法示例。
在下文中一共展示了Uri.getQueryParameters方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: parseDecodeFormats
import android.net.Uri; //導入方法依賴的package包/類
static Vector<BarcodeFormat> parseDecodeFormats(Uri inputUri) {
List<String> formats = inputUri.getQueryParameters(Intents.Scan.SCAN_FORMATS);
if (formats != null && formats.size() == 1 && formats.get(0) != null){
formats = Arrays.asList(COMMA_PATTERN.split(formats.get(0)));
}
return parseDecodeFormats(formats, inputUri.getQueryParameter(Intents.Scan.MODE));
}
示例2: parseDecodeFormats
import android.net.Uri; //導入方法依賴的package包/類
static Vector<BarcodeFormat> parseDecodeFormats(Uri inputUri) {
List<String> formats = inputUri.getQueryParameters(Intents.Scan.SCAN_FORMATS);
if (formats != null && formats.size() == 1 && formats.get(0) != null) {
formats = Arrays.asList(COMMA_PATTERN.split(formats.get(0)));
}
return parseDecodeFormats(formats, inputUri.getQueryParameter(Intents.Scan.MODE));
}
示例3: parseDecodeFormats
import android.net.Uri; //導入方法依賴的package包/類
static Collection<BarcodeFormat> parseDecodeFormats(Uri inputUri) {
List<String> formats = inputUri.getQueryParameters(Intents.Scan.FORMATS);
if (formats != null && formats.size() == 1 && formats.get(0) != null){
formats = Arrays.asList(COMMA_PATTERN.split(formats.get(0)));
}
return parseDecodeFormats(formats, inputUri.getQueryParameter(Intents.Scan.MODE));
}
示例4: parseDecodeFormats
import android.net.Uri; //導入方法依賴的package包/類
static Set<BarcodeFormat> parseDecodeFormats(Uri inputUri) {
List<String> formats = inputUri.getQueryParameters(Intents.Scan.FORMATS);
if (formats != null && formats.size() == 1 && formats.get(0) != null) {
formats = Arrays.asList(COMMA_PATTERN.split(formats.get(0)));
}
return parseDecodeFormats(formats, inputUri.getQueryParameter(Intents.Scan.MODE));
}
示例5: getQueryParams
import android.net.Uri; //導入方法依賴的package包/類
private static Map<String, String> getQueryParams(Request<?> request) {
Uri uri = Uri.parse(request.getUrl());
Map<String, String> result = new HashMap<>();
for (String key : uri.getQueryParameterNames()) {
for (String value : uri.getQueryParameters(key)) {
if (result.containsKey(key)) {
result.put(key, result.get(key) + ";" + value);
} else {
result.put(key, value);
}
}
}
return result;
}
示例6: parseDecodeFormats
import android.net.Uri; //導入方法依賴的package包/類
static Set<BarcodeFormat> parseDecodeFormats(Uri inputUri) {
List<String> formats = inputUri.getQueryParameters(Intents.Scan.FORMATS);
if (formats != null && formats.size() == 1 && formats.get(0) != null) {
formats = Arrays.asList(COMMA_PATTERN.split(formats.get(0)));
}
return parseDecodeFormats(formats, inputUri.getQueryParameter(Intents.Scan.MODE));
}
示例7: parseDecodeFormats
import android.net.Uri; //導入方法依賴的package包/類
public static Set<BarcodeFormat> parseDecodeFormats(Uri inputUri) {
List<String> formats = inputUri.getQueryParameters(Intents.Scan.FORMATS);
if (formats != null && formats.size() == 1 && formats.get(0) != null){
formats = Arrays.asList(COMMA_PATTERN.split(formats.get(0)));
}
return parseDecodeFormats(formats, inputUri.getQueryParameter(Intents.Scan.MODE));
}
示例8: parseDecodeFormats
import android.net.Uri; //導入方法依賴的package包/類
public static Vector<BarcodeFormat> parseDecodeFormats(Uri inputUri) {
List<String> formats = inputUri.getQueryParameters(Intents.Scan.SCAN_FORMATS);
if (formats != null && formats.size() == 1 && formats.get(0) != null) {
formats = Arrays.asList(COMMA_PATTERN.split(formats.get(0)));
}
return parseDecodeFormats(formats, inputUri.getQueryParameter(Intents.Scan.MODE));
}
示例9: from
import android.net.Uri; //導入方法依賴的package包/類
public static UrlBuilder from(Uri uri) {
UrlQuery query = new UrlQuery();
Set<String> queryKeys = uri.getQueryParameterNames();
for (String queryKey : queryKeys) {
List<String> queryValues = uri.getQueryParameters(queryKey);
for (String queryValue : queryValues) {
query.append(queryKey, queryValue);
}
}
return from(uri.getScheme(), uri.getHost(), uri.getPort(), UrlPath.parse(uri.getPath()), query, uri.getFragment());
}