本文整理汇总了Java中android.gesture.GestureLibrary.getGestureEntries方法的典型用法代码示例。如果您正苦于以下问题:Java GestureLibrary.getGestureEntries方法的具体用法?Java GestureLibrary.getGestureEntries怎么用?Java GestureLibrary.getGestureEntries使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.gesture.GestureLibrary
的用法示例。
在下文中一共展示了GestureLibrary.getGestureEntries方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doInBackground
import android.gesture.GestureLibrary; //导入方法依赖的package包/类
@Override
protected Integer doInBackground(Void... params) {
if (isCancelled()) return STATUS_CANCELLED;
if (!Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
return STATUS_NO_STORAGE;
}
final GestureLibrary store = sStore;
if (store.load()) {
for (String name : store.getGestureEntries()) {
if (isCancelled()) break;
for (Gesture gesture : store.getGestures(name)) {
final Bitmap bitmap = gesture.toBitmap(mThumbnailSize, mThumbnailSize,
mThumbnailInset, mPathColor);
final NamedGesture namedGesture = new NamedGesture();
namedGesture.gesture = gesture;
namedGesture.name = name;
mAdapter.addBitmap(namedGesture.gesture.getID(), bitmap);
publishProgress(namedGesture);
}
}
return STATUS_SUCCESS;
}
return STATUS_NOT_LOADED;
}
示例2: printLibrary
import android.gesture.GestureLibrary; //导入方法依赖的package包/类
private void printLibrary(GestureLibrary lib) {
Set<String> nameEntries = lib.getGestureEntries();
for (String name : nameEntries) {
for (Gesture gesture : lib.getGestures(name)) {
DeLog.v(TAG, name + " " + gesture);
}
}
}
示例3: doInBackground
import android.gesture.GestureLibrary; //导入方法依赖的package包/类
@Override
protected Integer doInBackground(Void... params) {
if (isCancelled())
return STATUS_CANCELLED;
if (!Environment.MEDIA_MOUNTED.equals(Environment
.getExternalStorageState())) {
return STATUS_NO_STORAGE;
}
final GestureLibrary store = SettingsUtil.getGestureLibrary(mThis);
if (store.load()) {
for (String name : store.getGestureEntries()) {
if (isCancelled())
break;
for (Gesture gesture : store.getGestures(name)) {
final Bitmap bitmap = gesture.toBitmap(mThumbnailSize,
mThumbnailSize, mThumbnailInset, mPathColor);
final NamedGesture namedGesture = new NamedGesture();
namedGesture.gesture = gesture;
namedGesture.name = name;
mAdapter.addBitmap(namedGesture.gesture.getID(), bitmap);
publishProgress(namedGesture);
}
}
return STATUS_SUCCESS;
}
return STATUS_NOT_LOADED;
}