Wie kann man einen Blick auf Android geben und ihm ein Benachrichtigungspanel wie Gefühl geben?Java

Java-Forum
Anonymous
 Wie kann man einen Blick auf Android geben und ihm ein Benachrichtigungspanel wie Gefühl geben?

Post by Anonymous »

Ich versuche, die Animation in meiner Android -App zu ziehen. ist das, was ich zu erreichen versuche.

Code: Select all

    this.anim1= AnimationUtils.loadAnimation(this, R.anim.layout_trans_bottom_to_top);
this.anim2= AnimationUtils.loadAnimation(this, R.anim.layout_trans_top_to_bottom);

expandButton.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
layer2.startAnimation(anim1);
layer1.startAnimation(anim1);

layer1.setVisibility(View.GONE);
layer2.setVisibility(View.VISIBLE);
expandButton.setVisibility(View.GONE);
layerPoss=1;

}
});
collapseButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//the same thing...
}
});`
r.anim.layout_trans_bottom_to_top

Code: Select all

translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromYDelta="100%p" android:toYDelta="0"
android:duration="200"
r.anim.layout_trans_top_to_bottom`

Code: Select all

translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromYDelta="0" android:toYDelta="100%p"
android:duration="200"

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post