菜单
  

            <TextView android:text="选项" android:id="@+id/select_item"
                android:textSize="@dimen/music_list_title" android:textStyle="bold"
                android:layout_width="wrap_content" android:layout_height="wrap_content">
    </TextView>
        </LinearLayout>
        <ListView android:id="@+id/menu" android:layout_width="wrap_content"
            android:background="@drawable/list_item_bg" android:layout_height="wrap_content">
    </ListView>    
        <TextView android:layout_width="wrap_content"
            android:layout_height="50px"></TextView>
        <LinearLayout android:layout_width="fill_parent" android:gravity="right"
            android:layout_height="wrap_content" android:background="@drawable/footer_bar">
            <ImageButton android:id="@+id/back"android:background="@drawable/back"
    android:layout_width="wrap_content" android:layout_height="wrap_content">
    </ImageButton>
        </LinearLayout>
    </LinearLayout>
    4.3.2 菜单功能实现
    播放器菜单选择功能实现代码:
            public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
                        long arg3) {
    SharedPreferences sp=getSharedPreferences("MUSIC",MODE_WORLD_WRITEABLE);
                    SharedPreferences.Editor editor=sp.edit();
                    switch (arg2) {
                    case 0:
                        Intent intent_play = new Intent(Menu.this,
                                MainPlayActivity.class);
                        startActivity(intent_play);
                        Bundle bundle = new Bundle();
                        bundle.putInt("operate", 0);
                        Intent intent = new Intent();
                        intent.putExtras(bundle);
                        setResult(2, intent);
                        finish();
                        break;
                    case 2:
                        Intent intent_add = new Intent(Menu.this,
                                FileExplorerActivity.class);
                        editor.putString("SELECTNAME", null);
  1. 上一篇:ASP.net+sqlserver手工艺分享网站设计与开发
  2. 下一篇:ASP人才招聘网站的设计与实现+ER图+流程图
  1. 基于MATLAB的图像增强算法设计

  2. 基于Kinect的手势跟踪与识别算法设计

  3. JAVA基于安卓平台的医疗护工管理系统设计

  4. 基于核独立元分析的非线...

  5. 基于Hadoop的制造过程大数据存储平台构建

  6. 基于安卓系统的测量软件...

  7. 基于VC++的GIS矢量图形系统开发

  8. 河岸冲刷和泥沙淤积的监测国内外研究现状

  9. 十二层带中心支撑钢结构...

  10. 当代大学生慈善意识研究+文献综述

  11. java+mysql车辆管理系统的设计+源代码

  12. 大众媒体对公共政策制定的影响

  13. 中考体育项目与体育教学合理结合的研究

  14. 电站锅炉暖风器设计任务书

  15. 乳业同业并购式全产业链...

  16. 酸性水汽提装置总汽提塔设计+CAD图纸

  17. 杂拟谷盗体内共生菌沃尔...

  

About

751论文网手机版...

主页:http://www.751com.cn

关闭返回