Answer the question
In order to leave comments, you need to log in
Why does markup look different in Android Studio and on real devices or emulators?
The markup looks different in Android Studio and on real devices or emulators, why is that? How to fix?
This is how the markup was supposed to look like, and this is how it looks in the Android Studio editor, the entire markup code is visible on the same screenshot:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/top"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:src="@drawable/top"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/start"
android:layout_below="@+id/top"
android:layout_centerHorizontal="true"
android:layout_marginTop="-16dp"
android:src="@drawable/start"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/cleft"
android:layout_below="@+id/top"
android:src="@drawable/cleft"
android:layout_alignLeft="@+id/top"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/cright"
android:layout_below="@+id/top"
android:src="@drawable/cright"
android:layout_alignRight="@+id/top"
/>
</RelativeLayout>
Answer the question
In order to leave comments, you need to log in
It's possible that Android Studio doesn't know how to work with negative indents.
Yes, by the way, in Eclipse it is really displayed correctly both at the development stage and at runtime, it’s not clear only what does the development environment have to do with it, because this XML, as it seems to me, is already drawn on the device “as is”?
I brought all the markup that is, and the full text is visible on the very first screenshot.
The problem was solved by returning to Eclipse'u. There it is displayed equally correctly both in the editor and on the device.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question