I have a LinearLayout
which is expanded to full screen by hiding all other layouts and views on onClick
. There is a Relativelayout
above LinearLayout
I want to apply custom animation on this. The size should should increase slowly (like in 500 milli seconds).
But I doubt is it possible? Thanks.
Here is what I am doing onClick
:
private void expandView (int viewId) {
RelativeLayout relativeLayout = (RelativeLayout) ((LinearLayout) view.findViewById(viewId)).getParent();
ViewGroup.MarginLayoutParams rlMargin = (ViewGroup.MarginLayoutParams) relativeLayout.getLayoutParams();
rlMargin.setMargins(0, 0, 0, 0);
relativeLayout.setLayoutParams(rlMargin);
LinearLayout linearLayout = (LinearLayout) relativeLayout.getParent();
hideAllLinearLayoutExcept(linearLayout.getId());
hideAllTilesExcept(viewId);
}
viewId
is the id of the LinearLayout
I am clicking. This function is called from onClick()