Androidアプリ開発を勉強しており、XMLの書き方について質問です。
以下のコードでは、style="@style/test"
の記述が繰り返しになっています。
<LinearLayout
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical">
<EditText style="@style/test" android:text="aaa"/>
<EditText style="@style/test" android:text="bbb"/>
<EditText style="@style/test" android:text="ccc"/>
<EditText style="@style/test" android:text="ddd"/>
</LinearLayout>
「このLinearLayout
の中では、EditText
のstyle
はすべて@style/test
にする」
ということはできないでしょうか。
よろしくお願いします。