0
내 XML 파일에 도구 모음을 추가하려고합니다. 내 xml 파일에 include를 어디에 추가 할 수 있습니까?
그래서 나는 toolbar.xml을 만들어 나는 upload.xml에 포함해야합니다 있는 ScrollView는 하나의 직접 아이를 호스팅 할 수 있습니다 (: 이<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_upload"
android:layout_width="match_parent"
android:padding="10dp"
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"
tools:context="com.sk.mf.Upload"
android:background="#fff">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/imageToUpload"
android:layout_gravity="center_horizontal"
android:layout_width="150dp"
android:layout_height="150dp" />
<EditText
android:id="@+id/etUploadName"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<Button
android:id="@+id/bUploadImage"
android:text="Upload Image"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</ScrollView>
문제가
어디서나 내가 가지고 같은 오류 배치 스크롤 뷰 내부) 다중 루트 태그 (스크롤 뷰 후) ...
여기 내 질문은 어디에 있습니까? 위의 XML에 코드를 올리려면 어떻게해야합니까?
<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">
<include android:id="@+id/toolbar" layout="@layout/toolbar"></include>
</RelativeLayout>
가 대단히 감사합니다
toolbar
태그! –