Files
android_development/samples/Support7Demos/res/layout/activity_card_view.xml
Yigit Boyar b5de9c7b9d Added CardView demo to SupportV7 demo app
Change-Id: Ie1b81426dc67c67766eb20fb8f1fc984d25a42cf
2014-05-27 18:32:53 -07:00

85 lines
3.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 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.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffffff"
android:orientation="vertical">
<RelativeLayout
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/radius_label"
android:layout_marginBottom="5dp"
android:text="@string/card_view_radius"/>
<SeekBar
android:id="@+id/corner_radius_seek_bar"
android:max="100"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/radius_label"
android:layout_alignTop="@id/radius_label"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:id="@+id/width_label"
android:text="@string/card_view_width"
android:layout_below="@id/radius_label"
android:layout_alignRight="@id/radius_label"/>
<SeekBar
android:id="@+id/width_seek_bar"
android:max="600"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/width_label"
android:layout_alignTop="@id/width_label"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:id="@+id/height_label"
android:text="@string/card_view_height"
android:layout_below="@id/width_label"
android:layout_alignRight="@id/width_label"/>
<SeekBar
android:id="@+id/height_seek_bar"
android:max="600"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/height_label"
android:layout_alignTop="@id/height_label"/>
</RelativeLayout>
<android.support.v7.widget.CardView
android:id="@+id/card_view"
android:layout_gravity="center"
android:layout_width="200dp"
android:layout_height="200dp"
card_view:cardCornerRadius="4dp">
<TextView
android:id="@+id/info_text"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</android.support.v7.widget.CardView>
</LinearLayout>