定义了一个继承了TextView的类LrcView作为自定义控件,在xml文件也写好了。这是部分代码<LinearLayout
android:layout_weight="1"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/backcolor"
>
<turr.view.LrcView
android:id="@+id/LyricShow"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
</turr.view.LrcView>
</LinearLayout>当我传参到LrcView的对象时,会抛出NullPointerException异常,说不能启动activity,不传参LinearLayout能显示背景颜色,谁能告诉下我?
android:layout_weight="1"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/backcolor"
>
<turr.view.LrcView
android:id="@+id/LyricShow"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
</turr.view.LrcView>
</LinearLayout>当我传参到LrcView的对象时,会抛出NullPointerException异常,说不能启动activity,不传参LinearLayout能显示背景颜色,谁能告诉下我?
解决方案 »
- PeerDroid demo+教程 谁有的?
- 流媒体服务器设置问题
- android 在耗时操作里面怎么显示ProgressDialog?
- 做一个类似于街旁或者嘀咕的那种手机版的社区
- Cheapest Dofus Kamas Online
- 求大神解:付款页面如何能够跳转至支付宝客户端
- 混淆器proguard-android.txt 送300分
- 如何固定表格布局中的某一列?
- 关于手机APP的一个问题
- 低版本的sdk中调用VERSION_CODES.JELLY_BEAN 为啥不报错?
- 怎么下载jdk se 6啊,我在编译android的时候出错了
- Android 在一个Activity里面怎么让两个gallery联动,就是同时移动
建议将id 改成 短线连接不要使用大写的 如lyric_show