@Override public void onClick(View v) { if (v.equals(holder.getBtnAddGroup())) { AddGroup addGroup = new AddGroup(); addGroup.show(getFragmentManager(), getTag()); } }
@Override public void run() { // Create new database record Database db = new Database(); App.setDB(db); // Create the PwDatabaseV3 PwDatabaseV3 pm = new PwDatabaseV3(); pm.algorithm = PwEncryptionAlgorithm.Rjindal; pm.numKeyEncRounds = DEFAULT_ENCRYPTION_ROUNDS; pm.name = "KeePass Password Manager"; // Build the root group pm.constructTree(null); // Set Database state db.root = pm.rootGroup; db.pm = pm; db.mFilename = mFilename; db.setLoaded(); // Add a couple default groups AddGroup internet = AddGroup.getInstance(db, "Internet", pm.rootGroup, null, true); internet.run(); AddGroup email = AddGroup.getInstance(db, "eMail", pm.rootGroup, null, true); email.run(); // Commit changes SaveDB save = new SaveDB(db, mFinish, mDontSave); mFinish = null; save.run(); }