在Android中实现scrollView事件
[重新编辑]
我试图在滚动视图中实现这些事件:
- OnSingleTap
- OnDoubleTap
- PaningStart
- OnPanning
- PanningEnd
- PinchingStart
- OnPinching
- PinchingEnd
- RotatingStart
- OnRotating
- RotatingEnd
- OnLongPress
该应用程序是一组 UI 部件,用作一个 UI 部件。我已将它们分类为放置在滚动视图中的相对布局。
我对此完全陌生,我将不胜感激所提供的任何帮助。谢谢。
[重新编辑]
代码示例:
public class Mobclassname extends ScrollView {
private Object[] children;
private ArrayList<Object> uiParts = null;
private Context context;
public MobGadgetFile(Context context, NSDictionary dict) {
super(context);
this.context = context;
setProperties(dict);
uiParts = ObjectMgr.createUIParts(context, children);
RelativeLayout rl = new RelativeLayout(context);
MobUtils.addUIparts(uiParts, rl);
HorizontalScrollView hscroll = new HorizontalScrollView(context);
hscroll.addView(rl);
this.addView(hscroll);
}
我正在代码中执行所有操作,因此我没有任何 xml 布局文件。这是我的规格。
谢谢。
[RE-EDIT]
I am trying to implement these events in the scrollView:
- OnSingleTap
- OnDoubleTap
- PaningStart
- OnPanning
- PanningEnd
- PinchingStart
- OnPinching
- PinchingEnd
- RotatingStart
- OnRotating
- RotatingEnd
- OnLongPress
The application is a collection of UI parts that function as one UI part. I have categorized them under a relative layout which I've placed in the scrollView.
I am completely new at this and I would appreciate any help offered. Thanks.
[RE-EDIT]
code sample:
public class Mobclassname extends ScrollView {
private Object[] children;
private ArrayList<Object> uiParts = null;
private Context context;
public MobGadgetFile(Context context, NSDictionary dict) {
super(context);
this.context = context;
setProperties(dict);
uiParts = ObjectMgr.createUIParts(context, children);
RelativeLayout rl = new RelativeLayout(context);
MobUtils.addUIparts(uiParts, rl);
HorizontalScrollView hscroll = new HorizontalScrollView(context);
hscroll.addView(rl);
this.addView(hscroll);
}
I am doing everything in code therefore I don't have any xml layout file. This is my specification.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论