Which class do I have to use, when setting the LayoutParams of my LinearLayout? The following two are not working:
linLayout.setLayoutParams(new ViewGroup.LayoutParams(50,50));linLayout.setLayoutParams(new android.widget.LinearLayout.LayoutParams(50,50));
if I get the params first, change them and set them back it’s working. So I suppose the Params I get returned inherit from ViewGroup.LayoutParams…
Any idea? THX
Use the LayoutParams of the parent. So in case your LinearLayout is a child of RelativeLayout then you use
linLayout.setLayoutParams(new android.widget.RelativeLayout.LayoutParams(50,50));