我有ImageButton
一个EditText
可见的:
final ImageButton k = (ImageButton) findViewById(R.id.imageSearchButton);
k.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
Animation anim = AnimationUtils.loadAnimation(CallActivity.this, R.anim.search_jump);
k.startAnimation(anim);
mySearchView = (EditText) findViewById(R.id.searchText);
mySearchView.setVisibility(View.VISIBLE);
Animation searchAnim = AnimationUtils.loadAnimation(CallActivity.this, R.anim.push_left_in);
mySearchView.startAnimation(searchAnim);
}
});
当ImageButton
单击EditText
从右向左滑入时,当ImageButton
再次单击EditText
时应再次滑出并隐藏它,我该如何创建这种效果?