Sorting for renaming is now implemented.

This commit is contained in:
ottoptj 2024-05-12 23:44:26 +03:00
commit 02115b1ade
2 changed files with 4 additions and 1 deletions

View file

@ -142,8 +142,10 @@ class AppMenuActivity : AppCompatActivity(), AppMenuAdapter.OnItemClickListener,
} }
} }
return allApps.sortedBy { return allApps.sortedBy {
it.first.applicationInfo.loadLabel(packageManager).toString().lowercase() sharedPreferenceManager.getAppName(this, it.first.applicationInfo.packageName,it.second.second, it.first.applicationInfo.loadLabel(packageManager)).toString().lowercase()
} }
} }
override fun onStop() { override fun onStop() {

View file

@ -62,6 +62,7 @@ class AppMenuAdapter(private val activity: AppMenuActivity, private var apps: Li
} }
} }
} }
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AppViewHolder { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AppViewHolder {
val view = LayoutInflater.from(parent.context) val view = LayoutInflater.from(parent.context)
.inflate(R.layout.app_item_layout, parent, false) .inflate(R.layout.app_item_layout, parent, false)