I have this xml:
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="@style/FragmentSecondary" >
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:layout_alignParentTop="true"/>
<RelativeLyout>
My style his is style="@style/FragmentSecondary", want to change it programmatically to style=@style/FragmentTrains. I don't want to rewrite another xml. i need to write it in the code. How can I do this?