[android-developers] How to solve Error- void is an invalid type for the variable setWidthHeight
When i m using setWidhtHeight(View v,int width,int height) method to set the size of layout throug code this error is occur-
void is an invalid type for the variable setWidthHeight
Plz help me how to solve it.
this is my code-
Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
int width = size.x;
int height = size.y;
public void setWidthHeight(View v, int width, int height){
LayoutParams lp;
lp = (LayoutParams) v.getLayoutParams();
lp.width = width;
lp.height = height;
v.setLayoutParams(lp);
}
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home