解决方案 »

  1.   

    LiftNewsActivity对应的XML文件 slidingmenu_left.xml<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:background="@drawable/bg_slidingmenu_left"
        android:gravity="center"
        android:orientation="vertical"
        android:paddingBottom="40dp"
        android:paddingLeft="60dp"
        android:paddingTop="20dp" >    <!-- 11111111 -->    <RelativeLayout
            android:id="@+id/rlivtv1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:paddingTop="20dp" >        <ImageView
                android:id="@+id/imageView1"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:src="@drawable/biz_navigation_tan_home" />        <TextView
                android:id="@+id/textView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignTop="@+id/imageView1"
                android:layout_marginLeft="15dp"
                android:layout_toRightOf="@+id/imageView1"
                android:text="首  页"
                android:textColor="#99ffffff"
                android:textSize="18dp" />
        </RelativeLayout>    <!-- 222222 -->    <RelativeLayout
            android:id="@+id/rlivtv2"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:clickable="true"
            android:focusable="true"
            android:paddingTop="20dp" >        <ImageView
                android:id="@+id/imageView2"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:src="@drawable/biz_navigation_tan_news" />        <TextView
                android:id="@+id/textView2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentTop="true"
                android:layout_marginLeft="15dp"
                android:layout_toRightOf="@+id/imageView2"
                android:gravity="center"
                android:text="新  闻"
                android:textColor="#99ffffff"
                android:textSize="18dp" />
        </RelativeLayout>
        <!-- 3333333 -->    <RelativeLayout
            android:id="@+id/rlivtv3"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:clickable="true"
            android:focusable="true"
            android:paddingTop="20dp" >        <ImageView
                android:id="@+id/imageView3"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:src="@drawable/biz_navigation_tan_affairs" />        <TextView
                android:id="@+id/textView3"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentTop="true"
                android:layout_marginLeft="15dp"
                android:layout_toRightOf="@+id/imageView3"
                android:gravity="center"
                android:text="政  务"
                android:textColor="#99ffffff"
                android:textSize="18dp" />
        </RelativeLayout>
        <!-- 4444444 -->    <RelativeLayout
            android:id="@+id/rlivtv4"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:clickable="true"
            android:focusable="true"
            android:paddingTop="20dp" >        <ImageView
                android:id="@+id/imageView4"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:src="@drawable/biz_navigation_tan_live" />        <TextView
                android:id="@+id/textView4"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentTop="true"
                android:layout_marginLeft="15dp"
                android:layout_toRightOf="@+id/imageView4"
                android:gravity="center"
                android:text="直  播"
                android:textColor="#99ffffff"
                android:textSize="18dp" />
        </RelativeLayout>
        <!-- 55555555 -->    <RelativeLayout
            android:id="@+id/rlivtv5"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:clickable="true"
            android:focusable="true"
            android:paddingTop="20dp" >        <ImageView
                android:id="@+id/imageView5"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:src="@drawable/biz_navigation_tan_demand" />        <TextView
                android:id="@+id/textView5"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentTop="true"
                android:layout_marginLeft="15dp"
                android:layout_toRightOf="@+id/imageView5"
                android:gravity="center"
                android:text="点  播"
                android:textColor="#99ffffff"
                android:textSize="18dp" />
        </RelativeLayout>
        <!-- 66666666 -->    <RelativeLayout
            android:id="@+id/rlivtv6"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:clickable="true"
            android:focusable="true"
            android:paddingTop="20dp" >        <ImageView
                android:id="@+id/imageView6"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:src="@drawable/biz_navigation_tan_project" />        <TextView
                android:id="@+id/textView6"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentTop="true"
                android:layout_marginLeft="15dp"
                android:layout_toRightOf="@+id/imageView6"
                android:gravity="center"
                android:text="专  题"
                android:textColor="#99ffffff"
                android:textSize="18dp" />
        </RelativeLayout>
        <!-- 777777777 -->    <RelativeLayout
            android:id="@+id/rlivtv7"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:clickable="true"
            android:focusable="true"
            android:paddingTop="20dp" >        <ImageView
                android:id="@+id/imageView7"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:src="@drawable/biz_navigation_tan_image" />        <TextView
                android:id="@+id/textView7"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentTop="true"
                android:layout_marginLeft="15dp"
                android:layout_toRightOf="@+id/imageView7"
                android:gravity="center"
                android:text="图  片"
                android:textColor="#99ffffff"
                android:textSize="18dp" />
        </RelativeLayout>
        <!-- 88888888 -->    <RelativeLayout
            android:id="@+id/rlivtv8"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:clickable="true"
            android:focusable="true"
            android:paddingTop="20dp" >        <ImageView
                android:id="@+id/imageView8"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:src="@drawable/biz_navigation_tan_radio" />        <TextView
                android:id="@+id/textView8"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentTop="true"
                android:layout_marginLeft="15dp"
                android:layout_toRightOf="@+id/imageView8"
                android:gravity="center"
                android:text="广  播"
                android:textColor="#99ffffff"
                android:textSize="18dp" />
        </RelativeLayout>
        <!-- 99999999 -->    <RelativeLayout
            android:id="@+id/rlivtv9"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:clickable="true"
            android:focusable="true"
            android:paddingTop="20dp" >        <ImageView
                android:id="@+id/imageView9"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:src="@drawable/biz_navigation_tan_subscribe" />        <TextView
                android:id="@+id/textView9"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentTop="true"
                android:layout_marginLeft="15dp"
                android:layout_toRightOf="@+id/imageView9"
                android:gravity="center"
                android:text="订  阅"
                android:textColor="#99ffffff"
                android:textSize="18dp" />
        </RelativeLayout></LinearLayout>
      

  2.   

    因为左边的menu。xml的按钮没有加点击事件切换fragment
      

  3.   

    用着这个库很简单:
    首先,思想是点击导航,把导航需要显示的布局fragmen替换到主布局文件中布局,用replace方法替换。你先搜一下fragmen怎么用,再搜下这个方法replace(),应该就差不多了。
      

  4.   

    这个页面的跳转不是activity的跳转而是fragment的相互切换,需要用的是replace方法,而你用了intent,这是不可行的。你先了解下fragment再看看代码就明白了。我给你贴个我写的//左侧导航栏点击事件
    public void menuItemClicked(int position) {
    menu.showContent();// 点击关闭
    switch (position) {
    case 0:
    Toast.makeText(getApplicationContext(), "遥信检测", 0).show();
    fragmentManager.beginTransaction()
    .replace(R.id.homefragment, new HomeFragment()).commit();
    break;
    case 1:
    Toast.makeText(getApplicationContext(), "遥控监测", 0).show();
    fragmentManager.beginTransaction()
    .replace(R.id.homefragment, new YaokongFragment()).commit();
    break;
    case 2:
    Toast.makeText(getApplicationContext(), "载波通信", 0).show();
    fragmentManager.beginTransaction()
    .replace(R.id.homefragment, new ZaibotongxinFragment())
    .commit();
    break;
    case 3:
    Toast.makeText(getApplicationContext(), "信号强度", 0).show();
    fragmentManager.beginTransaction()
    .replace(R.id.homefragment, new XinhaoqiangduFragment())
    .commit();
    break;
    case 4:
    Toast.makeText(getApplicationContext(), "电表抄读", 0).show();
    fragmentManager.beginTransaction()
    .replace(R.id.homefragment, new DianbiaochaoduFragment())
    .commit();
    break;
    case 5:
    Toast.makeText(getApplicationContext(), "脉冲检测", 0).show();
    fragmentManager.beginTransaction()
    .replace(R.id.homefragment, new MaichongjianceFragment())
    .commit();
    break;
    default:
    break;
    }
      

  5.   

    其中还有fragment的管理器没贴上去,你先看下吧