따로 변수를 지정하거나 layout 추가할 필요없이 아래 코드만 사용 !

 

AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("다이얼로그 창 타이틀");
builder.setMessage("다이얼로그 메세지 내용");
builder.setPositiveButton("확인",new DialogInterface.OnClickListener() { 
          @Override
          public void onClick(DialogInterface dialog, int which) {
                    // 확인 버튼 터치 시 동작 입력
          }
});
builder.show();

 

결과물

 

ScrollView가 전체를 싸고 있는 레이아웃 내부에 ListView를 넣으면

제일 상위 데이터 외에는 표시되지 않는다.

 

ListView를 한번 터치 해보면 별도의 스크롤을 확인할 수 있다.

 

Android Developer ListView 설명에서도 언급되어 있는 문제로 다양한 방법이 있으나,

복잡한 거 싫어하는 내 기준 가장 깔끔했던 해결 방안

 

ScrollView 안에 ListView를 위치할 때 ListView가 안보일 때

 .....  ..... 스크롤뷰 안에 리스트뷰를 위치하면 화면에 보이지 않는다. ListView의 속성인 android:layout_height="wrap_content"를 하면 하나의 아이템만 보이고, android:layout_height="match_parent"를..

nkcnow.tistory.com

 

해결 !

 

이름 그대로 ImageView를 Circle 모양으로 출력하고 싶을 때 사용


1. build.gradle(Module:App)에 라이브러리 추가

implementation 'de.hdodenhof:circleimageview:3.0.0'

 

2. circleimageview xml 코드

<de.hdodenhof.circleimageview.CircleImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:src="이미지 경로"
app:civ_border_width="Outline Border 두께"
app:civ_border_color="Outline Border 색상"
/>

+ Recent posts