When I try to format code in Eclipse Helios, by pressing ctrl+shift+f, the code is getting formatted, but the results are very ugly. Two or three statements in one line, for example. Indentation is also very poor.
For ex: After formatting the code it looks like:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:background="@drawable/scannerbg">
<include android:id="@+id/headerLayout"
android:layout_alignParentTop="true" layout="@layout/headerlayout" />
<ListView android:layout_below="@id/headerLayout"
android:layout_height="fill_parent" android:layout_marginTop="5dp"
android:listSelector="@android:color/transparent" android:id="@+id/listView"
android:layout_width="fill_parent">
</ListView>
</RelativeLayout>
As you can see in ListView
, two to three statements are there in single line.
Can anyone offer a solution to this?