Add more tests, fix lint errors and add check to travis

This commit is contained in:
Mygod
2017-12-14 14:55:00 -08:00
parent d081d06903
commit 30b56c97ea
14 changed files with 175 additions and 39 deletions
@@ -54,7 +54,9 @@ class ScannerActivity : AppCompatActivity(), ZXingScannerView.ResultHandler {
setContentView(R.layout.layout_scanner)
val toolbar = findViewById<Toolbar>(R.id.toolbar)
toolbar.title = title
toolbar.setNavigationIcon(R.drawable.abc_ic_ab_back_material)
val arr = obtainStyledAttributes(intArrayOf(R.attr.homeAsUpIndicator))
toolbar.navigationIcon = arr.getDrawable(0)
arr.recycle()
toolbar.setNavigationOnClickListener { navigateUp() }
scannerView = findViewById(R.id.scanner)
if (Build.VERSION.SDK_INT >= 25) getSystemService(ShortcutManager::class.java).reportShortcutUsed("scan")