當前位置: 首頁>>代碼示例>>Java>>正文


Java ActionBarSherlock.DEBUG屬性代碼示例

本文整理匯總了Java中com.actionbarsherlock.ActionBarSherlock.DEBUG屬性的典型用法代碼示例。如果您正苦於以下問題:Java ActionBarSherlock.DEBUG屬性的具體用法?Java ActionBarSherlock.DEBUG怎麽用?Java ActionBarSherlock.DEBUG使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在com.actionbarsherlock.ActionBarSherlock的用法示例。


在下文中一共展示了ActionBarSherlock.DEBUG屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: requestFeature

@Override
public boolean requestFeature(int featureId) {
    if (ActionBarSherlock.DEBUG) Log.d(TAG, "[requestFeature] featureId: " + featureId);

    if (mContentParent != null) {
        throw new AndroidRuntimeException("requestFeature() must be called before adding content");
    }

    switch (featureId) {
        case Window.FEATURE_ACTION_BAR:
        case Window.FEATURE_ACTION_BAR_OVERLAY:
        case Window.FEATURE_ACTION_MODE_OVERLAY:
        case Window.FEATURE_INDETERMINATE_PROGRESS:
        case Window.FEATURE_NO_TITLE:
        case Window.FEATURE_PROGRESS:
            mFeatures |= (1 << featureId);
            return true;

        default:
            return false;
    }
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:22,代碼來源:ActionBarSherlockCompat.java

示例2: setContentView

@Override
public void setContentView(View view, ViewGroup.LayoutParams params) {
    if (ActionBarSherlock.DEBUG) Log.d(TAG, "[setContentView] view: " + view + ", params: " + params);

    if (mContentParent == null) {
        installDecor();
    } else {
        mContentParent.removeAllViews();
    }
    mContentParent.addView(view, params);

    Window.Callback callback = mActivity.getWindow().getCallback();
    if (callback != null) {
        callback.onContentChanged();
    }

    initActionBar();
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:18,代碼來源:ActionBarSherlockCompat.java

示例3: onMenuItemSelected

@Override
public boolean onMenuItemSelected(int featureId, MenuItem item) {
    if (ActionBarSherlock.DEBUG) Log.d(TAG, "[onMenuItemSelected] featureId: " + featureId + ", item: " + item);

    if (featureId == Window.FEATURE_OPTIONS_PANEL) {
        if (onOptionsItemSelected(item)) {
            return true;
        }

        if (mFragments.mAdded != null) {
            for (int i = 0; i < mFragments.mAdded.size(); i++) {
                Fragment f = mFragments.mAdded.get(i);
                if (f != null && !f.mHidden && f.mHasMenu && f.mMenuVisible && f instanceof OnOptionsItemSelectedListener) {
                    if (((OnOptionsItemSelectedListener)f).onOptionsItemSelected(item)) {
                        return true;
                    }
                }
            }
        }
    }
    return false;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:22,代碼來源:Watson.java

示例4: getActionBar

@Override
public ActionBar getActionBar() {
    if (ActionBarSherlock.DEBUG) Log.d(TAG, "[getActionBar]");

    initActionBar();
    return mActionBar;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:7,代碼來源:ActionBarSherlockNative.java

示例5: loadUiOptionsFromManifest

private static int loadUiOptionsFromManifest(Activity activity) {
    int uiOptions = 0;
    try {
        final String thisPackage = activity.getClass().getName();
        if (ActionBarSherlock.DEBUG) Log.i(TAG, "Parsing AndroidManifest.xml for " + thisPackage);

        final String packageName = activity.getApplicationInfo().packageName;
        final AssetManager am = activity.createPackageContext(packageName, 0).getAssets();
        final XmlResourceParser xml = am.openXmlResourceParser("AndroidManifest.xml");

        int eventType = xml.getEventType();
        while (eventType != XmlPullParser.END_DOCUMENT) {
            if (eventType == XmlPullParser.START_TAG) {
                String name = xml.getName();

                if ("application".equals(name)) {
                    //Check if the <application> has the attribute
                    if (ActionBarSherlock.DEBUG) Log.d(TAG, "Got <application>");

                    for (int i = xml.getAttributeCount() - 1; i >= 0; i--) {
                        if (ActionBarSherlock.DEBUG) Log.d(TAG, xml.getAttributeName(i) + ": " + xml.getAttributeValue(i));

                        if ("uiOptions".equals(xml.getAttributeName(i))) {
                            uiOptions = xml.getAttributeIntValue(i, 0);
                            break; //out of for loop
                        }
                    }
                } else if ("activity".equals(name)) {
                    //Check if the <activity> is us and has the attribute
                    if (ActionBarSherlock.DEBUG) Log.d(TAG, "Got <activity>");
                    Integer activityUiOptions = null;
                    String activityPackage = null;
                    boolean isOurActivity = false;

                    for (int i = xml.getAttributeCount() - 1; i >= 0; i--) {
                        if (ActionBarSherlock.DEBUG) Log.d(TAG, xml.getAttributeName(i) + ": " + xml.getAttributeValue(i));

                        //We need both uiOptions and name attributes
                        String attrName = xml.getAttributeName(i);
                        if ("uiOptions".equals(attrName)) {
                            activityUiOptions = xml.getAttributeIntValue(i, 0);
                        } else if ("name".equals(attrName)) {
                            activityPackage = cleanActivityName(packageName, xml.getAttributeValue(i));
                            if (!thisPackage.equals(activityPackage)) {
                                break; //out of for loop
                            }
                            isOurActivity = true;
                        }

                        //Make sure we have both attributes before processing
                        if ((activityUiOptions != null) && (activityPackage != null)) {
                            //Our activity, uiOptions specified, override with our value
                            uiOptions = activityUiOptions.intValue();
                        }
                    }
                    if (isOurActivity) {
                        //If we matched our activity but it had no logo don't
                        //do any more processing of the manifest
                        break;
                    }
                }
            }
            eventType = xml.nextToken();
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
    if (ActionBarSherlock.DEBUG) Log.i(TAG, "Returning " + Integer.toHexString(uiOptions));
    return uiOptions;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:70,代碼來源:ActionBarSherlockCompat.java

示例6: onCreatePanelMenu

@Override
public final boolean onCreatePanelMenu(int featureId, android.view.Menu menu) {
    if (ActionBarSherlock.DEBUG) Log.d(TAG, "[onCreatePanelMenu] featureId: " + featureId + ", menu: " + menu);

    if (featureId == Window.FEATURE_OPTIONS_PANEL && !mIgnoreNativeCreate) {
        mIgnoreNativeCreate = true;
        boolean result = getSherlock().dispatchCreateOptionsMenu(menu);
        mIgnoreNativeCreate = false;

        if (ActionBarSherlock.DEBUG) Log.d(TAG, "[onCreatePanelMenu] returning " + result);
        return result;
    }
    return super.onCreatePanelMenu(featureId, menu);
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:14,代碼來源:SherlockFragmentActivity.java

示例7: requestFeature

@Override
public boolean requestFeature(int featureId) {
    if (ActionBarSherlock.DEBUG) Log.d(TAG, "[requestFeature] featureId: " + featureId);

    final boolean result = mActivity.getWindow().requestFeature(featureId);
    if (ActionBarSherlock.DEBUG) Log.d(TAG, "[requestFeature] returning " + result);
    return result;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:8,代碼來源:ActionBarSherlockNative.java

示例8: addContentView

@Override
public void addContentView(View view, ViewGroup.LayoutParams params) {
    if (ActionBarSherlock.DEBUG) Log.d(TAG, "[addContentView] view: " + view + ", params: " + params);

    if (mContentParent == null) {
        installDecor();
    }
    mContentParent.addView(view, params);

    initActionBar();
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:11,代碼來源:ActionBarSherlockCompat.java

示例9: dispatchConfigurationChanged

@Override
public void dispatchConfigurationChanged(Configuration newConfig) {
    if (ActionBarSherlock.DEBUG) Log.d(TAG, "[dispatchConfigurationChanged] newConfig: " + newConfig);

    if (aActionBar != null) {
        aActionBar.onConfigurationChanged(newConfig);
    }
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:8,代碼來源:ActionBarSherlockCompat.java

示例10: dispatchPause

@Override
public void dispatchPause() {
    if (ActionBarSherlock.DEBUG) Log.d(TAG, "[dispatchPause]");

    if (wActionBar != null && wActionBar.isOverflowMenuShowing()) {
        wActionBar.hideOverflowMenu();
    }
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:8,代碼來源:ActionBarSherlockCompat.java

示例11: ensureActionBar

@Override
public void ensureActionBar() {
    if (ActionBarSherlock.DEBUG) Log.d(TAG, "[ensureActionBar]");

    if (mDecor == null) {
        initActionBar();
    }
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:8,代碼來源:ActionBarSherlockCompat.java

示例12: setContentView

@Override
public void setContentView(View view, LayoutParams params) {
    if (ActionBarSherlock.DEBUG) Log.d(TAG, "[setContentView] view: " + view + ", params: " + params);

    mActivity.getWindow().setContentView(view, params);
    initActionBar();
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:7,代碼來源:ActionBarSherlockNative.java

示例13: dispatchPrepareOptionsMenu

@Override
public boolean dispatchPrepareOptionsMenu(android.view.Menu menu) {
    if (ActionBarSherlock.DEBUG) Log.d(TAG, "[dispatchPrepareOptionsMenu] android.view.Menu: " + menu);

    if (mActionMode != null) {
        return false;
    }

    mMenuIsPrepared = false;
    if (!preparePanel()) {
        return false;
    }

    if (isReservingOverflow()) {
        return false;
    }

    if (mNativeItemMap == null) {
        mNativeItemMap = new HashMap<android.view.MenuItem, MenuItemImpl>();
    } else {
        mNativeItemMap.clear();
    }

    if (mMenu == null) {
        return false;
    }

    boolean result = mMenu.bindNativeOverflow(menu, this, mNativeItemMap);
    if (ActionBarSherlock.DEBUG) Log.d(TAG, "[dispatchPrepareOptionsMenu] returning " + result);
    return result;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:31,代碼來源:ActionBarSherlockCompat.java

示例14: dispatchMenuOpened

@Override
public boolean dispatchMenuOpened(int featureId, android.view.Menu menu) {
    if (ActionBarSherlock.DEBUG) Log.d(TAG, "[dispatchMenuOpened] featureId: " + featureId + ", menu: " + menu);

    if (featureId == Window.FEATURE_ACTION_BAR || featureId == Window.FEATURE_OPTIONS_PANEL) {
        if (aActionBar != null) {
            aActionBar.dispatchMenuVisibilityChanged(true);
        }
        return true;
    }

    return false;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:13,代碼來源:ActionBarSherlockCompat.java

示例15: onPreparePanel

@Override
public boolean onPreparePanel(int featureId, View view, Menu menu) {
    if (ActionBarSherlock.DEBUG) Log.d(TAG, "[onPreparePanel] featureId: " + featureId + ", view: " + view + " menu: " + menu);

    if (featureId == Window.FEATURE_OPTIONS_PANEL) {
        boolean result = onPrepareOptionsMenu(menu);
        if (ActionBarSherlock.DEBUG) Log.d(TAG, "[onPreparePanel] activity prepare result: " + result);

        boolean show = false;
        if (mFragments.mAdded != null) {
            for (int i = 0; i < mFragments.mAdded.size(); i++) {
                Fragment f = mFragments.mAdded.get(i);
                if (f != null && !f.mHidden && f.mHasMenu && f.mMenuVisible && f instanceof OnPrepareOptionsMenuListener) {
                    show = true;
                    ((OnPrepareOptionsMenuListener)f).onPrepareOptionsMenu(menu);
                }
            }
        }

        if (ActionBarSherlock.DEBUG) Log.d(TAG, "[onPreparePanel] fragments prepare result: " + show);
        result |= show;

        result &= menu.hasVisibleItems();
        if (ActionBarSherlock.DEBUG) Log.d(TAG, "[onPreparePanel] returning " + result);
        return result;
    }
    return false;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:28,代碼來源:Watson.java


注:本文中的com.actionbarsherlock.ActionBarSherlock.DEBUG屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。