This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MemoryTesterActivity extends AppCompatActivity { | |
List<String> memoryHog; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_memory_tester); | |
memoryHog = new ArrayList<>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void populateBusstopList() { | |
stopsCursor = mDbHelper.fetchAllBusstops(); | |
bussStopList = new ArrayList<OverlayItem>(); | |
if (stopsCursor.moveToFirst()) { | |
int nameColumn = stopsCursor.getColumnIndex(QueryDb.KEY_STOP_NAME); | |
int latColumn = stopsCursor.getColumnIndex(QueryDb.KEY_STOP_LATITUDE); | |
int lngColumn = stopsCursor.getColumnIndex(QueryDb.KEY_STOP_LONGITUDE); | |
do { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void AddNewBankAccountToPerson(Person person) throws SQLException { | |
//Create new account | |
BankAccount bankAccount = new BankAccount(); | |
bankAccount.accountNumber = 123456; | |
bankAccount.balance = 100; | |
ormLiteDB.bankAccountDao.create(bankAccount); | |
//Fetch from DB to get ID | |
bankAccount = ormLiteDB.bankAccountDao.queryForMatching(bankAccount).get(0); |