Code example for FrameLayout.LayoutParams

Methods: setLayoutParams, setMargins

0
			public void run() { 
 
				// fish_img.layout(fish_location[0], 0, 
				// fish_location[0] + 
				// fish_img_width,linear_height-fish_img_height); 
				FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
						FrameLayout.LayoutParams.WRAP_CONTENT,
						FrameLayout.LayoutParams.WRAP_CONTENT);
				// 
				params.setMargins(0, 0, 0, 0);
				// 
				fish_img.setLayoutParams(params);
				// fish_img2.setLayoutParams(params); 
				// fish_img3.setLayoutParams(params); 
				// fish_img4.setLayoutParams(params); 
				// fish_img5.setLayoutParams(params); 
				fish_img.setVisibility(View.GONE);
 
			} 
		}); 
	}