当前位置: 首页>>代码示例>>Java>>正文


Java Log.v方法代码示例

本文整理汇总了Java中android.util.Log.v方法的典型用法代码示例。如果您正苦于以下问题:Java Log.v方法的具体用法?Java Log.v怎么用?Java Log.v使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.util.Log的用法示例。


在下文中一共展示了Log.v方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: scrollBehindTo

import android.util.Log; //导入方法依赖的package包/类
public void scrollBehindTo(View content, int x, int y) {
	int vis = View.VISIBLE;		
	if (mMode == SlidingMenu.LEFT) {
		if (x >= content.getLeft()) vis = View.INVISIBLE;
		scrollTo((int)((x + getBehindWidth())*mScrollScale), y);
	} else if (mMode == SlidingMenu.RIGHT) {
		if (x <= content.getLeft()) vis = View.INVISIBLE;
		scrollTo((int)(getBehindWidth() - getWidth() + 
				(x-getBehindWidth())*mScrollScale), y);
	} else if (mMode == SlidingMenu.LEFT_RIGHT) {
		mContent.setVisibility(x >= content.getLeft() ? View.INVISIBLE : View.VISIBLE);
		mSecondaryContent.setVisibility(x <= content.getLeft() ? View.INVISIBLE : View.VISIBLE);
		vis = x == 0 ? View.INVISIBLE : View.VISIBLE;
		if (x <= content.getLeft()) {
			scrollTo((int)((x + getBehindWidth())*mScrollScale), y);				
		} else {
			scrollTo((int)(getBehindWidth() - getWidth() + 
					(x-getBehindWidth())*mScrollScale), y);				
		}
	}
	if (vis == View.INVISIBLE)
		Log.v(TAG, "behind INVISIBLE");
	setVisibility(vis);
}
 
开发者ID:ChenTianSaber,项目名称:DailyZhiHu,代码行数:25,代码来源:CustomViewBehind.java

示例2: reportProgress

import android.util.Log; //导入方法依赖的package包/类
/**
 * Report download progress through the database if necessary.
 */
private void reportProgress(State state, InnerState innerState) {
    long now = System.currentTimeMillis();
    if (innerState.mBytesSoFar - innerState.mBytesNotified
            > Constants.MIN_PROGRESS_STEP
            && now - innerState.mTimeLastNotification
            > Constants.MIN_PROGRESS_TIME) {
        // we store progress updates to the database here
        mInfo.mCurrentBytes = innerState.mBytesSoFar;
        mDB.updateDownloadCurrentBytes(mInfo);

        innerState.mBytesNotified = innerState.mBytesSoFar;
        innerState.mTimeLastNotification = now;

        long totalBytesSoFar = innerState.mBytesThisSession + mService.mBytesSoFar;

        if (Constants.LOGVV) {
            Log.v(Constants.TAG, "downloaded " + mInfo.mCurrentBytes + " out of "
                    + mInfo.mTotalBytes);
            Log.v(Constants.TAG, "     total " + totalBytesSoFar + " out of "
                    + mService.mTotalLength);
        }

        mService.notifyUpdateBytes(totalBytesSoFar);
    }
}
 
开发者ID:snoozinsquatch,项目名称:unity-obb-downloader,代码行数:29,代码来源:DownloadThread.java

示例3: checkMD5

import android.util.Log; //导入方法依赖的package包/类
public static boolean checkMD5(String md5, File updateFile) {
    if (TextUtils.isEmpty(md5) || updateFile == null) {
        Log.e(TAG, "MD5 string empty or updateFile null");
        return false;
    }

    String calculatedDigest = md5(updateFile);
    if (calculatedDigest == null) {
        Log.e(TAG, "calculatedDigest null");
        return false;
    }

    Log.v(TAG, "Calculated digest: " + calculatedDigest);
    Log.v(TAG, "Provided digest: " + md5);

    return calculatedDigest.equalsIgnoreCase(md5);
}
 
开发者ID:angcyo,项目名称:RLibrary,代码行数:18,代码来源:MD5Utils.java

示例4: onInitializationSuccess

import android.util.Log; //导入方法依赖的package包/类
@Override
public void onInitializationSuccess(YouTubePlayer.Provider provider,
                                    YouTubePlayer youTubePlayer, boolean wasRestored) {
    if (!wasRestored) {
        if (LOG) {
            Log.v(TAG, "trailerData " + trailerData);
        }
        if (trailerData != null && !trailerData.isEmpty()) {
            Uri uri = trailerData.get(0).getTrailerUri();

            if (LOG) {
                Log.v(TAG, "trailerData " + trailerData.size());
            }
            String trailerCode = uri.getQueryParameter("v");
            if (trailerCode != null) {
                this.youTubePlayer = youTubePlayer;
                youTubePlayer.cueVideo(trailerCode);
            }
        } else {
            getFragmentManager().beginTransaction().remove(youTubePlayerFragment).commit();
        }
    }
}
 
开发者ID:an-garcia,项目名称:MovieGuide,代码行数:24,代码来源:MovieActivity.java

示例5: hideFragment

import android.util.Log; //导入方法依赖的package包/类
public void hideFragment(Fragment fragment, int transition, int transitionStyle) {
    if (DEBUG) {
        Log.v(TAG, "hide: " + fragment);
    }
    if (!fragment.mHidden) {
        fragment.mHidden = true;
        if (fragment.mView != null) {
            Animation anim = loadAnimation(fragment, transition, false, transitionStyle);
            if (anim != null) {
                setHWLayerAnimListenerIfAlpha(fragment.mView, anim);
                fragment.mView.startAnimation(anim);
            }
            fragment.mView.setVisibility(8);
        }
        if (fragment.mAdded && fragment.mHasMenu && fragment.mMenuVisible) {
            this.mNeedMenuInvalidate = true;
        }
        fragment.onHiddenChanged(true);
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:21,代码来源:FragmentManagerImpl.java

示例6: onStartCommand

import android.util.Log; //导入方法依赖的package包/类
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
    Log.v(TAG, "Received start id " + startId + ": " + intent);

    if (intent != null) {
        if (TestingUtils.ACTION_START_TRACKING.equals(intent.getAction())) {
            final int pid = intent.getIntExtra("pid", -1);
            final String name = intent.getStringExtra("name");
            final long start = intent.getLongExtra("start", System.currentTimeMillis());
            startTrackingProcess(pid, name, start);
        }
    }

    mHandler.sendEmptyMessage(MSG_START);

    return START_STICKY;
}
 
开发者ID:TeamBrainStorm,项目名称:SimpleUILauncher,代码行数:18,代码来源:MemoryTracker.java

示例7: buildUrlWithLatitudeLongitude

import android.util.Log; //导入方法依赖的package包/类
/**
 * Builds the URL used to talk to the weather server using latitude and longitude of a
 * location.
 *
 * @param latitude  The latitude of the location
 * @param longitude The longitude of the location
 * @return The Url to use to query the weather server.
 */
private static URL buildUrlWithLatitudeLongitude(Double latitude, Double longitude) {
    Uri weatherQueryUri = Uri.parse(FORECAST_BASE_URL).buildUpon()
            .appendQueryParameter(LAT_PARAM, String.valueOf(latitude))
            .appendQueryParameter(LON_PARAM, String.valueOf(longitude))
            .appendQueryParameter(FORMAT_PARAM, format)
            .appendQueryParameter(UNITS_PARAM, units)
            .appendQueryParameter(DAYS_PARAM, Integer.toString(numDays))
            .build();

    try {
        URL weatherQueryUrl = new URL(weatherQueryUri.toString());
        Log.v(TAG, "URL: " + weatherQueryUrl);
        return weatherQueryUrl;
    } catch (MalformedURLException e) {
        e.printStackTrace();
        return null;
    }
}
 
开发者ID:fjoglar,项目名称:android-dev-challenge,代码行数:27,代码来源:NetworkUtils.java

示例8: isStoragePermissionGranted

import android.util.Log; //导入方法依赖的package包/类
public  boolean isStoragePermissionGranted() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
        if (checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE)
                == PackageManager.PERMISSION_GRANTED) {
            Log.v(TAG,"Permission is granted");
            return true;
        } else {

            Log.v(TAG,"Permission is revoked");
            System.out.println("REQUESTING PERMISSION");
            ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, 1);
            return false;
        }
    }
    else{
        return true;
    }
}
 
开发者ID:rohansapre,项目名称:cleanhood,代码行数:19,代码来源:CreateEventActivity.java

示例9: sendResponseMessage

import android.util.Log; //导入方法依赖的package包/类
@Override
public void sendResponseMessage(HttpResponse response) throws IOException {
    if (!Thread.currentThread().isInterrupted()) {
        StatusLine status = response.getStatusLine();
        if (status.getStatusCode() == HttpStatus.SC_REQUESTED_RANGE_NOT_SATISFIABLE) {
            //already finished
            if (!Thread.currentThread().isInterrupted())
                sendSuccessMessage(status.getStatusCode(), response.getAllHeaders(), null);
        } else if (status.getStatusCode() >= 300) {
            if (!Thread.currentThread().isInterrupted())
                sendFailureMessage(status.getStatusCode(), response.getAllHeaders(), null, new HttpResponseException(status.getStatusCode(), status.getReasonPhrase()));
        } else {
            if (!Thread.currentThread().isInterrupted()) {
                Header header = response.getFirstHeader(AsyncHttpClient.HEADER_CONTENT_RANGE);
                if (header == null) {
                    append = false;
                    current = 0;
                } else
                    Log.v(LOG_TAG, AsyncHttpClient.HEADER_CONTENT_RANGE + ": " + header.getValue());
                sendSuccessMessage(status.getStatusCode(), response.getAllHeaders(), getResponseData(response.getEntity()));
            }
        }
    }
}
 
开发者ID:benniaobuguai,项目名称:android-project-gallery,代码行数:25,代码来源:RangeFileAsyncHttpResponseHandler.java

示例10: getData

import android.util.Log; //导入方法依赖的package包/类
/**
 * Reads and returns the correct type of data from the bundle
 */
@SuppressWarnings("unchecked")
private Object getData(Bundle remoteData, RemoteDataType dataType, String keyPrefix) {
    if (DEBUG) {
        Log.v(TAG, "Parsing datatype " + dataType);
    }
    switch (dataType) {
        case Parcelable:
            return remoteData.getParcelable(RemoteEventManager.REMOTE_DATA_KEY + keyPrefix);
        case Double:
            return remoteData.getDouble(RemoteEventManager.REMOTE_DATA_KEY + keyPrefix);
        case Float:
            return remoteData.getFloat(RemoteEventManager.REMOTE_DATA_KEY + keyPrefix);
        case Integer:
            return remoteData.getInt(RemoteEventManager.REMOTE_DATA_KEY + keyPrefix);
        case Long:
            return remoteData.getLong(RemoteEventManager.REMOTE_DATA_KEY + keyPrefix);
        case Byte:
            return remoteData.getByte(RemoteEventManager.REMOTE_DATA_KEY + keyPrefix);
        case Char:
            return remoteData.getChar(RemoteEventManager.REMOTE_DATA_KEY + keyPrefix);
        case Short:
            return remoteData.getShort(RemoteEventManager.REMOTE_DATA_KEY + keyPrefix);
        case String:
            return remoteData.getString(RemoteEventManager.REMOTE_DATA_KEY + keyPrefix);
        case Boolean:
            return (remoteData.getInt(RemoteEventManager.REMOTE_DATA_KEY + keyPrefix) == 1);
        case Parceler:
            return getParcelerData(remoteData, keyPrefix);
        case Remoter:
            return getRemoterData(remoteData, keyPrefix);
        case List:
            return getListData(remoteData, keyPrefix);

    }
    return null;
}
 
开发者ID:josesamuel,项目名称:RxRemote,代码行数:40,代码来源:RemoteObservable.java

示例11: processCommandApdu

import android.util.Log; //导入方法依赖的package包/类
@Override
public byte[] processCommandApdu(final byte[] commandApdu, final Bundle extras) {
    Log.v(TAG, "Received APDU: " + HexStrings.toHexString(commandApdu));
    final byte[] response = mdlSim.send(commandApdu);
    Log.v(TAG, "Returning APDU: " + HexStrings.toHexString(response));
    return response;
}
 
开发者ID:mDL-ILP,项目名称:mDL-ILP,代码行数:8,代码来源:MdlApduService.java

示例12: send

import android.util.Log; //导入方法依赖的package包/类
/**
 * Sends a message on the socket. Should only be called on the executor thread.
 */
public void send(String message) {
  Log.v(TAG, "Send: " + message);

  synchronized (rawSocketLock) {
    if (out == null) {
      reportError("Sending data on closed socket.");
      return;
    }

    out.write(message + "\n");
    out.flush();
  }
}
 
开发者ID:Piasy,项目名称:AppRTC-Android,代码行数:17,代码来源:TCPChannelClient.java

示例13: put

import android.util.Log; //导入方法依赖的package包/类
@Override
public synchronized void put(Bitmap bitmap) {
  if (bitmap == null) {
    throw new NullPointerException("Bitmap must not be null");
  }
  if (bitmap.isRecycled()) {
    throw new IllegalStateException("Cannot pool recycled bitmap");
  }
  if (!bitmap.isMutable() || strategy.getSize(bitmap) > maxSize
      || !allowedConfigs.contains(bitmap.getConfig())) {
    if (Log.isLoggable(TAG, Log.VERBOSE)) {
      Log.v(TAG, "Reject bitmap from pool"
              + ", bitmap: " + strategy.logBitmap(bitmap)
              + ", is mutable: " + bitmap.isMutable()
              + ", is allowed config: " + allowedConfigs.contains(bitmap.getConfig()));
    }
    bitmap.recycle();
    return;
  }

  final int size = strategy.getSize(bitmap);
  strategy.put(bitmap);
  tracker.add(bitmap);

  puts++;
  currentSize += size;

  if (Log.isLoggable(TAG, Log.VERBOSE)) {
    Log.v(TAG, "Put bitmap in pool=" + strategy.logBitmap(bitmap));
  }
  dump();

  evict();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:35,代码来源:LruBitmapPool.java

示例14: instantiateItem

import android.util.Log; //导入方法依赖的package包/类
@Override
public Object instantiateItem(ViewGroup container, int position)
{
    if (mCurTransaction == null)
    {
        mCurTransaction = mFragmentManager.beginTransaction();
    }
    final long itemId = getItemId(position);
    // Do we already have this fragment?
    String name = makeFragmentName(container.getId(), itemId);
    Fragment fragment = mFragmentManager.findFragmentByTag(name);
    if (fragment != null)
    {
        if (DEBUG)
        {
            Log.v(TAG, "Attaching item #" + itemId + ": f=" + fragment);
        }
        mCurTransaction.attach(fragment);
    }
    else
    {
        fragment = getItem(position);
        if (DEBUG)
        {
            Log.v(TAG, "Adding item #" + itemId + ": f=" + fragment);
        }
        mCurTransaction.add(container.getId(), fragment,
                makeFragmentName(container.getId(), itemId));
    }
    if (fragment != mCurrentPrimaryItem)
    {
        fragment.setMenuVisibility(false);
        fragment.setUserVisibleHint(false);
    }
    return fragment;
}
 
开发者ID:HueToYou,项目名称:ChatExchange-old,代码行数:37,代码来源:HueFragmentPagerAdapter.java

示例15: v

import android.util.Log; //导入方法依赖的package包/类
public int v(String tag, String msg) {
    return Log.v(tag, msg);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:LoggerDefault.java


注:本文中的android.util.Log.v方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。