私はメインアクティビティで編集ビューとボタンを持っています。ここにボタンコードがあります:データバインディングを使用してonclickアクションの後にアクティビティを変更する方法
<Button
android:id="@+id/button"
style="@style/buttonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginStart="16dp"
android:onClick="@{handler::onButtonClick}"
android:text="@string/button_send"
app:layout_constraintBaseline_toBaselineOf="@+id/editText"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/editText" />
どのように私はonButtonClickメソッドでアクティビティを変更できますか?
「アクティビティの変更」とはどういう意味ですか? 別のアクティビティに移動しますか? –
ええ、変更活動 – evg
私はあなたに役立つ答えを追加しました –