DictionaryForMids Forum

DictionaryForMIDs for Android devices => General discussions => Topic started by: tj4 on 24. July 2017, 19:20:59

Title: Dictionaryformids android app icon for different dictionaries
Post by: tj4 on 24. July 2017, 19:20:59
Could there be a different android app icon on the home screen for different dictionaries, if this is possible?

Best,
Tom
Title: Re: Dictionaryformids android app icon for different dictionaries
Post by: axin on 29. July 2017, 18:34:41
Hey Tom,

That's a great idea - what's your use case behind this? Additionally, what's the downside of having all dictionaries active (which is already available in the app)?

I think the following needs to be done to get this into the app:
- Implement an intent, similar to the one to load a newly installed dictionary (https://github.com/DictionaryForMIDs/Android/blob/master/src/main/java/de/kugihan/dictionaryformids/hmi_android/DictionaryForMIDs.java#L849). I guess it would load that dictionary and unload all other active dictionaries - or what's your use case?
- Use the Android ShorcutManager to implement a dynamic shortcut (https://developer.android.com/guide/topics/ui/shortcuts.html#dynamic) to a dictionary (ie. the newly implemented intent). Those shortcuts can have different icons

Happy to help any volunteers to get started on this!

Cheers,

Achim
Title: Re: Dictionaryformids android app icon for different dictionaries
Post by: tj4 on 31. July 2017, 15:55:54
That's a great idea - what's your use case behind this?

Being able to look up a word in a certain language quickly.

Additionally, what's the downside of having all dictionaries active (which is already available in the app)?

By default, if the dictionary you want is at the bottom, you can either scroll past the other dictionaries' results, or select other dictionaries to fold them closed. Even if an Android app icon moved the desired dictionary to the top, the app is pointlessly searching for a result, making the app less responsive.