Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Animation can help you to do this:</p> <pre><code>private void initPopup() { final TransparentPanel popup = (TransparentPanel) findViewById(R.id.popup_window); // Start out with the popup initially hidden. popup.setVisibility(View.GONE); animShow = AnimationUtils.loadAnimation( this, R.anim.popup_show); animHide = AnimationUtils.loadAnimation( this, R.anim.popup_hide); final Button showButton = (Button) findViewById(R.id.show_popup_button); final Button hideButton = (Button) findViewById(R.id.hide_popup_button); showButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { popup.setVisibility(View.VISIBLE); popup.startAnimation( animShow ); showButton.setEnabled(false); hideButton.setEnabled(true); }}); hideButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { popup.startAnimation( animHide ); showButton.setEnabled(true); hideButton.setEnabled(false); popup.setVisibility(View.GONE); }}); final TextView locationName = (TextView) findViewById(R.id.location_name); final TextView locationDescription = (TextView) findViewById(R.id.location_description); locationName.setText("Animated Popup"); locationDescription.setText("Animated popup is created by Arun nu solla mattaen" + " Transparent layout is used on this example, and animation xml is also used" + " on this example. Have a Good day guys."); } </code></pre> <p>See this <a href="http://www.ziddu.com/download/17405180/Popup.zip.html" rel="nofollow">example</a> </p> <p>Hope this helps you.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload