Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- java.lang.ClassCastException: android.widget.RelativeLayout$LayoutParams cannot be cast to android.widget.LinearLayout$LayoutParams
- private void MoveBTN() {
- //transition
- TransitionManager.beginDelayedTransition(myLayout);
- // View myBtn=findViewById(R.id.btn1);
- //moveing button
- RelativeLayout.LayoutParams LP=new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,RelativeLayout.LayoutParams.WRAP_CONTENT);
- LP.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM,RelativeLayout.TRUE);
- LP.addRule(RelativeLayout.ALIGN_PARENT_RIGHT,RelativeLayout.TRUE);
- myButton1.setLayoutParams(LP);
- //resizing button
- ViewGroup.LayoutParams size=myButton1.getLayoutParams();
- size.height=71;
- size.width=65;
- myButton1.setLayoutParams(size);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement