이 중첩 된 레이아웃 구조 유무 :Android에서 중첩 된 레이아웃을 허용하지 않는 이유는 무엇입니까?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="@android:color/black">
<ViewGroup
android:layout_width="94dp"
android:layout_height="54dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:id="@+id/view">
<ImageView
android:id="@+id/loggedInUserImageView"
android:layout_width="66dp"
android:layout_height="66dp"
android:layout_alignParentTop="true"
android:layout_alignEnd="@+id/view" />
</ViewGroup>
</RelativeLayout>
을하지만 렌더링 문제를 얻는다. 왜? 문제가 무엇입니까?
' RelativeLayout>'을 종료 하시겠습니까? – andre3wap
'ViewGroup'은'abstract' 클래스입니다. Java에서'ViewGroup'의 인스턴스를 가질 수 없으며, 레이아웃 XML 자원의 요소로 사용할 수 없습니다. 'ViewGroup'의 구체적인 하위 클래스 (예 :'FrameLayout','LinearLayout','RelativeLayout','TableLayout','ConstraintLayout')를 사용해야합니다. – CommonsWare