After several days of searching, I found code that could turn on (or turn off) the Transition Animation Scale.
Settings.Global.putInt(getContentResolver(), Global.TRANSITION_ANIMATION_SCALE, 1);
But there is a big problem with this code. And if you ask, what is the problem? I would say that this line of code requires this permission:
< uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"/>
which is provided only to system applications . Therefore, your application must be systemic.
This question is about creating a system application: How to make my application system
UPDATE
and as @TripeHound said, we can
Display a dialog box informing the user that the application will look much nicer if you enable this option (with the option not to display the message again if they really want it)
How to open developer settings?
Thus:
startActivityForResult(new Intent(android.provider.Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS), 0);
Milad faridnia
source share