0

我有我的 MainActivity

public class MainActivity extends SlidingFragmentActivity {

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN);

    // Main layout
    setContentView(R.layout.activity_main);
    setBehindContentView(R.layout.menu_frame);

    // SlidingMenu
    sm = getSlidingMenu();
    sm.setFadeDegree(0.35f);
    sm.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
    sm.setBehindOffset(120);
    sm.setMode(SlidingMenu.LEFT_RIGHT);

    // Left menu
    getSupportFragmentManager().beginTransaction()
            .replace(R.id.menu_frame, new LeftMenuFragment()).commit();

    // Right menu
    getSlidingMenu().setSecondaryMenu(R.layout.menu_frame_second);
    getSupportFragmentManager().beginTransaction()
            .replace(R.id.menu_frame_two, new RightMenuFragment()).commit();

}
}

如何在此活动中创建垂直寻呼机?我还想在两个布局(片段)之间垂直滚动。

4

1 回答 1

0

你可以使用这个库,但它似乎不再受支持

于 2013-05-14T22:23:27.023 回答