Xml文件  |  86行  |  3.18 KB

<!--
Copyright 2014 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/vertical_page_margin"
    android:paddingLeft="@dimen/horizontal_page_margin"
    android:paddingRight="@dimen/horizontal_page_margin"
    android:paddingTop="@dimen/vertical_page_margin">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <TextView
            android:id="@+id/interpolatorLabel"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignBottom="@+id/interpolatorSpinner"
            android:layout_alignParentStart="true"
            android:layout_alignParentTop="true"
            android:gravity="center_vertical"
            android:text="@string/interpolator" />

        <Spinner
            android:id="@+id/interpolatorSpinner"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_toEndOf="@+id/interpolatorLabel" />


        <SeekBar
            android:id="@+id/durationSeek"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentEnd="true"
            android:layout_below="@+id/durationLabel"
            android:max="5000" />

        <TextView
            android:id="@+id/durationLabel"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentStart="true"
            android:layout_below="@+id/interpolatorSpinner"
            android:gravity="center_vertical" />

        <Button
            android:id="@+id/animateButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/durationSeek"
            android:layout_centerHorizontal="true"
            android:text="@string/animate" />

        <View
            android:id="@+id/square"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_alignParentBottom="true"
            android:layout_below="@+id/animateButton"
            android:layout_centerHorizontal="true"
            android:layout_margin="10dp"
            android:background="@color/purple"
            android:minHeight="100dp"
            android:minWidth="100dp" />

    </RelativeLayout>

</ScrollView>