1 Reason: When you search for activity on the Internet, it basically tells you that eitherXMLOr isoverridependingtransition, but if you are the service startup activity what to do, this online does not have an answer, so I think about it, found in fact very simple. 2 Solution:In fact, it is very simple, let us understand the principle, so-called activity switching is nothing more than activity according to theme or others startactivity when the call overridependingtransition Changes the parameters of the activity switch, so it's easy to call overridependingtransition in the OnCreate method of the activity you want to start.
@Overrideprotected void OnCreate (Bundle savedinstancestate) {overridependingtransition (0, 0); Super.oncreate ( Savedinstancestate); Setcontentview (r.layout.history_activity); Initview ();}
Finally, if you want to implement service control, then let the service pass the parameters and then modify theoverridependingtransitionyou can do it. Online are all the same, found the API to think unsanitary environment, in fact, we are more reflective of this API trial occasion.
"Android" activity toggle effect-How to control when you start your activity through the service