diff --git a/app/build.gradle b/app/build.gradle index 7b59336..8cf6060 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -43,5 +43,5 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:6f922ee918' + implementation 'com.github.SimpleMobileTools:Simple-Commons:8b339d6e4b' } diff --git a/app/src/main/kotlin/com/simplemobiletools/launcher/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/launcher/activities/MainActivity.kt index 20802a5..c2f8c2e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/launcher/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/launcher/activities/MainActivity.kt @@ -5,10 +5,12 @@ import android.content.Context import android.content.Intent import android.content.pm.LauncherApps import android.content.pm.PackageManager +import android.graphics.Color import android.graphics.drawable.Drawable import android.os.Bundle import android.view.Surface import android.view.WindowManager +import android.widget.FrameLayout import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.isRPlus import com.simplemobiletools.commons.views.MyGridLayoutManager @@ -25,28 +27,17 @@ class MainActivity : SimpleActivity() { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) appLaunched(BuildConfig.APPLICATION_ID) - setupOptionsMenu() getLaunchers() } override fun onResume() { super.onResume() - setupToolbar(main_toolbar) - updateTextColors(main_coordinator) launchers_fastscroller.updateColors(getProperPrimaryColor()) + (launchers_holder.layoutParams as FrameLayout.LayoutParams).topMargin = statusBarHeight + updateStatusbarColor(Color.TRANSPARENT) setupNavigationBar() } - private fun setupOptionsMenu() { - main_toolbar.setOnMenuItemClickListener { menuItem -> - when (menuItem.itemId) { - R.id.settings -> launchSettings() - else -> return@setOnMenuItemClickListener false - } - return@setOnMenuItemClickListener true - } - } - @SuppressLint("WrongConstant") private fun getLaunchers() { val allApps = ArrayList() @@ -131,9 +122,4 @@ class MainActivity : SimpleActivity() { launchers_grid.setPadding(0, 0, resources.getDimension(R.dimen.medium_margin).toInt(), bottomListPadding) launchers_fastscroller.setPadding(leftListPadding, 0, rightListPadding, 0) } - - private fun launchSettings() { - hideKeyboard() - startActivity(Intent(applicationContext, SettingsActivity::class.java)) - } } diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 48ec708..d83bee2 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,74 +1,22 @@ - + android:layout_height="wrap_content"> - - + android:layout_height="match_parent" + android:clipToPadding="false" + app:layoutManager="com.simplemobiletools.commons.views.MyGridLayoutManager" + app:spanCount="@integer/portrait_column_count" /> - - - - - - - - - - - - - - - - - - - + + diff --git a/app/src/main/res/layout/item_launcher_label.xml b/app/src/main/res/layout/item_launcher_label.xml index 5d8a910..b2b01d5 100644 --- a/app/src/main/res/layout/item_launcher_label.xml +++ b/app/src/main/res/layout/item_launcher_label.xml @@ -24,7 +24,7 @@ android:layout_below="@+id/launcher_icon" android:ellipsize="end" android:gravity="center_horizontal|top" - android:maxLines="2" + android:maxLines="1" android:textSize="@dimen/smaller_text_size" /> diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml deleted file mode 100644 index 4fae7a8..0000000 --- a/app/src/main/res/menu/menu_main.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - -