код кусками, который относятся к TextView:
Код: Выделить всё
...
private TextView drawerName, drawerNumber;
...
drawerName = (TextView) findViewById(R.id.drawer_name);
drawerNumber = (TextView) findViewById(R.id.drawer_number);
...
if (studName.equals("")) {
drawerName.setText("");
} else
if (!studName.equals(""))
{
drawerName.setText(studName + ", гр. " + gn);
}
drawerNumber.setText(studNumber);
Код: Выделить всё
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="180dp"
android:background="@drawable/pic"
android:padding="16dp"
android:theme="@style/ThemeOverlay.AppCompat.Dark"
android:orientation="vertical"
android:gravity="bottom">
<TextView
android:id="@+id/drawer_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#fff"
android:fontFamily="sans-serif-light"
android:textStyle="bold"
android:text="Вася Пупкин"
android:textSize="18sp"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
<TextView
android:id="@+id/drawer_number"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#fff"
android:fontFamily="sans-serif-light"
android:textStyle="normal"
android:text="№ группы"
android:textSize="16sp"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
</LinearLayout>