안드로이드 개발 질문/답변
(글 수 45,052)
안녕하세요.
안드로이드 초보 개발자 입니다.
궁금한 점이 있어 이렇게 글을 올립니다.
제가
릴레리트 레이아웃을 xml 파일에 구현하고
코드로
RelativeLayout rl;
rl = (RelativeLayout)findViewById(R.id.mainview);
rl.addView(new UserSpace(this));
와 같이 surfaceview를 구현하였습니다.
xml 소스는 다음과 같습니다.
<RelativeLayout android:layout_height="fill_parent"
android:background="@drawable/userspaceback" android:orientation="horizontal"
android:id="@+id/mainview" android:layout_width="fill_parent">
<Button android:text="Multi-Select" android:id="@+id/Button09"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true" android:layout_width="135px"
android:layout_height="wrap_content"></Button>
<Button android:text="Add" android:id="@+id/addObject"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true" android:layout_width="135px"
android:layout_height="wrap_content"></Button>
</RelativeLayout>
근데 위와 같이 하니까 릴레티브 레이아웃 안에 선언되어있는 버튼 2개가 보이지 않는데
아마 surfacelayout이 위에 겹쳐서 그런거 같습니다.
버튼을 보이게 하는 방법이 있을까요?ㅠ
코드상에 surfaceview 에 버튼을 정의해야 하는건가요?
안드로이드 초보 개발자 입니다.
궁금한 점이 있어 이렇게 글을 올립니다.
제가
릴레리트 레이아웃을 xml 파일에 구현하고
코드로
RelativeLayout rl;
rl = (RelativeLayout)findViewById(R.id.mainview);
rl.addView(new UserSpace(this));
와 같이 surfaceview를 구현하였습니다.
xml 소스는 다음과 같습니다.
<RelativeLayout android:layout_height="fill_parent"
android:background="@drawable/userspaceback" android:orientation="horizontal"
android:id="@+id/mainview" android:layout_width="fill_parent">
<Button android:text="Multi-Select" android:id="@+id/Button09"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true" android:layout_width="135px"
android:layout_height="wrap_content"></Button>
<Button android:text="Add" android:id="@+id/addObject"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true" android:layout_width="135px"
android:layout_height="wrap_content"></Button>
</RelativeLayout>
근데 위와 같이 하니까 릴레티브 레이아웃 안에 선언되어있는 버튼 2개가 보이지 않는데
아마 surfacelayout이 위에 겹쳐서 그런거 같습니다.
버튼을 보이게 하는 방법이 있을까요?ㅠ
코드상에 surfaceview 에 버튼을 정의해야 하는건가요?



