android - FrameLayout: is it possible to put child layout off-screen? -


is possible have structure 1 below. , have linearlayout @ front off screen:

<framelayout>     <linearlayout>    .. layout    </linearlayout>     <linearlayout>    .. front layout    </linearlayout>  </framelayout> 

here image.enter image description here have tried: have tried setting android:layout_marginleft="-300dp" linearlayout (front), test on phone layout inside of visible area. have tried pushing layout off screen translateanimation, after animation ends layout inside of visible area.

please me solve problem. thank you.

so in case needs here how solved it. sliding menu on top of content. layout structure described in question. here simple animation in xml: show_menu.xml

<?xml version="1.0" encoding="utf-8"?>  <set     xmlns:android="http://schemas.android.com/apk/res/android"     android:shareinterpolator="false">     <translate         android:fromxdelta="-100%"          android:toxdelta="0%"         android:duration="400">     </translate> </set> 

hide_menu.xml:

<?xml version="1.0" encoding="utf-8"?> <set     xmlns:android="http://schemas.android.com/apk/res/android"     android:shareinterpolator="false">     <translate         android:fromxdelta="0%"          android:toxdelta="-100%"         android:duration="400">     </translate> </set> 

in myactivity

//loading hide animation , setting listener. anim = animationutils.loadanimation(this, r.anim.hide_menu);      anim.setanimationlistener(new animation.animationlistener() {          @override         public void onanimationstart(animation animation) {             // todo auto-generated method stub          }          @override         public void onanimationrepeat(animation animation) {             // todo auto-generated method stub          }         //on animation end setting visibility gone         @override         public void onanimationend(animation animation) {             // todo auto-generated method stub             menulist.setvisibility(view.gone);         }     }); 

same thing done animation show_menu animtaion except have onanimationstart setting visibilty visible. menulist in code layout figure in question.

update: *the best way sliding menu today use drawerlayout.*


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -