animation - Change the orientation transition of the screen from right to left in Verticle Slider in Android -
i working vertical slider similar facebook in devices shown in below image. using library project facebook-like slide-out navigation slider view.
my requirement show slider @ both ends of screen, left right , right left shown in image. requirement:
when click on left top button, screen oriented left right, correct. problem is: whenever screen on right top button screen oriented, directed left right should come right left.
i working facebook-like slide-out navigation , below custom code:
public class sampleactivity extends activity {
@override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.sample); findviewbyid(r.id.sample_button).setonclicklistener( new view.onclicklistener() { @override public void onclick(view v) { int width = (int)typedvalue.applydimension(typedvalue.complex_unit_dip, 40, getresources().getdisplaymetrics()); slideoutactivity.prepare(sampleactivity.this, r.id.inner_content, width); startactivity(new intent(sampleactivity.this, menuactivity.class)); overridependingtransition(0, 0); } }); findviewbyid(r.id.sample_button1).setonclicklistener(new onclicklistener() { @override public void onclick(view v) { int width = (int)typedvalue.applydimension(typedvalue.complex_unit_dip, 40, getresources().getdisplaymetrics()); slideoutactivity.prepare(sampleactivity.this, r.id.inner_content, width); startactivity(new intent(sampleactivity.this, menuoneactivity.class)); overridependingtransition(r.anim.slide_in_right,r.anim.slide_in_left); } }); } @override protected void onactivityresult(int requestcode, int resultcode, intent data) { // todo auto-generated method stub overridependingtransition(r.anim.slide_in_right,r.anim.slide_in_left); } }
after long research, done task have 2 sliders on both end of screen. got valuable code github link of srikanthgr
thanks valuable code.
Comments
Post a Comment