Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. java.lang.ClassCastException: android.widget.RelativeLayout$LayoutParams cannot be cast to android.widget.LinearLayout$LayoutParams
  2.  
  3. private void MoveBTN() {
  4. //transition
  5. TransitionManager.beginDelayedTransition(myLayout);
  6. // View myBtn=findViewById(R.id.btn1);
  7. //moveing button
  8. RelativeLayout.LayoutParams LP=new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,RelativeLayout.LayoutParams.WRAP_CONTENT);
  9. LP.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM,RelativeLayout.TRUE);
  10. LP.addRule(RelativeLayout.ALIGN_PARENT_RIGHT,RelativeLayout.TRUE);
  11. myButton1.setLayoutParams(LP);
  12. //resizing button
  13. ViewGroup.LayoutParams size=myButton1.getLayoutParams();
  14. size.height=71;
  15. size.width=65;
  16. myButton1.setLayoutParams(size);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement