forked from upstream-mirrors/quik
Reorganize packages
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package com.moez.QKSMS.presentation.base
|
||||
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.view.MenuItem
|
||||
import kotlinx.android.synthetic.main.toolbar.*
|
||||
|
||||
abstract class QkActivity : AppCompatActivity() {
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
return when(item.itemId) {
|
||||
android.R.id.home -> {
|
||||
onBackPressed()
|
||||
true
|
||||
}
|
||||
else -> super.onOptionsItemSelected(item)
|
||||
}
|
||||
}
|
||||
|
||||
override fun setContentView(layoutResID: Int) {
|
||||
super.setContentView(layoutResID)
|
||||
setSupportActionBar(toolbar)
|
||||
title = title // The title may have been set before layout inflation
|
||||
}
|
||||
|
||||
override fun setTitle(title: CharSequence?) {
|
||||
super.setTitle(title)
|
||||
toolbarTitle?.text = title
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user