Use anko extensions

pull/10/head
atbest 6 years ago
parent 457951fdc7
commit 53424f69a0
  1. 7
      app/src/main/java/io/legado/app/ui/main/MainActivity.kt

@ -8,8 +8,8 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.GravityCompat
import androidx.drawerlayout.widget.DrawerLayout
import com.google.android.material.navigation.NavigationView
import com.google.android.material.snackbar.Snackbar
import io.legado.app.R
import io.legado.app.utils.longSnackbar
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.app_bar_main.*
@ -22,10 +22,7 @@ class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelecte
setSupportActionBar(toolbar)
fab.setOnClickListener { view ->
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show()
}
fab.setOnClickListener { it.longSnackbar(R.string.action) }
val toggle = ActionBarDrawerToggle(
this, drawer_layout, toolbar,

Loading…
Cancel
Save