XMLを貼り付ける場合
SyntaxHighlighterを使って、XMLを貼り付ける場合に、折り返しがおかしくなってしまう場合。
XMLをここをお借りしてエンティティ変換してから貼り付ける。
XMLをここをお借りしてエンティティ変換してから貼り付ける。
<?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"
android:orientation="vertical"
android:padding="10dp" >
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginRight="20dp"
android:contentDescription="@string/image_description"
android:src="@drawable/bake" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:layout_toRightOf="@id/imageView"
android:text="@string/default_string"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textView1"
android:layout_centerHorizontal="true"
android:layout_marginLeft="20dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="@id/imageView"
android:text="@string/default_string"
android:textAppearance="?android:attr/textAppearanceSmall" />
</RelativeLayout>
コメント
コメントを投稿