Example usage for android.util Log isLoggable

List of usage examples for android.util Log isLoggable

Introduction

In this page you can find the example usage for android.util Log isLoggable.

Prototype

public static native boolean isLoggable(String tag, int level);

Source Link

Document

Checks to see whether or not a log for the specified tag is loggable at the specified level.

Usage

From source file:com.example.everyoneassist.Layout.PercentLayoutHelper.java

private static PercentLayoutInfo setMarginRelatedVal(TypedArray array, PercentLayoutInfo info) {
    //margin/*from w  w  w . j  a v  a 2s  .co  m*/
    PercentLayoutInfo.PercentVal percentVal = getPercentVal(array,
            R.styleable.PercentLayout_Layout_layout_marginPercent, true);

    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.leftMarginPercent = percentVal;
        info.topMarginPercent = percentVal;
        info.rightMarginPercent = percentVal;
        info.bottomMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginLeftPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent left margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.leftMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginTopPercent, false);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent top margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.topMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginRightPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent right margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.rightMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginBottomPercent, false);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent bottom margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.bottomMarginPercent = percentVal;
    }
    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginStartPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent start margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.startMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginEndPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent end margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.endMarginPercent = percentVal;
    }

    return info;
}

From source file:caesar.feng.framework.percentlayout.PercentLayoutHelper.java

private static PercentLayoutInfo setMarginRelatedVal(TypedArray array, PercentLayoutInfo info) {
    //margin?/*from   w  w  w. j a v  a  2 s .c o m*/
    PercentLayoutInfo.PercentVal percentVal = getPercentVal(array,
            R.styleable.PercentLayout_Layout_layout_marginPercent, true);

    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.leftMarginPercent = percentVal;
        info.topMarginPercent = percentVal;
        info.rightMarginPercent = percentVal;
        info.bottomMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginLeftPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent left margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.leftMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginTopPercent, false);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent top margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.topMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginRightPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent right margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.rightMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginBottomPercent, false);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent bottom margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.bottomMarginPercent = percentVal;
    }
    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginStartPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent start margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.startMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginEndPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent end margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.endMarginPercent = percentVal;
    }

    return info;
}

From source file:com.lyp.percent.PercentLayoutHelper.java

private static PercentLayoutInfo setMarginRelatedVal(TypedArray array, PercentLayoutInfo info) {
    //margin???//from   ww  w  .  j  a v a 2  s .  c  o  m
    PercentLayoutInfo.PercentVal percentVal = getPercentVal(array,
            R.styleable.PercentLayout_Layout_layout_marginPercent, true);

    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.leftMarginPercent = percentVal;
        info.topMarginPercent = percentVal;
        info.rightMarginPercent = percentVal;
        info.bottomMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginLeftPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent left margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.leftMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginTopPercent, false);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent top margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.topMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginRightPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent right margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.rightMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginBottomPercent, false);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent bottom margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.bottomMarginPercent = percentVal;
    }
    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginStartPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent start margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.startMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginEndPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent end margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.endMarginPercent = percentVal;
    }

    return info;
}

From source file:com.android.mms.rcs.FavoriteDetailActivity.java

public void saveToContact() {
    String address = mMsgFrom;/*from w  ww  . j a v  a2s.  c  o  m*/
    if (TextUtils.isEmpty(address)) {
        if (LogTag.VERBOSE || Log.isLoggable(LogTag.APP, Log.VERBOSE)) {
            Log.v(TAG, "  saveToContact fail for null address! ");
        }
        return;
    }

    // address must be a single recipient
    Intent intent = new Intent(Intent.ACTION_INSERT_OR_EDIT);
    intent.setType(Contacts.CONTENT_ITEM_TYPE);
    intent.putExtra(ContactsContract.Intents.Insert.PHONE, address);
    intent.putExtra(ContactsContract.Intents.Insert.PHONE_TYPE,
            ContactsContract.CommonDataKinds.Phone.TYPE_MOBILE);
    intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
    this.startActivity(intent);
}

From source file:com.gyz.androiddevelope.view.percent.PercentLayoutHelper.java

private static PercentLayoutInfo setMarginRelatedVal(TypedArray array, PercentLayoutInfo info) {
    //margin?/*from   w w w . j  a v a 2  s. c o  m*/
    PercentLayoutInfo.PercentVal percentVal = getPercentVal(array,
            R.styleable.PercentLayout_Layout_layout_marginPercent, true);

    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.leftMarginPercent = percentVal;
        info.topMarginPercent = percentVal;
        info.rightMarginPercent = percentVal;
        info.bottomMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginLeftPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent left margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.leftMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginTopPercent, false);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent top margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.topMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginRightPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent right margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.rightMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginBottomPercent, false);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent bottom margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.bottomMarginPercent = percentVal;
    }
    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginStartPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE))

        {
            Log.v(TAG, "percent start margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.startMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginEndPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent end margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.endMarginPercent = percentVal;
    }

    return info;
}

From source file:com.example.recycleviewtest.PercentLayoutHelper.java

private static PercentLayoutInfo setMarginRelatedVal(TypedArray array, PercentLayoutInfo info) {
    //margin???//from  w  w w. j a va  2  s . c  om
    PercentLayoutInfo.PercentVal percentVal = getPercentVal(array,
            R.styleable.PercentLayout_Layout_layout_marginPercent, true);

    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.leftMarginPercent = percentVal;
        info.topMarginPercent = percentVal;
        info.rightMarginPercent = percentVal;
        info.bottomMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginLeftPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent left margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.leftMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginTopPercent, false);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent top margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.topMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginRightPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent right margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.rightMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginBottomPercent, false);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent bottom margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.bottomMarginPercent = percentVal;
    }
    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginStartPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent start margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.startMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginEndPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent end margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.endMarginPercent = percentVal;
    }

    return info;
}

From source file:android.percent.support.PercentLayoutHelper.java

private static PercentLayoutInfo setMarginRelatedVal(TypedArray array, PercentLayoutInfo info) {
    //margin????//from   ww w. j a  v a 2s .  co m
    PercentLayoutInfo.PercentVal percentVal = getPercentVal(array,
            R.styleable.PercentLayout_Layout_layout_marginPercent, true);

    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.leftMarginPercent = percentVal;
        info.topMarginPercent = percentVal;
        info.rightMarginPercent = percentVal;
        info.bottomMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginLeftPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent left margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.leftMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginTopPercent, false);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent top margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.topMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginRightPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent right margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.rightMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginBottomPercent, false);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent bottom margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.bottomMarginPercent = percentVal;
    }
    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginStartPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent start margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.startMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginEndPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent end margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.endMarginPercent = percentVal;
    }

    return info;
}

From source file:com.neuwill.support.PercentLayoutHelper.java

private static PercentLayoutInfo setMarginRelatedVal(TypedArray array, PercentLayoutInfo info) {
    // margin//w  w w.  j a v  a 2  s.  c  om
    PercentLayoutInfo.PercentVal percentVal = getPercentVal(array,
            R.styleable.PercentLayout_Layout_layout_marginPercent, true);

    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.leftMarginPercent = percentVal;
        info.topMarginPercent = percentVal;
        info.rightMarginPercent = percentVal;
        info.bottomMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginLeftPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent left margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.leftMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginTopPercent, false);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent top margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.topMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginRightPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent right margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.rightMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginBottomPercent, false);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent bottom margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.bottomMarginPercent = percentVal;
    }
    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginStartPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent start margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.startMarginPercent = percentVal;
    }

    percentVal = getPercentVal(array, R.styleable.PercentLayout_Layout_layout_marginEndPercent, true);
    if (percentVal != null) {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "percent end margin: " + percentVal.percent);
        }
        info = checkForInfoExists(info);
        info.endMarginPercent = percentVal;
    }

    return info;
}

From source file:com.android.mms.ui.ConversationList.java

public void onDraftChanged(final long threadId, final boolean hasDraft) {
    // Run notifyDataSetChanged() on the main thread.
    mQueryHandler.post(new Runnable() {
        public void run() {
            if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {
                log("onDraftChanged: threadId=" + threadId + ", hasDraft=" + hasDraft);
            }//from   w ww. ja  v  a2  s. co  m
            mListAdapter.notifyDataSetChanged();
        }
    });
}

From source file:com.android.calendar.month.MonthByWeekFragment.java

@Override
public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
    synchronized (mUpdateLoader) {
        if (Log.isLoggable(TAG, Log.DEBUG)) {
            Log.d(TAG, "Found " + data.getCount() + " cursor entries for uri " + mEventUri);
        }//from   w  ww .j a va2s  . c o  m
        CursorLoader cLoader = (CursorLoader) loader;
        if (mEventUri == null) {
            mEventUri = cLoader.getUri();
            updateLoadedDays();
        }
        if (cLoader.getUri().compareTo(mEventUri) != 0) {
            // We've started a new query since this loader ran so ignore the
            // result
            return;
        }
        ArrayList<Event> events = new ArrayList<Event>();
        Event.buildEventsFromCursor(events, data, mContext, mFirstLoadedJulianDay, mLastLoadedJulianDay);
        ((MonthByWeekAdapter) mAdapter).setEvents(mFirstLoadedJulianDay,
                mLastLoadedJulianDay - mFirstLoadedJulianDay + 1, events);
    }
}