Just wrote this simple app for testing: one button that displays date and hour, and another button that selects a random color and shows it. It works fine on Emulator but th
I suspect that this apparent problem is related to the attribute android:supportsRtl="true"
and the different API levels of your device/emualtor.
From the official doc:
android:supportsRtl
Declares whether your application is willing to support right-to-left (RTL) layouts. If set to true and targetSdkVersion is set to 17 or higher, various RTL APIs will be activated and used by the system so your app can display RTL layouts. If set to false or if targetSdkVersion is set to 16 or lower, the RTL APIs will be ignored or will have no effect and your app will behave the same regardless of the layout direction associated to the user's Locale choice (your layouts will always be left-to-right).
The default value of this attribute is false.
This attribute was added in API level 17.
This may cause different behavior between the emualtor and your device.
You need to fix your layout accordingly to the flag, or try to remove this flag.
I'm not convinced right-to-left support is the problem, but I agree that the contradictory placements attributes could cause unforeseen problems.
If I were you, I'd get rid of all the confusing relative placement attributes, and I'd replace the RelativeLayout with one simpler vertical LinearLayout containing two horizontal layouts (please don't just cut and paste them from the previous code, it's better to write those LinearLayouts from scratch or use the IDE to initially generate them)
if Instant Run is activated this causes some classes to be moved. To disable Instant Run Go to File -> Settings -> Build,Execution,Deployment ->Instant Run -> uncheck "Enable instant run"