Answer the question
In order to leave comments, you need to log in
Android launching the wrong layout?
There is an application with several activities, on the main activity there is a change of layouts by keystrokes. Approximate number of layouts - 40.
There was a problem. Let's say there is layout number 26, and it should be displayed as the 26th in a row, but for some reason, the previous number, 25th, is substituted for it. If we put the layouts in random order, then again, the 25th layout will appear instead of the 26th!
All layouts have the same type of name: activity_xx.xml where xx is the number of the layout.
I thought that the problem was in the name of the layout I needed, I changed it, and accordingly changed its name in the setContentView () method;
The problem hasn't been resolved. I decided to see what is in the R-class for these layouts. They have completely different meanings, which means they are not confused and should be placed separately!
public static final int activity_26=0x7f0a00fa;
public static final int activity_25=0x7f040038;
public static final int activitym_26=0x7f040069;
Answer the question
In order to leave comments, you need to log in
If you iterate over a switch, check for the presence of break everywhere, judging by the code example in your previous comment, it is missing.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question