mirror of
https://github.com/He4eT/yamf_launcher.git
synced 2026-05-05 09:57:26 +00:00
Hiding seems to be working?
This commit is contained in:
parent
f5a75f4263
commit
15f58dc886
2 changed files with 6 additions and 8 deletions
|
|
@ -104,7 +104,8 @@ class AppActionMenu {
|
||||||
|
|
||||||
actionMenu.findViewById<TextView>(R.id.hide).setOnClickListener {
|
actionMenu.findViewById<TextView>(R.id.hide).setOnClickListener {
|
||||||
sharedPreferenceManager.setAppHidden(activity, appInfo.packageName, workProfile, true)
|
sharedPreferenceManager.setAppHidden(activity, appInfo.packageName, workProfile, true)
|
||||||
|
activity.manualRefreshApps()
|
||||||
|
actionMenu.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
actionMenu.findViewById<TextView>(R.id.close).setOnClickListener {
|
actionMenu.findViewById<TextView>(R.id.close).setOnClickListener {
|
||||||
|
|
|
||||||
|
|
@ -33,12 +33,12 @@ class AppMenuAdapter(private var apps: List<Pair<LauncherActivityInfo, Pair<User
|
||||||
inner class AppViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
inner class AppViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||||
private val listItem: FrameLayout = itemView.findViewById(R.id.list_item)
|
private val listItem: FrameLayout = itemView.findViewById(R.id.list_item)
|
||||||
val textView: TextView = listItem.findViewById(R.id.app_name)
|
val textView: TextView = listItem.findViewById(R.id.app_name)
|
||||||
val actionMenuLayout: LinearLayout = listItem.findViewById(R.id.action_menu)
|
private val actionMenuLayout: LinearLayout = listItem.findViewById(R.id.action_menu)
|
||||||
val editView: LinearLayout = listItem.findViewById(R.id.rename_view)
|
val editView: LinearLayout = listItem.findViewById(R.id.rename_view)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
actionMenuLayout.visibility = View.GONE
|
actionMenuLayout.visibility = View.INVISIBLE
|
||||||
editView.visibility = View.GONE
|
editView.visibility = View.INVISIBLE
|
||||||
|
|
||||||
itemView.setOnClickListener {
|
itemView.setOnClickListener {
|
||||||
val position = bindingAdapterPosition
|
val position = bindingAdapterPosition
|
||||||
|
|
@ -69,10 +69,7 @@ class AppMenuAdapter(private var apps: List<Pair<LauncherActivityInfo, Pair<User
|
||||||
val appInfo = app.first.activityInfo.applicationInfo
|
val appInfo = app.first.activityInfo.applicationInfo
|
||||||
holder.textView.text = appInfo.loadLabel(holder.itemView.context.packageManager)
|
holder.textView.text = appInfo.loadLabel(holder.itemView.context.packageManager)
|
||||||
holder.editView.findViewById<EditText>(R.id.app_name_edit).setText(holder.textView.text)
|
holder.editView.findViewById<EditText>(R.id.app_name_edit).setText(holder.textView.text)
|
||||||
holder.actionMenuLayout.viewTreeObserver.addOnGlobalLayoutListener {
|
holder.textView.visibility = View.VISIBLE
|
||||||
Log.d("Yooo", position.toString())
|
|
||||||
// Perform any action you want here
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemCount(): Int {
|
override fun getItemCount(): Int {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue