private void init(AttributeSet attrs, int defStyle) { LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); inflater.inflate(R.layout.timeline_item, this, true); mVideoView = (VideoView) findViewById(R.id.thumbinail); mSegmentSelector = (RangeSelector) findViewById(R.id.segment); mSegmentSelector.setEventsListener(this); mOpenButton = ((ImageButton) findViewById(R.id.open)); mOpenButton.setOnClickListener(this); mDeleteButton = ((ImageButton) findViewById(R.id.delete)); mDeleteButton.setOnClickListener(this); mTitleText = (TextView) findViewById(R.id.title); mDurationText = (TextView) findViewById(R.id.length); mMediaInfo = new MediaFileInfo(new AndroidMediaObjectFactory(mContext)); mEnableSegmentPicker = true; setMediaUri(null); }