CopyPastor

Detecting plagiarism made easy.

Score: 0.9218863589423043; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2014-09-22
by Sandeep Kumar

Original Post

Original - Posted on 2011-02-06
by Kevin Read



            
Present in both answers; Present only in the new answer; Present only in the old answer;



This will only work if your layout is a RelativeLayout, as other ViewGroups don't understand alignParentBottom.
RelativeLayout layout = findViewById(R.id.my_relative_layout); ImageView imageView = new ImageView (this); // your button lp = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); // You might want to tweak these to WRAP_CONTENT lp.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); layout.addView(button, lp);

This will only work if your layout is a RelativeLayout, as other ViewGroups don't understand alignParentBottom.
RelativeLayout layout = findViewById(R.id.my_relative_layout); Button button = new Button(this); // your button lp = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); // You might want to tweak these to WRAP_CONTENT lp.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); layout.addView(button, lp);

        
Present in both answers; Present only in the new answer; Present only in the old answer;