Toolbar ImageView 和 TextView 内容没有变化

Toolbar ImageView and TextView content is not change

我试图更改我的工具栏图标和文本。我生成了 id,但我设置的文本不是 reflated.I Log toolbar textview 他显示正确的文本。
这里Newmessage.java:-

     mInflater = (LayoutInflater)NewMessage.this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        convertView = mInflater.inflate(R.layout.toolbar1, null);
         imageViewToolbar = (ImageView)convertView.findViewById(R.id.toolbar_imageview_new);
        textViewToolbar = (TextView)convertView.findViewById(R.id.messagename_std_text_view);

        Picasso.with(getApplicationContext()).load(path).into(imageViewToolbar);
        textViewToolbar.setText(title);

        toolbar = (Toolbar)findViewById(R.id.toolbar1);
        setSupportActionBar(toolbar);
        getSupportActionBar().setTitle("");
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        getSupportActionBar().setDisplayShowHomeEnabled(true);

这是我的 toolbar.xml:-

    <?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:local="http://schemas.android.com/apk/res-auto"
    android:id="@+id/toolbar1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="?attr/actionBarSize"
    android:background="?attr/colorPrimary"
    local:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
    local:popupTheme="@style/ThemeOverlay.AppCompat.Light">


    <RelativeLayout
        android:padding="5dp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

        <ImageView
            android:id="@+id/toolbar_imageview_new"
            android:layout_width="50dp"
            android:layout_height="50dp"/>

        <TextView
            android:id="@+id/messagename_std_text_view"
            android:layout_toRightOf="@+id/toolbar_imageview_new"
            android:layout_toEndOf="@+id/toolbar_imageview_new"
            android:layout_centerVertical="true"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:paddingBottom="5dp"
            android:paddingLeft="5dp"
            android:paddingRight="5dp"
            android:textSize="20sp"
            android:text="rahul"
            android:textColor="#fff"/>


        <TextView
            android:id="@+id/toolbar_istyping"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/istyping"
            android:layout_below="@+id/messagename_std_text_view"
            android:layout_toRightOf="@+id/toolbar_imageview_new"
            android:layout_toEndOf="@+id/toolbar_imageview_new"
            android:textColor="#fff"
            android:paddingLeft="5dp"/>

    </RelativeLayout>
</android.support.v7.widget.Toolbar>

请提前帮助me.Thanks

首先设置 ImageView 之后 Toolbar .

            toolbar = (Toolbar)findViewById(R.id.toolbar1);
            imageViewToolbar = (ImageView)convertView.findViewById(R.id.toolbar_imageview_new);
            textViewToolbar = (TextView)convertView.findViewById(R.id.messagename_std_text_view);

            setSupportActionBar(toolbar);
            getSupportActionBar().setTitle("");
            getSupportActionBar().setDisplayHomeAsUpEnabled(true);
            getSupportActionBar().setDisplayShowHomeEnabled(true);

            Picasso.with(getApplicationContext()).load(path).into(imageViewToolbar);
            textViewToolbar.setText(title);

试试这个

    toolbar = (Toolbar)findViewById(R.id.toolbar1);
    imageViewToolbar = (ImageView)toolbar.findViewById(R.id.toolbar_imageview_new);
    textViewToolbar = (TextView)toolbar.findViewById(R.id.messagename_std_text_view);

    Picasso.with(getApplicationContext()).load(path).into(imageViewToolbar);
    textViewToolbar.setText(title);

    setSupportActionBar(toolbar);
    getSupportActionBar().setTitle("");
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    getSupportActionBar().setDisplayShowHomeEnabled(true);