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

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

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
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:addRule
		 
		if(active && childIndex == -1)
		{ 
			_hostProgressBar = new ProgressBar(getContext());
			_hostProgressBar.setIndeterminate(true);
			LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT, 
					LayoutParams.WRAP_CONTENT);
			params.alignWithParent = true;
			params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
			params.addRule(RelativeLayout.CENTER_VERTICAL);
			container.addView(_hostProgressBar, params);
		} 
		else if(!active && childIndex > -1)
		{ 
			container.removeView(_hostProgressBar);
		} 
	} 
	 
	public void toggleError(View view, boolean active)
	{ 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:addRule
        item_img_param.setMargins(0,0,5,0);
        RelativeLayout.LayoutParams item_title_param = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
        item_title_param.addRule(RelativeLayout.RIGHT_OF, image.getId());
        item_title_param.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
        item_title_param.setMargins(0,10,0,15); //left top right bottom
        RelativeLayout.LayoutParams item_text_param = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
        item_text_param.addRule(RelativeLayout.RIGHT_OF, image.getId());
        item_text_param.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
        item_text_param.addRule(RelativeLayout.BELOW, title.getId());
        image.setLayoutParams(item_img_param);
        title.setLayoutParams(item_title_param);
        text.setLayoutParams(item_text_param);
        text.setTextSize(10);
		return item;
	} 
	 
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        intent1 = new Intent(this, SettingProfileActivity.class);
        intent2 = new Intent(this, SettingProfileActivity.class);
6
CodeRank
Experience pair programming with AI  Get Codota for Java
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
Experience pair programming with AI  Get Codota for Java
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
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:addRule
This code example shows how to use the following methods:setLayoutParams
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
Experience pair programming with AI  Get Codota for Java
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
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
    super.onCreate(saved);
     
    map_ = new CycleMapView(this, this.getClass().getName());
	   
    final RelativeLayout rl = new RelativeLayout(this);
    rl.addView(map_, new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
    setContentView(rl);
  } // onCreate 
      
  protected CycleMapView mapView() { return map_; }
  protected Overlay overlayPushBottom(final Overlay overlay) { return map_.overlayPushBottom(overlay); }
  protected Overlay overlayPushTop(final Overlay overlay) { return map_.overlayPushTop(overlay); }
	 
  protected void findPlace() { launchFindDialog(); } 
 
  @Override 
  protected void onPause() 
  { 
    map_.onPause();
    super.onPause(); 
5
CodeRank
Experience pair programming with AI  Get Codota for Java

Related Android RelativeLayout.LayoutParams Questions & Answers:

See Code Examples for Android RelativeLayout.LayoutParams Methods: