나는 이것을 할 수있는 몇 개의 라이브러리를 보았지만 가능하면 그것들을 피하고 싶습니다. 나는 왼쪽에서 오른쪽으로 할 수 있었지만 두 방향 모두에서 어떻게해야하는지 알 수 없었다.왼쪽에서 오른쪽, 오른쪽에서 왼쪽으로 안드로이드 슬라이딩 패널
final SlidingPaneLayout slidingPaneLayout = SlidingPaneLayout.class.cast(root.findViewById(R.id.slidingpanelayout));
slidingPaneLayout.setPanelSlideListener(new SlidingPaneLayout.PanelSlideListener() {
@Override
public void onPanelSlide(View view, float v) {
}
@Override
public void onPanelOpened(View view) {
switch (view.getId()) {
case R.id.fragment_secondpane:
getSupportFragmentManager().findFragmentById(R.id.fragment_firstpane).setHasOptionsMenu(true);
getSupportFragmentManager().findFragmentById(R.id.fragment_secondpane).setHasOptionsMenu(false);
break;
default:
break;
}
}
@Override
public void onPanelClosed(View view) {
switch (view.getId()) {
case R.id.fragment_secondpane:
getSupportFragmentManager().findFragmentById(R.id.fragment_firstpane).setHasOptionsMenu(false);
getSupportFragmentManager().findFragmentById(R.id.fragment_secondpane).setHasOptionsMenu(true);
break;
default:
break;
}
}
});
어떤 라이브러리없이, 왼쪽에서 오른쪽으로 난 3 개 조각을 가질 수 있도록 왼쪽 방향에서 오른쪽 모두에서 슬라이딩 패널을 만들 수있는 방법이있다 : 그래서 여기 내 코드는?
이 몇 줄에 의해 어떤 측면에서 슬라이드하는 것을 가능하게 https://github.com/Ali-Rezaei/SlidingDrawer를 살펴 보자하는 데 도움이 암호. – Ali