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


Java HoloEverywhere类代码示例

本文整理汇总了Java中org.holoeverywhere.HoloEverywhere的典型用法代码示例。如果您正苦于以下问题:Java HoloEverywhere类的具体用法?Java HoloEverywhere怎么用?Java HoloEverywhere使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: run

import org.holoeverywhere.HoloEverywhere; //导入依赖的package包/类
@Override
public void run() {
    final MenuBuilder menu;
    if (HoloEverywhere.SAVE_MENU_INSTANCE_OVER_INVALIDATE && mMenu != null) {
        mMenu.clearAll();
        menu = mMenu;
    } else {
        menu = createMenu();
    }
    if (mActivity.superOnCreatePanelMenu(Window.FEATURE_OPTIONS_PANEL, menu) &&
            mActivity.superOnPreparePanel(Window.FEATURE_OPTIONS_PANEL, null, menu)) {
        setMenu(menu);
    } else {
        setMenu(null);
    }

    mInvalidateMenuPosted = false;
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:19,代码来源:ActionBarActivityDelegateBase.java

示例2: showContextMenuForChild

import org.holoeverywhere.HoloEverywhere; //导入依赖的package包/类
@Override
public boolean showContextMenuForChild(View originalView) {
    if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) {
        return super.showContextMenuForChild(originalView);
    }
    mListener = mProvider.getContextMenuListener(originalView);
    if (mListener == null) {
        return false;
    }
    if (mContextMenu == null) {
        mContextMenu = new ContextMenuBuilder(getContext(), mListener);
        mContextMenu.setCallback(this);
    } else {
        mContextMenu.clearAll();
        mContextMenu.setContextMenuListener(mListener);
    }
    mMenuDialogHelper = mContextMenu.show(originalView, originalView.getWindowToken());
    if (mMenuDialogHelper != null) {
        mMenuDialogHelper.setPresenterCallback(this);
        return true;
    } else {
        return false;
    }
}
 
开发者ID:WassimBenltaief,项目名称:laposte-android,代码行数:25,代码来源:ContextMenuDecorView.java

示例3: makeNameById

import org.holoeverywhere.HoloEverywhere; //导入依赖的package包/类
public static String makeNameById(int id) {
    if (id > 0) {
        if (HoloEverywhere.NAMED_PREFERENCES) {
            return Application.getLastInstance().getResources().getResourceEntryName(id);
        } else {
            return "preference_0x" + Integer.toHexString(id);
        }
    } else {
        return null;
    }
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:12,代码来源:PreferenceManager.java

示例4: makeAddonClass

import org.holoeverywhere.HoloEverywhere; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public static <T extends IAddon> Class<T> makeAddonClass(String classname) {
    if (classname.contains(".")) {
        try {
            return (Class<T>) Class.forName(classname);
        } catch (ClassNotFoundException e) {
            throw new RuntimeException(e);
        }
    } else {
        return makeAddonClass(HoloEverywhere.PACKAGE + ".addon.Addon" + classname);
    }
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:13,代码来源:IAddon.java

示例5: startActivity

import org.holoeverywhere.HoloEverywhere; //导入依赖的package包/类
@Override
public void startActivity(Intent intent, Bundle options) {
    if (HoloEverywhere.ALWAYS_USE_PARENT_THEME) {
        ThemeManager.startActivity(this, intent, options);
    } else {
        superStartActivity(intent, -1, options);
    }
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:9,代码来源:Application.java

示例6: startActivityForResult

import org.holoeverywhere.HoloEverywhere; //导入依赖的package包/类
@Override
public void startActivityForResult(Intent intent, int requestCode,
                                   Bundle options) {
    if (HoloEverywhere.ALWAYS_USE_PARENT_THEME) {
        ThemeManager.startActivity(this, intent, requestCode, options);
    } else {
        superStartActivity(intent, requestCode, options);
    }
}
 
开发者ID:restorer,项目名称:gloomy-dungeons-2,代码行数:10,代码来源:_HoloActivity.java

示例7: registerForContextMenu

import org.holoeverywhere.HoloEverywhere; //导入依赖的package包/类
@Override
public void registerForContextMenu(View view) {
    if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) {
        super.registerForContextMenu(view);
    } else {
        registerForContextMenu(view, this);
    }
}
 
开发者ID:WassimBenltaief,项目名称:laposte-android,代码行数:9,代码来源:Dialog.java

示例8: unregisterForContextMenu

import org.holoeverywhere.HoloEverywhere; //导入依赖的package包/类
@Override
public void unregisterForContextMenu(View view) {
    if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) {
        super.unregisterForContextMenu(view);
    } else {
        if (mContextMenuListeners != null) {
            mContextMenuListeners.remove(view);
        }
    }
}
 
开发者ID:WassimBenltaief,项目名称:laposte-android,代码行数:11,代码来源:Dialog.java

示例9: GridView

import org.holoeverywhere.HoloEverywhere; //导入依赖的package包/类
@SuppressLint("NewApi")
public GridView(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
    if (context instanceof Activity) {
        setActivity((Activity) context);
    }
    if (HoloEverywhere.DISABLE_OVERSCROLL_EFFECT && VERSION.SDK_INT >= 9) {
        setOverScrollMode(OVER_SCROLL_NEVER);
    }

    mOnItemLongClickListenerWrapper = new OnItemLongClickListenerWrapper();
    super.setOnItemLongClickListener(mOnItemLongClickListenerWrapper);
    setLongClickable(false);

    if (VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB) {
        super.setFastScrollAlwaysVisible(false);
        super.setChoiceMode(CHOICE_MODE_NONE);
    }
    super.setFastScrollEnabled(false);
    TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.AbsListView,
            defStyle, R.style.Holo_ListView);
    setFastScrollEnabled(a.getBoolean(R.styleable.AbsListView_android_fastScrollEnabled, false));
    setFastScrollAlwaysVisible(a.getBoolean(
            R.styleable.AbsListView_android_fastScrollAlwaysVisible, false));
    setChoiceMode(a.getInt(R.styleable.AbsListView_android_choiceMode, CHOICE_MODE_NONE));
    a.recycle();
}
 
开发者ID:WassimBenltaief,项目名称:laposte-android,代码行数:28,代码来源:GridView.java

示例10: ListView

import org.holoeverywhere.HoloEverywhere; //导入依赖的package包/类
@SuppressLint("NewApi")
public ListView(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
    if (context instanceof Activity) {
        setActivity((Activity) context);
    }
    if (HoloEverywhere.DISABLE_OVERSCROLL_EFFECT && VERSION.SDK_INT >= 9) {
        setOverScrollMode(OVER_SCROLL_NEVER);
    }

    mOnItemLongClickListenerWrapper = new OnItemLongClickListenerWrapper();
    super.setOnItemLongClickListener(mOnItemLongClickListenerWrapper);
    setLongClickable(false);

    if (VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB) {
        super.setFastScrollAlwaysVisible(false);
    }
    super.setFastScrollEnabled(false);
    super.setChoiceMode(CHOICE_MODE_NONE);
    TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.AbsListView,
            defStyle, R.style.Holo_ListView);
    setFastScrollEnabled(a.getBoolean(R.styleable.AbsListView_android_fastScrollEnabled, false));
    setFastScrollAlwaysVisible(a.getBoolean(
            R.styleable.AbsListView_android_fastScrollAlwaysVisible, false));
    setChoiceMode(a.getInt(R.styleable.AbsListView_android_choiceMode, CHOICE_MODE_NONE));
    a.recycle();
}
 
开发者ID:WassimBenltaief,项目名称:laposte-android,代码行数:28,代码来源:ListView.java

示例11: registerForContextMenu

import org.holoeverywhere.HoloEverywhere; //导入依赖的package包/类
@Override
public void registerForContextMenu(View view) {
    if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) {
        super.registerForContextMenu(view);
    } else {
        mActivity.registerForContextMenu(view, this);
    }
}
 
开发者ID:WassimBenltaief,项目名称:laposte-android,代码行数:9,代码来源:_HoloFragment.java

示例12: unregisterForContextMenu

import org.holoeverywhere.HoloEverywhere; //导入依赖的package包/类
@Override
public void unregisterForContextMenu(View view) {
    if (HoloEverywhere.WRAP_TO_NATIVE_CONTEXT_MENU) {
        super.unregisterForContextMenu(view);
    } else {
        mActivity.unregisterForContextMenu(view);
    }
}
 
开发者ID:WassimBenltaief,项目名称:laposte-android,代码行数:9,代码来源:_HoloFragment.java

示例13: startActivityForResult

import org.holoeverywhere.HoloEverywhere; //导入依赖的package包/类
@Override
public void startActivityForResult(Intent intent, int requestCode,
        Bundle options) {
    if (HoloEverywhere.ALWAYS_USE_PARENT_THEME) {
        ThemeManager.startActivity(this, intent, requestCode, options);
    } else {
        superStartActivity(intent, requestCode, options);
    }
}
 
开发者ID:WassimBenltaief,项目名称:laposte-android,代码行数:10,代码来源:_HoloActivity.java

示例14: GridView

import org.holoeverywhere.HoloEverywhere; //导入依赖的package包/类
@SuppressLint("NewApi")
public GridView(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
    if (context instanceof Activity) {
        setActivity((Activity) context);
    }
    if (HoloEverywhere.DISABLE_OVERSCROLL_EFFECT && VERSION.SDK_INT >= 9) {
        setOverScrollMode(OVER_SCROLL_NEVER);
    }

    mOnItemLongClickListenerWrapper = new OnItemLongClickListenerWrapper();
    super.setOnItemLongClickListener(mOnItemLongClickListenerWrapper);
    setLongClickable(false);
}
 
开发者ID:antonyt,项目名称:TflTravelAlerts,代码行数:15,代码来源:GridView.java

示例15: ListView

import org.holoeverywhere.HoloEverywhere; //导入依赖的package包/类
@SuppressLint("NewApi")
public ListView(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
    if (context instanceof Activity) {
        setActivity((Activity) context);
    }
    if (HoloEverywhere.DISABLE_OVERSCROLL_EFFECT && VERSION.SDK_INT >= 9) {
        setOverScrollMode(OVER_SCROLL_NEVER);
    }

    mOnItemLongClickListenerWrapper = new OnItemLongClickListenerWrapper();
    super.setOnItemLongClickListener(mOnItemLongClickListenerWrapper);
    setLongClickable(false);

    if (VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB) {
        super.setFastScrollAlwaysVisible(false);
    }
    super.setFastScrollEnabled(false);
    super.setChoiceMode(CHOICE_MODE_NONE);
    TypedArray a = context.obtainStyledAttributes(attrs, new int[] {
            android.R.attr.fastScrollEnabled,
            android.R.attr.fastScrollAlwaysVisible,
            android.R.attr.choiceMode,
            android.R.attr.overScrollFooter,
            android.R.attr.overScrollHeader
    }, defStyle, R.style.Holo_ListView);
    setFastScrollEnabled(a.getBoolean(0, false));
    setFastScrollAlwaysVisible(a.getBoolean(1, false));
    setChoiceMode(a.getInt(2, CHOICE_MODE_NONE));
    if (!a.hasValue(3) && VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {
        super.setOverscrollFooter(null);
    }
    if (!a.hasValue(4) && VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {
        super.setOverscrollHeader(null);
    }
    a.recycle();
}
 
开发者ID:antonyt,项目名称:TflTravelAlerts,代码行数:38,代码来源:ListView.java


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