Expand and collapse animation
If you search a simple code to expand and collpse a View with an animation you'll find a lot of example. Almost all of the examples extend Animation class. Instead I would like to use an Animator and its listeners. Where I come from they say I'm discovering the hot water. I know, but it might be useful to someone. Here you can see a short video: The code is very simple: We'll use two LinearLayout . .... ..... ..... In our Activity we simply add a OnClickListener to our Header View. public class MainActivity extends Activity { LinearLayout mLinearLayout; LinearLayout mLinearLayoutHeader; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mLinearLayout = (LinearLayout) findViewById(R.id.expandable); //set visibility to GONE mLinearLayout.setVisibili...