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

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

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

DrawerLayout.setLayoutParams介绍

暂无

代码示例

代码示例来源:origin: kot32go/KSimpleLibrary

/**
 * @param activity
 */
public KDrawerBuilder(ActionBarActivity activity) {
  mDrawer = new DrawerLayout(activity);
  mDrawer.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
  mActivity = activity;
  mDefaultWidth = DisplayUtil.dip2px(activity, 100);
  mItemDefaultHeight = DisplayUtil.dip2px(activity, 55);
  mContentView = new LinearLayout(activity);
  mContentView.setLayoutParams(new ViewGroup.LayoutParams(mDefaultWidth, ViewGroup.LayoutParams.MATCH_PARENT));
  mContentView.setBackgroundColor(Color.WHITE);
  ((LinearLayout) mContentView).setOrientation(LinearLayout.VERTICAL);
}

代码示例来源:origin: marzika/Snapprefs

LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) mDrawerLayout.getLayoutParams();
lp.setMargins(0, 0, 0, 0);
mDrawerLayout.setLayoutParams(lp);

相关文章