RelativeLayout.LayoutParams addRule - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for RelativeLayout.LayoutParams addRule method.

This code example shows how to use the following methods:addRule
This code example shows how to use the following methods:addRule
			} 
			else { 
				updatedOriginalParams = newLayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
			} 
			 
			updatedOriginalParams.addRule(RelativeLayout.ABOVE, socializeActionBar.getId());
			 
			original.setLayoutParams(updatedOriginalParams);
			 
			contentView = original;
		}		 
 
		parentRelLyout.addView(contentView);
		parentRelLyout.addView(socializeActionBar);
		 
		return parentRelLyout;
	} 
	 
	protected LayoutParams newLayoutParams(int width, int height) {
		return new LayoutParams(width, height);

6
CodeRank
This code example shows how to use the following methods:addRule
This code example shows how to use the following methods:addRule
         * Each layout manager has its own layout parameters that allow to 
         * express rules how a widgets should be positioned. The WRAP_CONTENT 
         * parameters specify that the widget should be sized to its natural 
         * size (for both width and height). 
         */ 
        RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(
                LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
        /* 
         * Add a rule that specifies that the widget should be centered relative 
         * to the enclosing container. It is instructional to pass different 
         * layout parameters as defined in RelativeLayout (such as 
         * RelativeLayout.ALIGN_PARENT_BOTTOM). 
         */ 
        params.addRule(RelativeLayout.CENTER_IN_PARENT);
 
        /* 
         * Add the label as a child to the RelativeLayout using the specific 
         * layout parameters. 
         */ 
        layout.addView(label, params);
5
CodeRank
This code example shows how to use the following methods:addRule
    } 
    if (touchRunnable == null) {
      throw new NullPointerException("Runnable cannot be null");
    } 
 
    LayoutParams prevParams = new LayoutParams(
        LayoutParams.WRAP_CONTENT,
        LayoutParams.WRAP_CONTENT);
    LayoutParams nextParams = new LayoutParams(
        LayoutParams.WRAP_CONTENT,
        LayoutParams.WRAP_CONTENT);
 
    prevParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
    nextParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
    prevParams.addRule(RelativeLayout.CENTER_VERTICAL);
    nextParams.addRule(RelativeLayout.CENTER_VERTICAL);
 
    nextImage = new TouchLayout(context, false);
    prevImage = new TouchLayout(context, true);
    nextImage.setLayoutParams(nextParams);

5
CodeRank
This code example shows how to use the following methods:addRule
This code example shows how to use the following methods:addRule
    localLinearLayout.setOrientation(1);
    localLinearLayout.setGravity(1);
    localLinearLayout.addView(localRelativeLayout, new LinearLayout.LayoutParams(-2, -2));
    localLinearLayout.addView(this.mTextView, new LinearLayout.LayoutParams(-2, -2));
    addView(this.mBg, newCenterLayoutParams());
    RelativeLayout.LayoutParams localLayoutParams = new RelativeLayout.LayoutParams(-2, -2);
    localLayoutParams.addRule(15);
    localLayoutParams.addRule(7, 56266);
    addView(localLinearLayout, localLayoutParams);
    changeState((byte)1); 
  } 
 
  public byte getUpdateState() 
  { 
    return this.mState;
  } 
 
  public void setDownloadComplete() 
  { 
    changeState((byte)5); 
5
CodeRank
This code example shows how to use the following methods:addRule
		return new android.view.View( Activity.getInstance() );
	} 
	 
	protected android.view.ViewGroup.LayoutParams createSelfLayoutParams()
	{		 
		RelativeLayout.LayoutParams result = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.FILL_PARENT );
		result.addRule( RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE );
		return result;
	} 
	 
	protected android.view.ViewGroup createViewGroup()
	{ 
		return new android.widget.RelativeLayout( Activity.getInstance() );
	} 
	 
	protected android.view.View getAndroidView()
	{ 
		return mViewGroup;
	} 
	 
5
CodeRank
This code example shows how to use the following methods:addView, addRule
		peep.setText("");
		peep.setVisibility(View.GONE);
		 
		//���¼�����ͼ 
//		getBottomView(); 
		RelativeLayout.LayoutParams rl = new RelativeLayout.LayoutParams(
				LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
		rl.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
		rl.addRule(RelativeLayout.BELOW);		
		 
		/////// 
		((ViewGroup)contentView).removeView(getBottomView());		
		((ViewGroup) contentView).addView(getBottomView(), rl);
		//��������ͼ�����ŷ��� 
		if(setting.isAutoSpeak()){
			activity.speakOut(userWord);
		} 
	} 
 
	@Override 
5
CodeRank
This code example shows how to use the following methods:addRule

Related RelativeLayout.LayoutParams addRule Questions & Answers:

addRule Method Overview
Adds a layout rule to be interpreted by the RelativeLayout.
See Code Examples for other Android RelativeLayout.LayoutParams Methods: