Answer the question
In order to leave comments, you need to log in
How to save the screen when rotating?
I'm trying to write a simple application for myself for android.
I ran into a problem - when you click on the button, the Activity changes - the transition to the list of items I need. Everything would be fine, but when you rotate the screen, everything returns to the first screen. How can this be fixed?
This is how I have the transition to another Activity
Button
<Button
android:text="Перейти к разделам"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/Brazdel"
android:textAllCaps="false"
android:onClick="AllRazdel"
android:layout_below="@+id/textView"
android:layout_centerHorizontal="true" />
public void AllRazdel(View view) {
// действия, совершаемые после нажатия на кнопку
setContentView(R.layout.razdely);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question