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
- docker
- 비트코인
- 알고리즘
- AWS
- EC2
- 암호화
- Ajax
- CSS
- Cookie
- express
- node.js
- JavaScript
- 웹게임
- 배포
- Servlet
- 블록체인
- 도커
- tiles.xml
- HTML
- 웹소켓
- model1
- websocket
- JSP
- phaser
- Spring
- PL/SQL
- SQL
- RDS
- autowired
- jQuery
Archives
- Today
- Total
記錄
autoLink, maxLine, imageView, asset활용, checkbox 본문
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="가나다라마바사 www.ddd.com 전화번호: 010-9444-5555 surhommejk@daum.net"
android:autoLink="email|web|phone"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="dfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsd"
android:maxLines="2"
/>
<TextView
android:id="@+id/tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Hello world"
android:fontFamily="sans-serif-smallcaps"
android:textSize="19dp"
android:textStyle="italic"
android:layout_marginTop="16dp"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/chahong"
android:maxHeight="300dp"
android:maxWidth="300dp"
android:adjustViewBounds="true"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="전화번호 입력"
android:inputType="phone"
/>
<CheckBox
android:id="@+id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="merci"
/>
</LinearLayout>
public class Practice3_4_112 extends AppCompatActivity {
CheckBox cb;
TextView textView;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_practice3_4_112);
// text view 설정
textView = (TextView) findViewById(R.id.tv);
Typeface tf = Typeface.createFromAsset(getAssets(), "GodoM.ttf");
textView.setTypeface(tf);
// 체크박스 설정
cb = (CheckBox) findViewById(R.id.checkbox);
cb.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (isChecked) {
cb.setText("감사합니다");
} else {
cb.setText("merci");
}
}
});
} // onCreate end
} // class end
Comments