Files
android_development/samples/ApiDemos/res/layout/drag_layout.xml
Christopher Tate 134fada434 API CHANGE: startDrag() now takes "int flags" instead of "boolean localOnly"
startDrag() that crosses application boundaries will remain @hide until we get
more of the surrounding behaviors nailed down.

Drag-and-drop demo updated to only show app-local drag operations pro tem.

Change-Id: I9cdcd132c1aae45bc472e70293b7187b4cba9bca
2011-01-11 17:49:20 -08:00

82 lines
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 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.
-->
<!-- Layout description of the DragAndDrop sample's main activity -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:dot="http://schemas.android.com/apk/res/com.example.android.apis"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<TextView android:id="@+id/drag_explanation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/drag_explanation"
/>
<com.example.android.apis.view.DraggableDot
android:id="@+id/drag_dot_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
dot:radius="64dp"
android:padding="15dp"
android:layout_below="@id/drag_explanation"
/>
<com.example.android.apis.view.DraggableDot
android:id="@+id/drag_dot_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
dot:radius="64dp"
android:padding="15dp"
android:layout_below="@id/drag_explanation"
android:layout_toRightOf="@id/drag_dot_1"
dot:legend="Drag ANR"
dot:anr="thumbnail"
/>
<com.example.android.apis.view.DraggableDot
android:id="@+id/drag_dot_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
dot:radius="64dp"
android:padding="15dp"
android:layout_below="@id/drag_dot_1"
android:layout_alignLeft="@id/drag_dot_1"
dot:legend="Drop ANR"
dot:anr="drop"
/>
<TextView android:id="@+id/drag_result_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/drag_explanation"
android:layout_alignRight="@id/drag_explanation"
android:layout_toRightOf="@id/drag_dot_2"
/>
<TextView android:id="@+id/drag_text"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:layout_below="@id/drag_dot_3"
android:layout_alignLeft="@id/drag_dot_3"
/>
</RelativeLayout>