コード例 #1
0
 public void addEnvToIntent(Intent intent) {
   Map<String, String> envMap = System.getenv();
   Set<Map.Entry<String, String>> envSet = envMap.entrySet();
   Iterator<Map.Entry<String, String>> envIter = envSet.iterator();
   int c = 0;
   while (envIter.hasNext()) {
     Map.Entry<String, String> entry = envIter.next();
     intent.putExtra("env" + c, entry.getKey() + "=" + entry.getValue());
     c++;
   }
 }
コード例 #2
0
        private void processResult(LoadResult result) {
          // Cache the new drawable
          final String filePath = (result.fso);
          mAppIcons.put(filePath, result.result);

          // find the request for it
          for (Map.Entry<ImageView, String> entry : mRequests.entrySet()) {
            final ImageView imageView = entry.getKey();
            final String fso = entry.getValue();
            if (fso == result.fso) {
              imageView.setImageBitmap(result.result);
              mRequests.remove(imageView);
              break;
            }
          }
        }