Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MainActivity extends AppCompatActivity {
- private void hideEditor() {
- // This makes room in the layout
- RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams)editorView.getLayoutParams();
- params.setMargins(0, -1 * editorView.getHeight(), 0, 0);
- editorView.setLayoutParams(params);
- // This shows a nice animation, but won't make room
- ObjectAnimator animY = ObjectAnimator.ofFloat(editorView, View.TRANSLATION_Y, editorView.getHeight() * -1);
- animY.setDuration(500);
- animY.start();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement