极客学院教程: http://www.jikexueyuan.com/course/61_5.html?ss=1

1. SlidingMenu开源库的配置

2. SlidingMenu 的使用

--------------------------------------------------------------

工程代码:

开源库:Android SlidingMenu开源库及其使用-LMLPHPSlidingMenu.zip Android SlidingMenu开源库及其使用-LMLPHPActionBarSherlock.zip

使用Demo Android SlidingMenu开源库及其使用-LMLPHPUseSlideMenu.zip

--------------------------------------------------------------

1. SlidingMenu开源库的配置

SlidingMenu 依赖 ActionBarSherlock库

两个库都可以在GitHub上下载到

两个库import完成后,新建一个工程SlidingMenuDemo,出现如下错误:

ERROR: In <declare-styleable> SherlockSpinner, unable to find attribute android:popupPromptView

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAaQAAAHMCAIAAAAViUtVAAAgAElEQVR4nO2d7W8cR57f++/RvHIAGbN6m+Byd5nXcYzLeTekICDQBDAC6AzsIol9su8wlHyWD5djbrEGbCTjkxivREpaef2wdHu1q1vZVkxJJFdrSqZIURQlkStxOKTI4RDKi57ursfu6p6a7v6xvx8UpJme7q7qevhMVTenynEBAKAEOHknAAAAssDJOwEAAJAFTt4JAACALHDyTgAAAGSBk3cCAAAgC5y8EwAAAFng5J0AAADIAifvBAAAQBY4eScAAACywMk7AQAAkAVO3gkAAIAscLKOsHn0gHPgaDOvSBs1p9aQd2jUsk8UACBLnFRHNY8ecAJU8og+1I5XGrUwDTGnTCU77vxpLhUAUCCcVEc1jx7w3TDwnlrz6AG1ZFhBNWqGJkrRs9McYg3tBQIALOKkOoqR3cCHgEayMxYGZAdASXFSHaWUnddoG7VwUMkOBP3mzDXtcAdGNezGo+EZVMNMtnvZOyl7/uB1uJE1Fz9ONZcdM4jnY1Je+4GjR1mTCpfciLhAAIBFnOiPZ+bvs8HfrBzGeg7gVMK3cdk7cs+MP4r7SER9z85UdtzAV46Vj4eNv3m0Jg+eFdfOJoIxoJxQ8QKFPEdAQEgalC3ZUTdwv9U95wkb/IFozcgDQ/9TTmscB442VcNJo2GsSqaRshMiSjiMlfp2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P7AyTsBAACQBU7eCQAAgCxw8k4AAABkgZN3AgAAIAucvBMAAABZ4OSdAAAAyAIn7wQAAEAWOHknAAAAssDJOwEAAJAF/x9huVGlsHnQLQAAAABJRU5ErkJggg==" alt="" />

经我尝试,BuildTarget不能大于 19,否则会出现上述错误

2. SlidingMenu 的使用

2.1. res/values/dimmens.xml中配置一个属性

<dimen name="sliding_menu_offset">200dp</dimen>

2.2 定义一个布局: slidingmenu.xml

2.3 在Java代码中使用

public class MainActivity extends Activity {

    private SlidingMenu slidingMenu;

    @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main); slidingMenu = new SlidingMenu(this);
slidingMenu.setMode(SlidingMenu.LEFT);
slidingMenu.setBehindOffsetRes(R.dimen.sliding_menu_offset);
slidingMenu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
slidingMenu.attachToActivity(this, SlidingMenu.SLIDING_CONTENT);
slidingMenu.setMenu(R.layout.slidingmenu);
}
}

效果如下

Android SlidingMenu开源库及其使用-LMLPHP

05-11 11:26