2

In this code my Relative layout content Btn2,Btn3,Btn4,Btn5 are rotate like a pendulum but i want to rotate my Relative layout only not its content.

my pendulum xml is..

  <?xml version="1.0" encoding="utf-8"?>
  <rotate xmlns:android="http://schemas.android.com/apk/res/android"
  android:fromDegrees="15"
  android:toDegrees="-15"
  android:pivotX="50%"
  android:pivotY="0%"
  android:duration="2000"
  android:repeatMode="reverse"
  android:repeatCount="-1"
  />

my java code is here

    setContentView(R.layout.activity_main);
    Button Btn1=(Button) findViewById(R.id.pendulum);
    Button Btn2=(Button) findViewById(R.id.pendulum1);
    Button Btn3=(Button) findViewById(R.id.pendulum2);
    Button Btn4=(Button) findViewById(R.id.pendulum3);
    Button Btn5=(Button) findViewById(R.id.pendulum4);

    FrameLayout ln=(FrameLayout) findViewById(R.id.ln);
    RelativeLayout rl=(RelativeLayout) findViewById(R.id.rel);


    Animation rotateAnim = AnimationUtils.loadAnimation(this, R.anim.pendulum);

    LayoutAnimationController animController = new LayoutAnimationController(rotateAnim, 0);

    rl.setLayoutAnimation(animController);



}
Mahi
  • 1,754
  • 2
  • 16
  • 37
  • 1
    Duplicate Question - http://stackoverflow.com/q/15738442/614807 – Chirag Apr 01 '13 at 11:26
  • hi chirag..mere purane questions m layout k content rotate ho rahe h not my perticular layout..if u have any type of solution plz info me – Mahi Apr 01 '13 at 11:28
  • 1
    Hi , Have a look at this url https://github.com/chiuki/android-pendulum-animation – itsrajesh4uguys Apr 01 '13 at 11:29
  • Please edit your original question and flag it for reopening rather than posting a new question. – ChrisF Apr 01 '13 at 17:25
  • @MahiSingh Bro look at this links for solution of your folding view problem :http://stackoverflow.com/questions/9940605/how-to-fold-view-from-middle-in-android – GOLDEE Apr 03 '13 at 06:50
  • http://stackoverflow.com/questions/3912849/implement-page-curl-on-android – GOLDEE Apr 03 '13 at 06:51
  • 1
    @MahiSingh Have look at this : http://www.google.co.in/url?q=http://cinema-4d.wonderhowto.com/how-to/make-paper-crumple-animations-without-keyframes-c4d-382537/&sa=U&ei=Qu1bUa2tHfCdiAfDvYH4AQ&ved=0CDMQFjAG&usg=AFQjCNENf-7vDcoUxE2gfsM0LvhLKy5NrA – GOLDEE Apr 03 '13 at 08:51
  • @ goldee check out my new questions – Mahi Apr 03 '13 at 09:37

0 Answers0