1,如何使ListView具有选择效果,当点击时,会有选择效果,如不同的颜色。
2,如何在android的title(this.setTitle("TitleName");)左边放一图片。
谢谢
2,如何在android的title(this.setTitle("TitleName");)左边放一图片。
谢谢
解决方案 »
- 新手,请大神帮忙解决一个jni调用问题.
- 关于Android工程的XML文件的自动提示功能
- ListView里面如何获取Spinner对象.
- 求助:Android中怎样截获系统触屏或按键输入事件?
- MotionEvent.getX(),在线等答案~
- 在其他程序中添加menu或notification是否可行?
- Android 播放rtsp,解码异常
- VIEW 在移动时,能否带出阴影?
- Android4.2下使用AudioTrack不能播放声音
- 关于android BLE 从模式(peripheral role)-android L
- 谁知道为什么事件不相应,谢谢。。。
- android怎么录制正在播放的视频
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>
自定义title 需要继承系统title
setContentView(R.layout.custom_title);
getWindow().setFeatureIn(Window.FEATURE_CUSTOM_TITLE,R.layout.custom_title_1);回答下2