我正在使用Gesture API和我创建的手势库,它运行得非常好.问题是我想在OnGesturePerformedListener退出后在屏幕上显示手势,而是删除手势.我想在OnGesturePerformedListener之后可能有一个事件 - 我可以在OnGesturePerformedListener中保存手势,然后在以后的事件中再次显示它.有谁知道是否有这样的事件?这是代码:
private OnGesturePerformedListener handleGestureListener = new OnGesturePerformedListener() {
@Override
public void onGesturePerformed(GestureOverlayView gestureView,
Gesture gesture) {
if (gesture.getStrokesCount() != 2){
setWonderEmoticon();
return;
}
ArrayList<Prediction> predictions = gLib.recognize(gesture);
// one prediction needed
if (predictions.size() > 0) {
Prediction prediction = predictions.get(0);
// checking prediction
if (prediction.score > 20.0) {
setHappyEmoticon();
}
else {
setWonderEmoticon();
}
}
}
};
Run Code Online (Sandbox Code Playgroud)
顺便说一句,当从代码中删除setWonderEmoticon()和setHappyEmoticon()时,会发生同样的事情.
我有一个工作应用程序,我添加了 2 种产品口味。这个应用程序在第一个屏幕上有一个菜单,允许用户选择下一个活动,我用意图加载。
这是 AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
Run Code Online (Sandbox Code Playgroud)
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name="com.alpha.aloedu.MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.alpha.aloedu.guideddrawing.GuidedLetterDrawingActivity"
android:label="Guided Letter Drawing"
android:screenOrientation="portrait" />
<activity
android:name="com.alpha.aloedu.buildvocabulary.BuildVocabularyActivity"
android:label="Image Plus Word"
android:screenOrientation="portrait" />
<activity
android:name="com.alpha.aloedu.findthepicture.FindThePictureActivity"
android:label="Find the Picture"
android:screenOrientation="portrait" />
<activity
android:name="com.alpha.aloedu.findtheletter.FindTheLetterActivity"
android:label="Find the Letter"
android:screenOrientation="portrait" />
<activity
android:name="com.alpha.aloedu.fillintheletter.FillInTheLetterActivity"
android:label="Find the Letter"
android:screenOrientation="portrait" />
<activity
android:name="com.alpha.aloedu.EndActivity"
android:label="End Activity"
android:screenOrientation="portrait" />
<activity
android:name="com.alpha.aloedu.AdminActivity"
android:label="Admin Activity"
android:theme="@style/AppTheme.NoActionBar"
android:screenOrientation="portrait"
/>
</application>
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:requiresSmallestWidthDp="480"
android:resizeable="false" …Run Code Online (Sandbox Code Playgroud) android android-intent android-gradle-plugin android-productflavors
我继承了一些古老的Windows C++代码,并在Visual Studio 2010中为它创建了一个项目.当我构建时,我会丢失系统文件的头文件错误,例如"precom.h"和"Classes.hpp".它们不存在于我的机器上.是否有人熟悉这些文件及其来源?谢谢.