안드로이드 개발 질문/답변
(글 수 45,052)
<?xml version=
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_height="wrap_content" android:layout_width="wrap_content">
<ImageView android:id="@+id/ImageView01"
android:background="@drawable/abc4" android:layout_height="wrap_content" android:layout_width="wrap_content"></ImageView>
</LinearLayout>
위처럼 레이아웃을 설정하고
실제로 소스에서
LinearLayout 가로 세로 크기를 알고 싶습니다.
아마도 ImageView 크기에 따라 사이즈가 달라질거라고 생각이 드는데요
혹시 아시는 분 계시나요?




..................
LinearLayout ll = new LinearLayout(getApplicationContext());
int width = ll.getWidth();
int height = ll.getHeight();
해보지 않아서 잘 모르게지만 메소드가 있는걸 보니 아마 이게 아닌가 싶습니다.