mirror of
https://github.com/SimpleMobileTools/Simple-App-Launcher.git
synced 2025-03-04 19:37:57 +01:00
updating commons + code cleanup
This commit is contained in:
parent
459f9ecfec
commit
ebfdbb30c3
app
@ -63,7 +63,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:b4ea9f1e0d'
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:8ee6c0c17b'
|
||||
implementation 'androidx.multidex:multidex:2.0.1'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||
}
|
||||
|
@ -34,10 +34,10 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_main)
|
||||
appLaunched(BuildConfig.APPLICATION_ID)
|
||||
setupOptionsMenu()
|
||||
refreshMenuItems()
|
||||
|
||||
appLaunched(BuildConfig.APPLICATION_ID)
|
||||
setupEmptyView()
|
||||
setupLaunchers()
|
||||
checkWhatsNewDialog()
|
||||
@ -90,32 +90,15 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
||||
private fun setupOptionsMenu() {
|
||||
main_toolbar.setOnMenuItemClickListener { menuItem ->
|
||||
when (menuItem.itemId) {
|
||||
R.id.sort -> {
|
||||
showSortingDialog()
|
||||
true
|
||||
}
|
||||
R.id.toggle_app_name -> {
|
||||
toggleAppName()
|
||||
true
|
||||
}
|
||||
R.id.increase_column_count -> {
|
||||
increaseColumnCount()
|
||||
true
|
||||
}
|
||||
R.id.reduce_column_count -> {
|
||||
reduceColumnCount()
|
||||
true
|
||||
}
|
||||
R.id.settings -> {
|
||||
launchSettings()
|
||||
true
|
||||
}
|
||||
R.id.about -> {
|
||||
launchAbout()
|
||||
true
|
||||
}
|
||||
else -> false
|
||||
R.id.sort -> showSortingDialog()
|
||||
R.id.toggle_app_name -> toggleAppName()
|
||||
R.id.increase_column_count -> increaseColumnCount()
|
||||
R.id.reduce_column_count -> reduceColumnCount()
|
||||
R.id.settings -> launchSettings()
|
||||
R.id.about -> launchAbout()
|
||||
else -> return@setOnMenuItemClickListener false
|
||||
}
|
||||
return@setOnMenuItemClickListener true
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user