List of usage examples for android.gesture GestureLibraries fromFile
public static GestureLibrary fromFile(File path)
From source file:com.gigathinking.simpleapplock.UnlockWithGesture.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.layout_unlockwithgesture); GestureOverlayView view = (GestureOverlayView) findViewById(R.id.gestureOverlayView); view.addOnGestureListener(new GestureProcessor()); File gestureFile = new File(Environment.getDataDirectory() + "/data/" + getPackageName(), AppLockApplication.GESTUREFILE); library = GestureLibraries.fromFile(gestureFile); Bundle bundle = getIntent().getExtras(); mPackage = bundle.getString(Intent.EXTRA_TEXT); unlockSelf = bundle.getBoolean(AppLockApplication.UNLOCK_SELF); changeLock = false;/* w w w .j a va2s . co m*/ changeLock = bundle.getBoolean(AppLockApplication.CHANGELOCK); }
From source file:com.gigathinking.simpleapplock.SetupGestureLock.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); changeLock = getIntent().getBooleanExtra(AppLockApplication.CHANGELOCK, false); String message = changeLock ? getString(R.string.change_gesture) : getString(R.string.create_gesture); setContentView(R.layout.layout_unlockwithgesture); File gestureFile = new File(Environment.getDataDirectory() + "/data/" + getPackageName(), AppLockApplication.GESTUREFILE); GestureOverlayView gestureOverlayView = (GestureOverlayView) findViewById(R.id.gestureOverlayView); gestureOverlayView.addOnGestureListener(new GestureProcessor()); findViewById(R.id.id_ll_icon).setVisibility(View.GONE); findViewById(R.id.id_btn_forgot_gesture).setVisibility(View.GONE); ((TextView) findViewById(R.id.tv_unlock_message)).setText(message); first = true;/* w w w . j a va 2 s . c o m*/ library = GestureLibraries.fromFile(gestureFile); }
From source file:com.droidvnteam.hexagonrom.GestureAnywhereBuilderActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.ga_gestures_list); mAdapter = new GesturesAdapter(this); setListAdapter(mAdapter);/*from w ww .j a v a 2 s . c om*/ mView = (LinearLayout) findViewById(R.id.gesturesList); if (sStore == null) { sStore = GestureLibraries.fromFile(mStoreFile); } mEmpty = (TextView) findViewById(android.R.id.empty); loadGestures(); mPicker = new ShortcutPickHelper(this, this); registerForContextMenu(getListView()); }
From source file:com.cl.slack.gesture.GestureBuilderActivity.java
private void initGestures() { sStore = GestureLibraries.fromFile(mStoreFile); // sStore = GestureLibraries.fromRawResource(this,R.raw.gestures); }