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 | 29 | 30 |
Tags
- nodejs
- redux/toolkit
- 옵션메뉴꾸미기
- JavaScript
- bottomNav
- Hooks
- 팝업메뉴 꾸미기
- Android
- custom
- hoos
- Node
- readAsDataURL
- itemBackground
- react
- 코틀린
- Dialog
- state_checked
- 메뉴클릭
- 자바스크립트
- ContextAPI
- 안드로이드
- javaSrcript
- framework
- 팝업메뉴
- 리액트
- JS
- 커스텀옵션메뉴
- toolkit
- Menu
- Redux
Archives
- Today
- Total
대기업을 향한 디벨롭 블로그
RecyclerView , Dialog , WebView 응용하기 본문
지금까지 공부하며 RecyclerView , Dialog , WebView를 사용하여 간단한 예제를 만들었다.
이렇게 9명의 프로필이있다. 이 프로필은 RecyclerView 에서 GridLayout으로 만들어보았다.
<?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:id="@+id/mainView"
android:layout_width="match_parent"
android:layout_height="219dp"
android:orientation="vertical"
android:gravity="center"
tools:ignore="OnClick"
android:background="@drawable/ripple"
android:backgroundTint="#2DEC4CC5"
android:clickable="true"
android:focusable="true"
>
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/profile_image"
android:layout_width="130dp"
android:layout_height="100dp"
android:src="@mipmap/ic_launcher"
/>
<TextView
android:id="@+id/name"
android:layout_marginTop="20dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="이새롬"
android:textSize="23sp"
/>
</LinearLayout>
안에 들어가는 item의 xml이다. 이미지는 CircleImage라이브러리를 사용하였다.
오픈라이브러리 CircleImageView 만들기
CircleImageView를 한번 적용시켜 프로필 이미지를 만들어보겠습니다. CircleImageView는 사진을 동그랗게 만들어준다. 먼저 https://github.com/hdodenhof/CircleImageView 공식사이트에 들어가서 살펴보자. Git..
mhypro.tistory.com
요소하나를 클릭하면 그에대한 정보가 Dialog로 나타난다.
사진과 그룹,이름 그리고 버튼2개의 요소가있다. 버튼은 instagram버튼과 officical버튼이있다.
instagram버튼을 누르면 WebView가 띄어지면서 송하영님의 인스타그램으로 연결된다.
항상웹뷰를 만들때는 onBackPressed함수인 뒤로가기버튼을 재정의 해주어야된다. 그래야 웹에서 뒤로가기가 먹힌다.
그리고 instagram밑에있는 official fromis_9버튼은 official버튼으로 공식홈페이지가 뜨게된다.
심심해서 한번만들어봤다. 다음은 Custom명함만드는 앱을 만들어 볼까 생각중이다. 이렇게 계속 만들어야 실력이 좋아진다. 백날 코드공부만 해봤자 도움안됨
'나는안드로이드개발자' 카테고리의 다른 글
AndroManifest의 구조,개념 (0) | 2022.06.17 |
---|---|
안드로이드 폰트 변경하기 font Change (일괄변경) (0) | 2022.06.17 |
Dialog 다이어로그 창 만들기(팝업창) 안드로이드 코틀린 (0) | 2022.06.15 |
XML 예제 Dialog 다이어로그 (0) | 2022.06.15 |
오픈라이브러리 CircleImageView 만들기 (0) | 2022.06.15 |