FORUMS
Remove All Ads from XDA

[MOD][XPOSED](v.1.14)SwiftkeyXthemes - Use Swiftkey themes from /sdcard

304 posts
Thanks Meter: 324
 
By nijel8, Senior Member on 15th February 2016, 05:50 AM
Post Reply Subscribe to Thread Email Thread
This is my first module which lets you use Swiftkey keyboard with themes from external storage folder of your choice. You can resize key text labels too to get bigger letters on the keys.
No more need to decompile/recompile Swiftkey just to add your favorite themes after every update... Now you can make and test new themes on the fly too. No need to reboot, just reapply theme to see changes immediately.
Install it, enable the module, in module settings set your themelist.json and enable key label resize if you wish, restart android and your themes will be listed in Swiftkey themes setting just like any build-in theme... Apply it, done...

Took me some deep digging in the obscure code but I think I finally got it working the way I wanted.

NOTE: If you are using downloaded themes from Swiftkey store, you have to redownload them... well... not really... they are still on your /sdcard. Swiftkey will just unzip them again but this time they will be placed side by side with your custom themes in the custom folder you set in the module settings.
The module should work with Swiftkey beta too.

Download and source code links located in Xposed Module Repository.

Attachment 2: Module settings;

Attachment 1: How Swiftkey themes settings looks like with module running, Google Material Light is my theme on /sdcard;

Attachment 3: My /sdcard themes folder with additional theme downloaded from Swiftkey store;

Attachment 4: Choose your themelist.json dialog...

Current version:. v.1.14
Change log:
v. 1.14 Fix for latest Swiftkey update.

v. 1.13: Fixed bug - failed to apply downloaded themes from Swiftkey store.

v. 1.12: Fix for recent Swiftkey Beta update, Now module keeps logging to "/sdcard/Xswiftkey.logcat" if debugging and export is enabled and theme is applied in Swiftkey theme settings saving any errors might occur.

v. 1.11: Added logic for dynamically locating the classes needed. At boot time module scans the Swiftkey package and grabs the names of those classes based on search criteria which are less likely to change over time. This way module is less likely to brake(I hope...) after Swiftkey update. Thanks to JesusFreke for his smali/dexlib2 library.
Fixed force close bug when browsing for themelist after clean install.

v. 1.1: Module updated for recent Swiftkey Beta update which moved some classes around. Now module needs to know which Swiftkey package to handle so new CheckBox preference is added - check if using Swiftkey Beta, reboot.

v. 1.09: Added check at module startup for critical hooks - if for example after Swifkey update module can not hook essential methods, it should exit and let Swifkey work with stock themes... Otherwise Swiftkey might delete all our custom themes.
Added new preference to enable exporting filtered logcat to "/sdcard/Xswiftkey.logcat" at boot time. Provide it to get better support.

v. 1.08: Removed save theme service required permission for better compatibility. New option to override Swiftkey theme preferences title with your themes location, app icon refresh.

v.1.07: Fixed bug: unable to browse folders if already selected theme folder path was changed(folder renamed, old path not exists). Added some user useful logging in logcat: now if you enable debug, restart android and read logcat, module will detect if there is inconsistencies in your themes and themelist - existing theme folders but missing in themelist(warning message in blue) and themes listed in themelist but missing in your theme folder(error message in red)... if any. These inconsistencies will not cause any problems(module takes care of that) but is good to keep themes folder clean...

v.1.06: Throwing the theme if is in themelist but do not exist in theme folder so Swiftkey wont crash.

v.1.05: Improved themes type handling, improved save current theme handling, some user experience improvements in Choose themelist dialog.

v. 1.04: For Android 6.0 now module should ask for read /sdcard permission if can't read it. Improved logic for how Swiftkey should add themes, added option in Module settings to enable debugging in logcat.

v. 1.03: Rebuild module with Android 6.0 SDK to see if will help with some users not seeing themes in Swiftkey Beta.

v. 1.02: Fixed force close if "assets" themes have same ID as my themes, like if you use "assets" SuperSwiftkey themes folder.

v. 1.01: Fixed bug with selecting themelist from theme folder with too many subfolders, like the one from SuperSwiftkey themes.

v. 1.0: Initial release.

If asking for help please provide logcat:
Enable debug and logcat export in module settings, reboot phone... Post "/sdcard/Xswiftkey.logcat" file.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2016-02-15-09-35-37.png
Views:	5140
Size:	113.7 KB
ID:	3647279   Click image for larger version

Name:	Screenshot_2016-02-14-13-42-16.png
Views:	5016
Size:	50.6 KB
ID:	3647283   Click image for larger version

Name:	Screenshot_2016-02-15-09-38-20.png
Views:	4988
Size:	41.4 KB
ID:	3647286   Click image for larger version

Name:	Screenshot_2016-02-15-09-42-43.png
Views:	4444
Size:	42.9 KB
ID:	3647289  
Last edited by nijel8; 19th March 2016 at 04:08 PM. Reason: Added some screenshots...
The Following 20 Users Say Thank You to nijel8 For This Useful Post: [ View ] Gift nijel8 Ad-Free
 
 
15th February 2016, 08:11 AM |#2  
exodius48's Avatar
Senior Member
Flag Hatinya Nabilah
Thanks Meter: 192
 
Donate to Me
More
Any screenshot bro?
And will it work with any version of swiftkey (final & beta)?
15th February 2016, 12:09 PM |#3  
jrcyscon's Avatar
Junior Member
Flag Lemont
Thanks Meter: 1
 
More
Quote:
Originally Posted by exodius48

Any screenshot bro?
And will it work with any version of swiftkey (final & beta)?

I'm wondering the same thing. I would like to see how it looks before I install it
15th February 2016, 03:12 PM |#4  
Senior Member
Thanks Meter: 54
 
More
This sounds great. I assume themes from Super SwiftKey will work as well? Perhaps a quick tutorial will be helpful to the not so advanced users?
The Following 2 Users Say Thank You to sunwee For This Useful Post: [ View ] Gift sunwee Ad-Free
15th February 2016, 03:40 PM |#5  
ogisha's Avatar
Member
Thanks Meter: 87
 
More
Is it enough to unpack SuperSwiftkey apk to desired folder?

Does thus module work with SuperSwiftkey-beta?

Thank you.
15th February 2016, 03:48 PM |#6  
OP Senior Member
Thanks Meter: 324
 
More
Quote:
Originally Posted by sunwee

This sounds great. I assume themes from Super SwiftKey will work as well? Perhaps a quick tutorial will be helpful to the not so advanced users?

This module should work with beta too, I actually started developing it on Swiftkey beta and when I got the basics running I switch to regular Swiftkey. Haven't tested the final version on beta but please let me know if there is any problems.
Doesn't matter where the themes come from as long as they are confirmed working with Swiftkey.
Quick how to: Just copy your "themes" folder with your themes and "themelist.json" inside it from Swiftkey "assets" anywhere on /sdcard, choose your "themelist.json" in module settings, reboot and apply your themes from Swiftkey themes settings... Simple as that. The only requirement is your theme list to be named "themelist.json" and it's parent folder (your themes folder) named "themes". These names are hard coded in Swiftkey code so we don't want to brake something else...

And some more screenshots...

Attachment 1: how your "themelist.json" will look like after you download themes from Swiftkey store. Swiftkey will just add them to your themelist automatically and they will be available side by side with your themes;

Attachment 2 and 3: Key labels Swiftkey default size vs. resized to my liking, values in first post first screenshot.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2016-02-15-09-40-39.png
Views:	1404
Size:	58.1 KB
ID:	3647326   Click image for larger version

Name:	Screenshot_2016-02-15-09-45-09.png
Views:	1418
Size:	22.7 KB
ID:	3647327   Click image for larger version

Name:	Screenshot_2016-02-15-09-46-58.png
Views:	1894
Size:	24.9 KB
ID:	3647328  
Last edited by nijel8; 15th February 2016 at 04:13 PM.
The Following 2 Users Say Thank You to nijel8 For This Useful Post: [ View ] Gift nijel8 Ad-Free
15th February 2016, 04:08 PM |#7  
OP Senior Member
Thanks Meter: 324
 
More
Quote:
Originally Posted by ogisha

Is it enough to unpack SuperSwiftkey apk to desired folder?

Does thus module work with SuperSwiftkey-beta?

Thank you.

Super Swiftkey is just Swiftkey with added themes. What this module do is that you don't need Super Swiftkey... Just move Super Swiftkey "themes" folder from "assets" to your /sdcard, install normal Swiftkey or beta and it will be just like your Super Swiftkey.

Maybe something I should mention here. Due to the obscure code... and lot of it(over 3600 class files)... I expect things to brake after Swiftkey update, but it should be easy and quick fix. I will try to keep up with module updates. That's why I made the module source code available with comments in it what does what so if someone wants to help can easy make the changes needed. I will highly welcome any help with quick updates... even I wont look for any credits. Just post quck module updates....
The Following User Says Thank You to nijel8 For This Useful Post: [ View ] Gift nijel8 Ad-Free
15th February 2016, 07:41 PM |#8  
Member
Thanks Meter: 7
 
More
I took themes folder from SuperSwiftkey. When I try to select themelist.json file your app crashes. What can I do to help?
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20160215-210829.jpg
Views:	822
Size:	91.5 KB
ID:	3647538  
15th February 2016, 07:50 PM |#9  
OP Senior Member
Thanks Meter: 324
 
More
Can you provide logcat with the crash error? Can't really help without it.
What your folder structure looks like starting from /sdcard path? Any spaces or funny characters in the file path?

EDIT: Copying SuperSwiftkey themes now to see if I can reproduce the error... That thing is biiiig... My list adapter will struggle with those 296 items... We'll see...
Last edited by nijel8; 15th February 2016 at 08:07 PM.
15th February 2016, 08:09 PM |#10  
Member
Thanks Meter: 7
 
More
Quote:
Originally Posted by nijel8

Can you provide logcat with the crash error? Can't really help without it.
What your folder structure looks like starting from /sdcard path? Any spaces or funny characters in the file path?

themes are stored in /sdcard/Swiftkey/themes/

I'm not sure if I'm doing a logcat correctly but it shows nothing when the app crashes.
15th February 2016, 08:14 PM |#11  
OP Senior Member
Thanks Meter: 324
 
More
That's strange... Should show something. I might have an idea what might be wrong. I am saving the scroll position so when you rotate the screen you don't have to scroll all over again, which maybe causing that crash with so many items in the list. Let me test it and will be back.

Read More
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes