@Chesterfield25

Как выровнять по центру текст и кнопку?

Как выровнять по центру текст и кнопку?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <LinearLayout
        android:id="@+id/Line1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentBottom="true"
        android:orientation="vertical">

        <ScrollView
            android:id="@+id/Scroll"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:scrollbars="none"
            android:layout_marginBottom="60dp">

            <LinearLayout
                android:id="@+id/Line2"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:padding="20dp"
                android:orientation="vertical" >

                <TextView
                    android:id="@+id/text"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/text"
                    android:textColor="@color/colorBlack"
                    android:textSize="18sp" />

                <ImageButton
                    android:id="@+id/button"
                    android:layout_width="150dp"
                    android:layout_height="150dp"
                    android:background="@null"
                    android:scaleType="fitCenter"
                    app:srcCompat="@drawable/ic_mic" />

            </LinearLayout>
        </ScrollView>

    </LinearLayout>

    <LinearLayout
        android:id="@+id/Line3"
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:layout_alignParentBottom="true"
        android:orientation="horizontal">

        <ImageView
            android:id="@+id/banners"
            android:layout_width="match_parent"
            android:layout_height="60dp"
            android:layout_weight="1"
            app:srcCompat="@drawable/freebanner4" />
    </LinearLayout>
</RelativeLayout>
  • Вопрос задан
  • 976 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы