本文整理了Java中android.support.v4.widget.DrawerLayout.setLayoutParams()
方法的一些代码示例,展示了DrawerLayout.setLayoutParams()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DrawerLayout.setLayoutParams()
方法的具体详情如下:
包路径:android.support.v4.widget.DrawerLayout
类名称: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);
内容来源于网络,如有侵权,请联系作者删除!