error: Error: No resource found that matches the given name (at 'nextFocusDown' with value '@id/current_calculation_display').
This requires a bit of background.
My application has three layout files:
- activity_calculator_horizontal.xml
- activity_calculator_small_vertical.xml
- activity_calculator_vertical.xml
android:id="@+id/current_calculation_display"
.This error occured when setting the
android:nextFocusDown
attribute in the 'horizontal' activity's parent node to "@id/current_calculation_display". I did this with the 'vertical' and 'small_vertical' layouts without issue.The problem is that, in the 'horizontal' activity, the 'current_calculation_display' ID doesn't exist yet! This isn't a problem for the other two files because the ID gets created in the 'horizontal' activity. I tested this behavior by adding a (mostly blank) activity with the
current_calculation_display
TextView.Using
android:nextFocusDown="@+id/current_calculation_display"
fixes the problem.
No comments:
Post a Comment