Xml文件  |  258行  |  8.67 KB

<?xml version="1.0" encoding="utf-8"?>
<!--
  XML for screen providing ability to enter text, send some intents,
  switch to gesture activity and test scroll down action.
-->

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:fillViewport="true"
    android:orientation="vertical" >

  <LinearLayout
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:orientation="vertical" >

    <TextView
        android:id="@+id/sendTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:text="@string/send_title"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:onClick="sendData"
        android:clickable="true" />

    <EditText
        android:id="@+id/sendDataEditText"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:ems="10"
        android:hint="@string/send_hint" />

    <Button
        android:id="@+id/sendButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:text="@string/button_send"
        android:onClick="sendData" />

    <EditText
        android:id="@+id/enterDataEditText"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:ems="10"
        android:hint="@string/enter_hint" />

    <TextView
        android:id="@+id/enterDataResponseText"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:text=""
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <TextView
        android:id="@+id/call"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:text="@string/send_intent_to_call"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <EditText
        android:id="@+id/sendDataToCallEditText"
        android:layout_width="229dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:ems="10"
        android:hint="@string/send_hint_for_call" />

    <Button
        android:id="@+id/sendToCallButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:text="@string/button_call"
        android:onClick="sendDataToCall" />



    <TextView
        android:id="@+id/sendDataMessage"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:text="@string/send_message"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <EditText
        android:id="@+id/sendDataToMessageEditText"
        android:layout_width="290dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:ems="10"
        android:hint="@string/send_hint"
        android:text="@string/send_data_to_message_edit_text" />

    <Button
        android:id="@+id/sendMessageButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:text="@string/button_to_message"
        android:onClick="sendMessage" />

    <TextView
        android:id="@+id/gotoBrowser"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:text="@string/send_intent_to_browser"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <EditText
        android:id="@+id/sendDataToBrowserEditText"
        android:layout_width="290dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:ems="10"
        android:hint="@string/send_hint" />

    <Button
        android:id="@+id/sendToBrowserButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:text="@string/button_to_browser"
        android:onClick="sendDataToBrowser" />

    <TextView
        android:id="@+id/pickContactTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:text="@string/pick_title"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <Button
        android:id="@+id/pickButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:text="@string/button_pick"
        android:onClick="pickContact" />

    <TextView
        android:id="@+id/phoneNumber"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp" />

    <TextView
        android:id="@+id/market"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:text="@string/send_intent_to_market"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <EditText
        android:id="@+id/sendToMarketData"
        android:layout_width="229dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:ems="10"
        android:hint="@string/send_hint_to_market" />

    <Button
        android:id="@+id/sendToMarketButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:text="@string/button_market"
        android:onClick="clickToMarket" />

    <TextView
        android:id="@+id/gestureTitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:text="@string/gesture_title"
        android:textAppearance="?android:attr/textAppearanceLarge" />

    <Button
        android:id="@+id/goToGestureActivity"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:text="@string/button_gesture"
        android:onClick="clickToGesture" />

    <Button
        android:id="@+id/scrollButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:text="@string/launch_scroll_activity"
        android:onClick="clickToScroll" />

     <Button
        android:id="@+id/listButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:text="@string/launch_list_activity"
        android:onClick="clickToList" />

    <Button
        android:id="@+id/makeAlertDialog"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:text="@string/make_alert_dialog_button"
        android:onClick="showDialog" />

    <Button
        android:id="@+id/makePopupMenuButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:text="@string/make_popup_menu_button"
        android:onClick="showPopupMenu" />

    <Button
        android:id="@+id/makePopupViewButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        android:text="@string/make_popup_view_button"
        android:onClick="showPopupView" />

    <!-- Keep this on bottom to test scrolling to views that are not showing. -->
    <!-- Huge top margin to guarantee this being out of view on large screen layout. -->
    <Button
        android:id="@+id/bottomSendButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="1000dp"
        android:text="@string/button_send_bottom"
        android:onClick="sendData" />

    <TextView
        android:id="@+id/bottomSendTextView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="1000dp"
        android:text="@string/send_title"
        android:onClick="sendData"
        android:clickable="true" />

  </LinearLayout>
</ScrollView>