{
private LayoutInflater inflater;
public ComplexViewMF(Context mContext) {
super(mContext);
inflater = LayoutInflater.from(mContext);
}
@Override
public RelativeLayout generateMarqueeItemView(ComplexItemEntity data) {
RelativeLayout mView = (RelativeLayout) inflater.inflate(R.layout.complex_view, null);
((TextView) mView.findViewById(R.id.title)).setText(data.getTitle());
((TextView) mView.findViewById(R.id.secondTitle)).setText(data.getSecondTitle());
((TextView) mView.findViewById(R.id.time)).setText(data.getTime());
return mView;
}
}
```
#### 设置数据和监听事件用法同上
#### 重影问题可参考以下解决方案(参考自[这里](https://github.com/sfsheng0322/MarqueeView))
@Override
public void onStart() {
super.onStart();
marqueeView.startFlipping();
}
@Override
public void onStop() {
super.onStop();
marqueeView.stopFlipping();
}
License
--
Copyright (C) 2016 1798550470@qq.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.