-2
我已经创建了自定义视图类,该类包含三个TextViews。我只是在我的Fragment布局中使用这个自定义视图。我的布局如下有什么方法可以重新创建或重新创建自定义视图?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<com.abc.views.HeaderView
android:id="@+id/headerView"
android:visibility="visible"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
</com.rfs.app.views.HeaderView>
<ScrollView
android:id="@+id/widget54"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/footerView"
android:layout_below="@+id/headerView" >
--------------------------------------
--------------------------------------
</ScrollView>
</RelativeLayout>
问题是,当我点击我的片段中的按钮HeaderView孩子的更新(更改文本/颜色)。这些变化并没有立即反映出来。
所有孩子的都是HeaderView类中的textviews。
有什么方法可以重新创建或重新创建这个自定义视图吗?
使视图无效! – Raghunandan
请添加java代码 – FadedCoder