1,如何使ListView具有选择效果,当点击时,会有选择效果,如不同的颜色。
2,如何在android的title(this.setTitle("TitleName");)左边放一图片。
谢谢

解决方案 »

  1.   

    要在系统title上进一步自定义
      

  2.   

    1。参考
    http://mdev.cc/dev/read.php?tid=105
    2.public void onCreate(Bundle savedInstanceState) {
             super.onCreate(savedInstanceState);
             requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); 
             setContentView(R.layout.main);                                                                             getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.title);
    }然后title.xml<?xml version="1.0" encoding="utf-8"?>
    <LinearLayout
      xmlns:android=http://schemas.android.com/apk/res/android
      android:layout_width="wrap_content"
      android:layout_height="wrap_content">
          <TextView android:id="@+id/view01"  
            android:layout_width="wrap_content"  
            android:layout_height="wrap_content"  
            android:layout_alignParentLeft="true"  
            android:text="text" />  
          <Button android:id="@+id/button01"  
            android:layout_width="wrap_content"  
            android:layout_height="10px"  
            android:text="OK" /> 
    </LinearLayout>
      

  3.   

    1的问题,或者直接用getListView().setselector(R.drawable.xxx);这样
      

  4.   

    设置listView的背景为一个selector。
    自定义title 需要继承系统title
      

  5.   

    requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
           setContentView(R.layout.custom_title);
           getWindow().setFeatureIn(Window.FEATURE_CUSTOM_TITLE,R.layout.custom_title_1);回答下2