Home | History | Annotate | Download | only in layout
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright (C) 2015 The Android Open Source Project
      3 
      4      Licensed under the Apache License, Version 2.0 (the "License");
      5      you may not use this file except in compliance with the License.
      6      You may obtain a copy of the License at
      7 
      8           http://www.apache.org/licenses/LICENSE-2.0
      9 
     10      Unless required by applicable law or agreed to in writing, software
     11      distributed under the License is distributed on an "AS IS" BASIS,
     12      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13      See the License for the specific language governing permissions and
     14      limitations under the License.
     15 -->
     16 
     17 <!--
     18     A NestedScrollView behaves like a ScrollView, but it can be placed into
     19     other nested scrolling containers or have other nested scrolling containers
     20     placed into it.
     21 -->
     22 <android.support.v4.widget.NestedScrollView
     23     xmlns:android="http://schemas.android.com/apk/res/android"
     24     android:layout_width="match_parent"
     25     android:layout_height="match_parent"
     26     android:padding="16dp">
     27     <LinearLayout
     28         android:layout_width="match_parent"
     29         android:layout_height="wrap_content"
     30         android:orientation="vertical">
     31         <TextView
     32             android:layout_width="match_parent"
     33             android:layout_height="wrap_content"
     34             android:textAppearance="?android:attr/textAppearance"
     35             android:text="@string/nested_scroll_long_text" />
     36         <android.support.v4.widget.NestedScrollView
     37             android:layout_width="match_parent"
     38             android:layout_height="200dp"
     39             android:padding="16dp">
     40             <TextView
     41                 android:layout_width="match_parent"
     42                 android:layout_height="wrap_content"
     43                 android:textAppearance="?android:attr/textAppearance"
     44                 android:text="@string/nested_scroll_long_text" />
     45         </android.support.v4.widget.NestedScrollView>
     46         <TextView
     47             android:layout_width="match_parent"
     48             android:layout_height="wrap_content"
     49             android:textAppearance="?android:attr/textAppearance"
     50             android:text="@string/nested_scroll_long_text" />
     51     </LinearLayout>
     52 </android.support.v4.widget.NestedScrollView>