Android fragmentactivity Intent Jump Package

Source: Internet
Author: User

Package Com.innjoo.store.utils;import Com.innjoo.store.r;import Android.content.activitynotfoundexception;import Android.content.intent;import Android.support.v4.app.fragmentactivity;public class IntentUtils {private static Intent intent;private static Final Object lock = new Object ();p ublic static final int ENTER = 0, out = 1, notransition =- 1;/** * * @Title: Startactivityenter * @Description: TODO jumps into * @return void * @throws * @author replay * @email [email&nbsp ;p rotected] * @date 2014-12-18 morning 10:05:16 */public static <T> void startactivity (int inorout,fragmentactivity Activ ity, class<t> Class1, String key,object Object) {//TODO auto-generated method Stubsynchronized (lock) {try {intent = new Intent (activity, Class1); if (Object! = NULL && object instanceof String) {Intent.putextra (key, (String) obje CT);} else if (Object! = NULL && object instanceof Integer) {Intent.putextra (key, (Integer) object);} Activity.startactivity (intent); switch (inorout) {case ENTER:activity.overridependingtransition (r.anim.activity_right_in, r.anim.activity_left_out); Break;case out: Activity.overridependingtransition (r.anim.activity_left_in,r.anim.activity_right_out); break;default:break;}} catch (Activitynotfoundexception e) {}}}}

Android fragmentactivity Intent Jump Package

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.