У меня есть xml-файл, который содержит ScrollView
и внутри есть LinearLayout
; эта схема также содержит больше 2 макета:Android layout gravity не работает
первого, где данные будут добавлены динамически
вторым является только то, что должно отображаться в нижних виде.
Но гравитация не работает, я пробовал и gravity
, и layout_gravity
, но никто не работает, все макеты установлены, чтобы заполнить родителя, так почему это происходит?
Распространение авторских прав должно быть внутри ScrollView
, но в нижней части экрана, даже если ScrollView
пуст (1-й макет).
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:id="@+id/istoricLayout"
android:visibility="visible" >
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/istoric"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom" //here I'm trying to move this at the buttom
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="@dimen/thick_bar_height"
android:layout_marginBottom="@dimen/bar_vertical_space"
android:layout_marginTop="@dimen/bar_vertical_space"
android:background="@color/white" />
<Button
android:id="@+id/versiuneaCompleta"
android:layout_width="250dp"
android:layout_height="30dp"
android:layout_gravity="center"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="@color/color2"
android:text="Vizioneaza versiunea completa"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="15dp" />
<RelativeLayout
android:layout_width="250dp"
android:layout_height="30dp"
android:layout_gravity="center"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="@color/white" >
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentRight="true"
android:adjustViewBounds="true"
android:src="@drawable/support_right_icon" />
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentLeft="true"
android:adjustViewBounds="true"
android:src="@drawable/support_left_icon" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@color/white"
android:text="Support +40.XXX.XXX.XXX"
android:textAlignment="center"
android:textColor="@color/color2"
android:textSize="15dp" />
</RelativeLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Politica de condidentialitate ·"
android:textColor="@color/white"
android:textSize="10dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" Despre noi ·"
android:textColor="@color/white"
android:textSize="10dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" Contact"
android:textColor="@color/white"
android:textSize="10dp" />
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="© 2013 Artcos Design. All Rights Reserved"
android:textColor="@color/copyRightColor"
android:textSize="10dp" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
Это хорошо, что вы предоставили свой номер поддержки. Я позвоню вам посреди ночи: P – gunar
oww, поддельный номер ... –
ну тогда у кого-то есть этот номер: D – gunar