GestureDetector德precated问题问题、GestureDetector、precated

2023-09-06 13:11:54 作者:爱你不是说说而已丶

我有这个code

itemizedOverlay = new MyItemizedOverlay(drawable,this);
itemizedOverlay.setGestureDetector(new GestureDetector(new MyGestureDetecor()));

新GestureDetector 标记为的德precated 的Eclipse中。

but new GestureDetector is marked as Deprecated in Eclipse.

我要避免使用去precated方法。

I want to avoid the use of deprecated methods.

我怎么能解决这个问题?

How could I fix this problem?

什么是无德precated形式?

What is the non-deprecated form?

推荐答案

选择其他构造之一。有 5所定义的 GestureDetector 构造。二 - 那些不包括上下文作为第一个参数 - 被标记为pcated德$ P $。您正在使用其中的一个。

Choose one of the other constructors. There are five defined constructors on GestureDetector. Two -- the ones not including a Context as the first parameter -- are marked as deprecated. You are using one of those.