How do I enable the Transition Scaling software in the Developer Options?

I have some animated transitions for my activity. Therefore, when an action begins, some fading animations appear in it. Here is the code:

Intent intent = new Intent(this, NextActivity.class); startActivity(intent); overridePendingTransition (android.R.anim.fade_in, android.R.anim.fade_out); 

The problem is that these animations will not be executed when the "Transition Scale" in the "Developer Options" is disabled. So I'm looking for a way to enable this feature programmatically to make sure my animations are shown. Is there a way to set the Transition Animation Scale to 1x Animation Scale?

+4
android animation transitions
source share
1 answer

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); 
+8
source share

All Articles