마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

LinearLayout 문의입니다.

0 추천
                     <LinearLayout
			               android:layout_width="fill_parent"
			               android:layout_height="fill_parent"
			               android:orientation="horizontal" >
                       
  			                 <LinearLayout
			                                 android:layout_width="0dp"
			                                 android:layout_height="fill_parent"
			                                 android:layout_weight="0.1">
			                 </LinearLayout>         
			                 <LinearLayout
			                                 android:layout_width="0dp"
			                                 android:layout_height="fill_parent"
			                                 android:layout_weight="1" >
			         
					                  	 <ImageButton
					                  	     android:id="@+id/qrcode"
					                  	     android:layout_width="wrap_content"
					                  	     android:layout_height="wrap_content"
					                  	     android:adjustViewBounds="true"
					                  	     android:background="@drawable/qrcode" />
			                 </LinearLayout>       
			         
                     </LinearLayout>

 

이미지버튼을 제외하면 제가 원하는 LinearLayout 사이즈가 나오는데 

이미지버튼만 추가를 하면 크기가 늘어나네요...

아마 이미지버튼에 사용하는 이미지 크기 때문인거같은데....

LinearLayout사이즈에 맞게 구성하는 방법이 없을까요?

쿠쿠부다스 (6,470 포인트) 님이 2017년 3월 7일 질문
이미지를 줄이시던지 이미지버튼 가로세로를 고정하시든지하세영

1개의 답변

0 추천
 
채택된 답변
<ImageButton

                        android:id="@+id/qrcode"

                        android:layout_width="match_parent"

                        android:layout_height="match_parent"

                        android:adjustViewBounds="true"

                        android:background="@drawable/qrcode" />
ThisPlus (46,920 포인트) 님이 2017년 3월 7일 답변
쿠쿠부다스님이 2017년 3월 20일 채택됨
...