2

我在 main.xml 文件的线性布局中放置了一些 EditText 控件。每当您单击以选择文本时,Android 默认文本选择菜单会出现在顶部并替换布局中的内容。如何让文本选择菜单仍然出现,但不影响视图中元素的布局?具体来说,我想控制文本选择菜单出现在屏幕上的位置。

在此处输入图像描述

  <?xml version="1.0" encoding="utf-8"?>
    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical" >
      <EditText

            android:inputType="textFilter|textMultiLine"
            android:textSize="10sp" />
        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"    
        android:paddingTop="0dp"
        android:paddingBottom="0dp"
        android:paddingLeft="8dp"
        android:paddingRight="8dp"
            android:orientation="horizontal" >
        <Button
                android:id="@+id/button2"
        android:paddingBottom="8dp"      
                android:layout_width="wrap_content"
            android:layout_height="26sp"      
         android:textSize="8sp"      
                android:text="save"/>
      </LinearLayout>
    </LinearLayout>
4

0 回答 0