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


Java LayoutParams.MATCH_PARENT属性代码示例

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


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

示例1: onCreateView

@Override public @Nullable View onCreateView(LayoutInflater inflater, ViewGroup container,
		Bundle savedInstanceState) {
	ViewPager view = new ViewPager(getActivity()); // container.getContext() results in white on white text
	view.setId(android.R.id.list);
	view.setLayoutParams(new MarginLayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));

	PagerTitleStrip title = new PagerTabStrip(view.getContext());
	ViewPager.LayoutParams params = new ViewPager.LayoutParams();
	params.width = LayoutParams.MATCH_PARENT;
	params.height = LayoutParams.WRAP_CONTENT;
	params.gravity = Gravity.TOP;
	title.setLayoutParams(params);

	view.addView(title);
	return view;
}
 
开发者ID:TWiStErRob,项目名称:glide-support,代码行数:16,代码来源:GlidePagerFragment.java

示例2: showShareByWeixin

/**
 * popwd显示 分享

 */
public static PopupWindow showShareByWeixin(final Context ctx, View parent, OnClickListener l) {
	LayoutInflater inflater = LayoutInflater.from(ctx);
	View view = inflater.inflate(R.layout.share_popwed_show, null);
	final PopupWindow sharePopwd = new PopupWindow(view, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
	view.findViewById(R.id.sendfrient).setOnClickListener(l);
	view.findViewById(R.id.sharefriend).setOnClickListener(l);
	view.findViewById(R.id.share_popwd).setOnClickListener(new OnClickListener() {
		@Override
		public void onClick(View v) {
			sharePopwd.dismiss();
		}
	});
	sharePopwd.setFocusable(true);
	sharePopwd.setOutsideTouchable(true);
	sharePopwd.setBackgroundDrawable(new BitmapDrawable()); //
	sharePopwd.showAtLocation(parent, Gravity.CENTER, 0, 0);

	return sharePopwd;
}
 
开发者ID:tincent,项目名称:libtincent,代码行数:23,代码来源:PopwdUtil.java

示例3: instantiateItem

@Override
public Object instantiateItem(final ViewGroup container,final int position)
  {
  TextView textView=new TextView(MainActivity.this);
  textView.setText("item"+position);
  textView.setBackgroundColor(colors[position]);
  textView.setGravity(Gravity.CENTER);
  final LayoutParams params=new LayoutParams();
  params.height=LayoutParams.MATCH_PARENT;
  params.width=LayoutParams.MATCH_PARENT;
  params.gravity=Gravity.CENTER;
  textView.setLayoutParams(params);
  textView.setTextColor(0xff000000);
  container.addView(textView);
  return textView;
  }
 
开发者ID:AndroidDeveloperLB,项目名称:ParallaxViewPagers,代码行数:16,代码来源:MainActivity.java

示例4: onCreateView

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    
	//Create the AdView fragment container layout
    View v = inflater.inflate(R.layout.fragment_ad, container, false);
    
    //Generate the AdView and configure it
    mAdView = new AdView(v.getContext());
    mAdView.setVisibility(View.GONE);
    RelativeLayout.LayoutParams mAdViewLayout = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
    mAdView.setLayoutParams(mAdViewLayout);
    //...set the Ads info
    mAdView.setAdSize(adSize);
    mAdView.setAdUnitId(adUnitId);
    
    //Add the AdView to the fragment container layout :)
    ((RelativeLayout)v).addView(mAdView);
    
    return v;
}
 
开发者ID:javocsoft,项目名称:javocsoft-toolbox,代码行数:21,代码来源:AdFragment.java

示例5: createButtonLayoutParams

public LinearLayout.LayoutParams createButtonLayoutParams() {
	LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
			LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
	return params;
}
 
开发者ID:cdkd321,项目名称:pure,代码行数:5,代码来源:ActionSheet.java

示例6: onCreate

@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_main);
	this.imgView = (ImageView) findViewById(R.id.imageView1);
	containerLayoutFrame = (LinearLayout) findViewById(R.id.layout);		
	filtersInt = new int[NUMBERS_OF_FILTERS];
	imgFilters = new ImageView[filtersInt.length];		
	lyparams.height = LayoutParams.MATCH_PARENT;
	lyparams.width = LayoutParams.WRAP_CONTENT;
	
	onClickListenerImagesFilter=new OnClicListenerImagesFilter();
	
	filtersInt[0]=BitmapFilter.GRAY_STYLE;		
	filtersInt[1]=BitmapFilter.BLOCK_STYLE;		
	filtersInt[2]=BitmapFilter.BLUR_STYLE;		
	filtersInt[3]=BitmapFilter.GAUSSIAN_BLUR_STYLE;		
	filtersInt[4]=BitmapFilter.HDR_STYLE;		
	filtersInt[5]=BitmapFilter.INVERT_STYLE;		
	filtersInt[6]=BitmapFilter.LIGHT_STYLE;		
	filtersInt[7]=BitmapFilter.LOMO_STYLE;		
	filtersInt[8]=BitmapFilter.NEON_STYLE;		
	filtersInt[9]=BitmapFilter.OIL_STYLE;		
	filtersInt[10]=BitmapFilter.OLD_STYLE;		
	filtersInt[11]=BitmapFilter.PIXELATE_STYLE;		
	filtersInt[12]=BitmapFilter.RELIEF_STYLE;		
	filtersInt[13]=BitmapFilter.SHARPEN_STYLE;		
	filtersInt[14]=BitmapFilter.SKETCH_STYLE;		
	filtersInt[15]=BitmapFilter.SOFT_GLOW_STYLE;		
	filtersInt[16]=BitmapFilter.TOTAL_FILTER_NUM;		
	filtersInt[17]=BitmapFilter.TV_STYLE;
	
	
	// we convert the image on imgView to a bitmap
		abmp = (BitmapDrawable) imgView.getDrawable();
		bmp = abmp.getBitmap();
		originalImageSacled=bmp;
		myBitmap=bmp; 		
		
		sacleMainImage();
		loadFilters();
}
 
开发者ID:camilortte,项目名称:ProcessImage-android,代码行数:42,代码来源:MainActivity.java


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