Skip to content

Add support for folders on home screen#103

Merged
tibbi merged 26 commits intoSimpleMobileTools:mainfrom
esensar:feature/folders
Aug 30, 2023
Merged

Add support for folders on home screen#103
tibbi merged 26 commits intoSimpleMobileTools:mainfrom
esensar:feature/folders

Conversation

@esensar
Copy link
Contributor

@esensar esensar commented Aug 1, 2023

This adds very basic support for folders on home screen. They are created by dragging icons on top of each other. These folders have a static folder icon right now.

@esensar
Copy link
Contributor Author

esensar commented Aug 21, 2023

This should be ready to test now.

There are improvements that could be made:

  • Folder icons - either allow some kind of customization or generate it based on icons inside of it
  • Animations - currently when dropping items inside the folder, other items can get rearranged if new icon is dropped in the middle - this looks really jumpy right now since there are no animations at all
  • Folder opening animation could look nice too

The logic for moving items around isn't perfect at the moment. It can happen sometimes that gaps appear in folders.

@tibbi
Copy link
Contributor

tibbi commented Aug 22, 2023

the folder definitely needs to show icons instead of the generic folder icon. And other UI improvements are needed too, but it seems to work fine and going in the right direction :)

@tibbi
Copy link
Contributor

tibbi commented Aug 22, 2023

I created a folder with 2 icons and then after dragging the second icon out of the folder to dismiss it, the app crashed
Process: com.simplemobiletools.launcher.debug, PID: 9105
java.lang.IllegalArgumentException: Cannot round NaN value.
at kotlin.math.MathKt__MathJVMKt.roundToInt(MathJVM.kt:1165)
at com.simplemobiletools.launcher.views.HomeScreenGrid.getFolderRect(HomeScreenGrid.kt:1500)
at com.simplemobiletools.launcher.views.HomeScreenGrid.onDraw(HomeScreenGrid.kt:1096)
at android.view.View.draw(View.java:24406)
at android.view.View.updateDisplayListIfDirty(View.java:23267)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4732)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4704)
at android.view.View.updateDisplayListIfDirty(View.java:23214)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4732)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4704)
at android.view.View.updateDisplayListIfDirty(View.java:23214)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4732)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4704)
at android.view.View.updateDisplayListIfDirty(View.java:23214)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4732)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4704)
at android.view.View.updateDisplayListIfDirty(View.java:23214)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4732)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4704)
at android.view.View.updateDisplayListIfDirty(View.java:23214)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4732)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4704)
at android.view.View.updateDisplayListIfDirty(View.java:23214)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:777)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:783)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:881)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:5647)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:5330)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:4486)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:3116)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10885)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1301)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1309)
at android.view.Choreographer.doCallbacks(Choreographer.java:923)
at android.view.Choreographer.doFrame(Choreographer.java:852)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1283)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8757)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

@esensar
Copy link
Contributor Author

esensar commented Aug 22, 2023

The crash should be fixed now, but I think I will need to do some further work on handling these changes, since there are some thing happening asynchronously and I think there is room for such race conditions right now.

@tibbi
Copy link
Contributor

tibbi commented Aug 23, 2023

check the conflicts please

@esensar esensar marked this pull request as ready for review August 24, 2023 14:27
@esensar
Copy link
Contributor Author

esensar commented Aug 24, 2023

Not sure if I should work on animations when placing items inside folders (when reordering items after new one has been placed in the folder). Other than that, this is ready for testing.

@tibbi
Copy link
Contributor

tibbi commented Aug 24, 2023

lets add a small vibration on long pressing a folder, like at long pressing an icon

@tibbi
Copy link
Contributor

tibbi commented Aug 24, 2023

if you have 2 lines of icons in the folder, the vertical empty space between them is too big

@tibbi
Copy link
Contributor

tibbi commented Aug 24, 2023

no need to add new animations now, lets focus on making it work well first

@tibbi
Copy link
Contributor

tibbi commented Aug 30, 2023

alright, this seems to work just fine to me now :)

@tibbi tibbi merged commit f25738a into SimpleMobileTools:main Aug 30, 2023
@esensar esensar deleted the feature/folders branch August 31, 2023 07:56
naveensingh added a commit to FossifyOrg/Launcher that referenced this pull request Feb 2, 2026
naveensingh added a commit to FossifyOrg/Launcher that referenced this pull request Feb 2, 2026
* feat: add options to show/hide app labels

Refs: #55

* refactor: remove dead adapter and dialog layout

Added in SimpleMobileTools/Simple-Launcher#103, but never used.

* fix: adjust icon spacing in folders when labels are disabled

* fix: use proper style for preference items with values
svenburkard pushed a commit to svenburkard/Launcher that referenced this pull request Feb 5, 2026
* feat: add options to show/hide app labels

Refs: FossifyOrg#55

* refactor: remove dead adapter and dialog layout

Added in SimpleMobileTools/Simple-Launcher#103, but never used.

* fix: adjust icon spacing in folders when labels are disabled

* fix: use proper style for preference items with values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants