java - The same info in navigation header and custom toolbar - Android Studio -
i've got problem. i've got navigation header , info there working.
xml (textview):
<textview android:id="@+id/nav_drawer_total_credits" android:layout_width="182dp" android:layout_height="wrap_content" android:textsize="17sp" android:textcolor="@color/md_brown_700" android:layout_margintop="8dp" android:layout_marginleft="16dp" android:text="points:"/>
in activity main.java:
navigationtotalcredittextview = (textview) findviewbyid(r.id.nav_drawer_total_credits); navigationtotalcredittextview.settext("points: " + preferenceconnector.readinteger(aicontext, preferenceconnector.walletpoints, 0));
i used same id of textview in toolbar layout included in mainactivity xml:
<linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:orientation="vertical" > <include android:layout_width="match_parent" android:layout_height="wrap_content" layout="@layout/top_points_bar" /> </linearlayout>
now, info not displaying in navi header , in toolbar too. when delete toolbar, info displaying in navi header. because of duplicate or what? none of errors in logcat. how make display same info in header , in toolbar? please me guys!
Comments
Post a Comment