Code example for ImageButton

Methods: getLayoutParamssetLayoutParamssetOnTouchListenersetColorFiltersetVisibility

0
		setBoundaryPointParameters(endPointImageButton, leftMargin);
	} 
 
	private void setBoundaryPointParameters(ImageButton boundaryPoint, int leftMargin) {
		int pixelPerSecond = SoundMixer.getInstance().getPixelPerSecond();
		RelativeLayout.LayoutParams layout = (LayoutParams) boundaryPoint.getLayoutParams();
		layout.height = getHeight();
		layout.width = pixelPerSecond;
		layout.setMargins(leftMargin, 0, 0, 0);
		boundaryPoint.setColorFilter(Color.BLACK);
		boundaryPoint.setVisibility(VISIBLE);
		boundaryPoint.setLayoutParams(layout);
		boundaryPoint.setOnTouchListener(onTimelineTouchListener);
	} 
 
	public void resetTimeline() { 
		Iterator<Entry<Integer, TimelineTrackPosition>> it = trackPositions.entrySet().iterator();
 
		while (it.hasNext()) {
			HashMap.Entry<Integer, TimelineTrackPosition> pairs = it.next();
Stop searching for code, let great code find you!  Add Codota to your java IDE