android.support.v4.widget.DrawerLayout.getContext()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(130)

本文整理了Java中android.support.v4.widget.DrawerLayout.getContext()方法的一些代码示例,展示了DrawerLayout.getContext()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DrawerLayout.getContext()方法的具体详情如下:
包路径:android.support.v4.widget.DrawerLayout
类名称:DrawerLayout
方法名:getContext

DrawerLayout.getContext介绍

暂无

代码示例

代码示例来源:origin: konradrenner/kolabnotes-android

public Context getContext(){
  return layout.getContext();
}

代码示例来源:origin: kingargyle/adt-leanback-support

/**
 * Set a drawable to draw in the insets area for the status bar.
 * Note that this will only be activated if this DrawerLayout fitsSystemWindows.
 *
 * @param resId Resource id of a background drawable to draw behind the status bar
 */
public void setStatusBarBackground(int resId) {
  mStatusBarBackground = resId != 0 ? ContextCompat.getDrawable(getContext(), resId) : null;
}

代码示例来源:origin: derry/delion

public FilterAdapter(DrawerLayout parent) {
  mRootLayout = parent;
  mSelectedBackgroundColor = ApiCompatibilityUtils.getColor(
      parent.getContext().getResources(), R.color.default_primary_color);
}

代码示例来源:origin: kingargyle/adt-leanback-support

@Override
public ViewGroup.LayoutParams generateLayoutParams(AttributeSet attrs) {
  return new LayoutParams(getContext(), attrs);
}

代码示例来源:origin: derry/delion

@Override
public View getView(int position, View convertView, ViewGroup parent) {
  Context context = mRootLayout.getContext();
  Resources resources = context.getResources();

代码示例来源:origin: stackoverflow.com

mDrawerLayout = drawerLayout;
mRootView = (ViewGroup)mDrawerLayout.getRootView();
LayoutInflater inflater = (LayoutInflater) mDrawerLayout.getContext().getSystemService( Context.LAYOUT_INFLATER_SERVICE );
mHandle = inflater.inflate(handleLayout, mRootView, false);
mWM = (WindowManager) mDrawerLayout.getContext().getSystemService(Context.WINDOW_SERVICE);
mDisplay = mWM.getDefaultDisplay();

相关文章