このリンクを見てください。これで始められるはずです:
http://blog.sptechnolab.com/2011/02/10/android/android-sliding-drawer/
レイアウトのないコードは次のようになります。
public class animation extends Activity {
/** Called when the activity is first created. */
CheckBox c1,c2,c3;
int key=0;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main1);
final TransparentPanel popup = (TransparentPanel) findViewById(R.id.popup_window);
popup.setVisibility(View.GONE);
final Button btn=(Button)findViewById(R.id.show_popup_button);
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
if(key==0){
key=1;
popup.setVisibility(View.VISIBLE);
btn.setBackgroundResource(R.drawable.slid3_n);
}
else if(key==1){
key=0;
popup.setVisibility(View.GONE);
btn.setBackgroundResource(R.drawable.slid4_n);
}
}
});
}
}
それはまさに「2段階」の引き出しです。中間段階の場合、または基本的に 2 つの引き出しが 1 つになっている場合は、コードを自分に合わせて少し調整する必要があります。