-1
나는 안드로이드의 팝업에서 텍스트 필드를 사용하고 있습니다. 그러나 텍스트 필드에는 복사/붙여 넣기 옵션이 없습니다. 다른 활동에서 동일한 텍스트 필드를 사용했는데 정상적으로 작동합니다. 내 팝업 XML은 다음과 같습니다.안드로이드 팝업의 텍스트 필드에 복사하여 붙여 넣기를 활성화하는 방법
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/popup_element"
android:background="@color/colorPrimary"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:weightSum="1">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="54dp">
<TextView
android:text="Add HTTP Link"
android:textSize="25dp"
android:textStyle="bold"
android:textColor="@color/colorwhite"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textView2"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="17dp"
android:layout_marginStart="17dp"
android:textAppearance="@style/TextAppearance.AppCompat.Body2" />
</RelativeLayout>
<LinearLayout
android:background="@color/colorwhite"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/btn_close_popup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textColor="@color/colorPrimaryDark"
android:text="Cancel"
android:layout_alignBaseline="@+id/button_download"
android:layout_alignBottom="@+id/button_download"
android:layout_toRightOf="@+id/button_download"
android:layout_toEndOf="@+id/button_download"
android:layout_weight="1" />
<Button
android:text="Download"
android:textColor="@color/colorPrimaryDark"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/button_download"
android:layout_marginLeft="62dp"
android:layout_marginStart="62dp"
android:layout_marginBottom="18dp"
android:layout_weight="1"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<android.support.design.widget.TextInputLayout
android:id="@+id/texthttp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="90dp"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textUri"
android:hint="Http Link" />
</android.support.design.widget.TextInputLayout>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
팝업을위한 Java 클래스가 없습니다. isSelectable 같은 다른 방법을 시도했지만 아무 도움이 .. 제발 도와주세요. 고맙습니다.
[android : textIsSelectable] (https://developer.android.com/reference/android/widget/TextView.html)을 사용할 수 있습니다. – TranHieu