朋友们,
我已经创建自定义标题栏使用以下标题栏文件与代码
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/myTitle"
android:text="This is my new title"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textColor="@color/titletextcolor"
android:layout_marginLeft="25px"
android:paddingTop="3px"
/>
和java代码来显示每个活动的自定义标题栏。
@Override
public void onCreate(Bundle savedInstanceState)
{
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.mytitle);
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
现在我想在每个活动中动态设置textview值可以任何一个指导我如何实现这个?
在这里使用findviewbyid,我不会得到该文本视图的引用来设置值
主要布局不包含任何带有这样的名称但是标题的文本框。
任何帮助都会被贬低。