android - Animation while going from a fragment to an activity -
i have text view
in fragment
when click on text view activity called takes me away new layout doubt is. possible animation while going fragment layout activity layout.
here fragment:
using system; using system.collections.generic; using system.linq; using system.text; using android.app;` using android.content; using android.os; using android.runtime; using android.util; using android.views; using android.widget; namespace tabbedapp { public class icontextcallfragment : android.support.v4.app.fragment { public override void oncreate (bundle savedinstancestate) { base.oncreate (savedinstancestate); } public override view oncreateview (layoutinflater inflater, viewgroup container, bundle savedinstancestate) { // use return custom view fragment view view =inflater.inflate(resource.layout.icontxtcalllayout, container, false); var textview = view.findviewbyid<textview>(resource.id.clickable_text_view); textview.click += startnewactivity; return view; } void startnewactivity(object sender, eventargs e) { intent intent = new intent(this.activity, typeof(activity1)); this.startactivity(intent); var trans = this.fragmentmanager.begintransaction(); trans.setcustomanimations(resource.animation.bouncetop, resource.animation.slide_out, resource.animation.bouncetop, resource.animation.slide_out); trans.addtobackstack(null); trans.commit(); } } }
activity:
using system; using system.collections.generic; using system.linq; using system.text; using android.app; using android.content; using android.os; using android.runtime; using android.views; using android.widget; namespace tabbedapp { [activity(label = "activity1")] public class activity1 : activity { protected override void oncreate(bundle savedinstancestate) { base.oncreate(savedinstancestate); setcontentview(resource.layout.layout1); } } }
Comments
Post a Comment