Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How do i do to resize the font of the title like font=10

$
0
0

I have this in the constructor:

 public Indicadores()
        {
            InitializeComponent();
            NavigationPage.SetHasNavigationBar(this, true);
            NavigationPage.SetTitleIcon(this, "estapar.png");

            Title = EmailLogado;

            this.BindingContext = new IndicadoresViewModel();
        }

where EmailLogado is a title in the barnavigation. This is working fine, but i have a problem. The font is big and when i have a title very big, the title doesn't appear in the bar, just a partial title and the TextColor is white and i can't change. In this Toolbar.xaml i can create a Title and change the font and TextColor, but i can't load a title in runtime(dynamic). See below code to Toolbar

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/toolbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="?attr/colorPrimary"
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
    android:popupTheme="@style/ThemeOverlay.AppCompat.Light">
    <LinearLayout
        android:id="@+id/alternateTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal">
        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="start"
            android:id="@+id/toolbarIcon" />
        <TextView
            android:id="@+id/alternateTitle1"
            android:text="anything here"
            android:textSize="@dimen/notification_subtext_size"
            android:textColor="@color/material_deep_teal_500"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceLarge" />
        <TextView
            android:id="@+id/alternateTitle2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    </LinearLayout>
</android.support.v7.widget.Toolbar>

with this code above i can't to load the title in runtime. I tried in the MainActivity, but nothing. Anybody can help me?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>