Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 반석천
- CrossAxisAlignment
- MainAxisAlignment
- Hello World
- ListView.builder
- InkWell
- Image.network
- Flutter Example
- HTTP
- Row Widget
- sqlite
- Row
- WillPopScope
- Networking
- navigator
- Flutter 강좌
- listview
- Flutter Tutorial
- Load Image
- AppBar
- Snackbar
- node.js
- Scaffold
- FutureBuilder
- Column Widget
- ListTile
- flutter
- Cached Image
- Flutter 예제
- Flutter 앱 배포
Archives
- Today
- Total
꿈꾸는 시스템 디자이너
블로그에 소스코드 하이라이트 하기 본문
아래의 링크를 참조
소스코드를 넣을때는
<PRE class="brush:java">
소스코드
</PRE>
class HellowJava
{
public static void main(String[] args)
{
System.out.println("Hello, Java ! ");
}
}
XML 코드를 넣을때는 아래와 같은 방식으로 작성한다.
<pre class="brush:xml">
XML 코드
</pre>
다만 안드로이드의 레이아웃 파일과 같은 경우 XML표준포맷(?)으로 변경되어 아래와 같이 볼품 없이 표시된다.
이는 XML 코드내에 "<" 때문인데 이를 "<"로 취환하여 입력하면 해결된다. 이부분에 대해서 좀 조사해 보았는데 SyntaxHighlighter 홈페이지에의 XML 코드 예제에서도 이렇게 취환하여 사용한다니 별다른 방법이 없는 듯 싶다.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Inflate Layout"
android:textAppearance="?android:attr/textAppearanceMedium" />
<Button
android:id="@+id/mainButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:onClick="onClick"
android:text="Inflate" />
</LinearLayout>
<!-- Inflation할 레이아웃 영역 -->
<LinearLayout
android:id="@+id/inflatedLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" >
</LinearLayout>
</LinearLayout>
'Development > ETC' 카테고리의 다른 글
| 이미지 삽입 코드 생성기(Insert Image Tag Generator) (0) | 2019.01.31 |
|---|---|
| Typora로 포스팅 할 때 이미지 사이즈(Image Resize) 및 정렬(Image Align)을 설정하는 방법 (0) | 2019.01.30 |
| Typora 마크다운 편집기를 이용해서 소스코드(Code)와 이미지(Image)를 포스팅에 삽입해보자. (0) | 2019.01.30 |
| 이클립스 메뉴바(eclipse menu bar)가 보이지 않는 경우 해결법 (0) | 2014.08.13 |
| 자바 기반 웹 서비스 개발 환경 구축(Eclipse, Spring, Maven, Tomcat) (0) | 2014.04.21 |
Comments