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


Java Launcher.getResources方法代码示例

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


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

示例1: AllAppsGridAdapter

import com.android.launcher3.Launcher; //导入方法依赖的package包/类
public AllAppsGridAdapter(Launcher launcher, AlphabeticalAppsList apps, View.OnClickListener
        iconClickListener, View.OnLongClickListener iconLongClickListener) {
    Resources res = launcher.getResources();
    mLauncher = launcher;
    mApps = apps;
    mEmptySearchMessage = res.getString(R.string.all_apps_loading_message);
    mGridSizer = new GridSpanSizer();
    mGridLayoutMgr = new AppsGridLayoutManager(launcher);
    mGridLayoutMgr.setSpanSizeLookup(mGridSizer);
    mItemDecoration = new GridItemDecoration();
    mLayoutInflater = LayoutInflater.from(launcher);
    mIconClickListener = iconClickListener;
    mIconLongClickListener = iconLongClickListener;
    mSectionNamesMargin = res.getDimensionPixelSize(R.dimen.all_apps_grid_view_start_margin);
    mSectionHeaderOffset = res.getDimensionPixelSize(R.dimen.all_apps_grid_section_y_offset);
    mIsRtl = Utilities.isRtl(res);

    mSectionTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
    mSectionTextPaint.setTextSize(res.getDimensionPixelSize(
            R.dimen.all_apps_grid_section_text_size));
    mSectionTextPaint.setColor(Utilities.getColorAccent(launcher));
}
 
开发者ID:michelelacorte,项目名称:FlickLauncher,代码行数:23,代码来源:AllAppsGridAdapter.java

示例2: DragController

import com.android.launcher3.Launcher; //导入方法依赖的package包/类
/**
 * Used to create a new DragLayer from XML.
 */
public DragController(Launcher launcher) {
    Resources r = launcher.getResources();
    mLauncher = launcher;
    mHandler = new Handler();
    mScrollZone = r.getDimensionPixelSize(R.dimen.scroll_zone);
    mVelocityTracker = VelocityTracker.obtain();

    mFlingToDeleteThresholdVelocity =
            r.getDimensionPixelSize(R.dimen.drag_flingToDeleteMinVelocity);
    mIsRtl = Utilities.isRtl(r);
}
 
开发者ID:michelelacorte,项目名称:FlickLauncher,代码行数:15,代码来源:DragController.java


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