Как я могу выровнять мой ImageView с моим TextView в LinearLayout?

У меня есть следующие ImageView и TextView: enter image description here

Вот XML:

<LinearLayout android:layout_height="wrap_content" android:layout_width="match_parent" android:id="@+id/headerLinearLay" android:orientation="horizontal">
        <ImageView android:src="@drawable/icon" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/avatarImageView"></ImageView>
        <TextView android:layout_height="wrap_content" android:id="@+id/usernameTextView" android:text="TextView" android:layout_width="wrap_content" android:paddingLeft="4px"></TextView>
    </LinearLayout>

Как сделать так, чтобы изображение и текст располагались на такой же высоты? Я также хочу, чтобы ImageView был в углу

8
задан Sheehan Alam 24 May 2011 в 19:17
поделиться