Nachdem textIsSelectable auf true gesetzt wurde, stoppt der Text das Wischen, aber jede andere Stelle, die ich berühre, wischt mit dem Finger. Was ist los mit dir? Ich möchte, dass mein Text nach dem Aktivieren von textiselectable auf true wischt, ich möchte, dass meine Benutzer in clipbord kopieren und auch streichen. aber wenn ich die textIsSelectable auf true setzen, wischen die Seiten leicht. Was ist falsch? bitte irgendwelche vorgeschlagene Hilfe? Ich würdeNachdem ich textIsSelectable auf "true" gesetzt habe, hört mein Text auf zu wischen, wenn ich mit Finger wische
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_marginTop="50dp"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textColor="@color/colorAccent"
android:textSize="25sp"
android:text="my favorite Quotes" />
<ViewFlipper
android:id="@+id/view_flipper"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_margin="6dip"
android:background="#FF312828"
>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="@string/Jim_Rohn"
android:textColor="#FFC7C7EA"
android:textSize="20sp"
android:textIsSelectable="true"
android:textStyle="bold">
</TextView>
<ImageView
android:layout_marginTop="10dp"
android:layout_width="150dp"
android:layout_height="150dp"
android:src="@drawable/jimrohn" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="@string/ludwig_wittgenstein"
android:textColor="#FFC7C7EA"
android:textSize="20sp"
android:textIsSelectable="true"
android:textStyle="bold">
</TextView>
<ImageView
android:layout_marginTop="10dp"
android:layout_width="150dp"
android:layout_height="150dp"
android:src="@drawable/ludwigwittgenstein" />
</LinearLayout>
und die Java-
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
menu.add(0, v.getId(), 0, "Favorite Quotes");
TextView textView = (TextView) v;
ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
clipboard.setText(textView.getText());
super.onCreateContextMenu(menu, v, menuInfo);
}
Danke für Ihre freundliche Antwort ishlaelMakitla, aber es hat nicht geholfen, wenn Sie mir weiter helfen können. –
Versuchen Sie, 'v.focusableInTouchMode (false);' und 'v.focusable (false);' hinzuzufügen - lassen Sie mich wissen, dass dies hilft. – ishmaelMakitla
meine vieflipper von Anim gesteuert wird –