다음에 내가 build.gradle(project)
에 classpath "com.android.databinding:dataBinder:1.0-rc4"
을 추가 한 build.gradle (module app)
에 dataBinding { enabled true }
을 추가로 내 프로젝트 구조는 내 활동의 레이아웃이 activity_fullscreen.xml
그래서 내가 ActivityFullscreenBinding
를 사용하려고하고는 "기호를 확인할 수 없습니다"가져온다 오류. 가져올 필요가 있는게 있나요? 참고로 난 이미 여기 Gradle을 2.1.0 를 사용하고 안드로이드 스튜디오 2.1 를 사용하고있어 레이아웃 XML은 layout
태그로 포장되어야한다 activity_fullscreen.xml안드로이드 스튜디오 2.1 데이터 바인딩은 기호를 해결할 수
<FrameLayout 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"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@android:color/white"
tools:context="com.roha.lungo.FullscreenActivity">
<!-- The primary full-screen view. This can be replaced with whatever view
is needed to present your content, e.g. VideoView, SurfaceView,
TextureView, etc. -->
<RelativeLayout
android:background="@android:color/black"
android:layout_width="match_parent"
android:id="@+id/relativeLayout"
android:layout_height="match_parent">
<android.support.v4.view.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
layout_behavior="@string/appbar_scrolling_view_behavior"
android:layout_height="wrap_content"></android.support.v4.view.ViewPager>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_margin="16dp"
android:onClick="@{FabHandler::onBaseFabClick}"
android:src="@drawable/ic_mic_black_24dp" />
<LinearLayout
android:id="@+id/fab_menu_one_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:layout_marginEnd="24dp"
android:layout_marginRight="24dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:visibility="invisible"
android:layout_alignParentRight="true"
android:layout_above="@id/fab"
>
<TextView
android:id="@+id/shareLabelTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:background="@drawable/circle_background_red"
android:elevation="2dp"
android:fontFamily="sans-serif"
android:padding="5dip"
android:text="Share"
android:textColor="@android:color/white"
android:typeface="normal" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/shareFab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:onClick="@{FabHandler::onShareFabClick}"
android:tint="@android:color/white"
fabSize="mini"
srcCompat="@android:drawable/arrow_down_float"/>
</LinearLayout>
<LinearLayout
android:id="@+id/fab_menu_two_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="24dp"
android:layout_marginEnd="24dp"
android:layout_marginRight="24dp"
android:gravity="center_vertical"
android:orientation="horizontal"
android:visibility="invisible"
android:layout_alignParentRight="true"
android:layout_above="@id/fab_menu_one_layout"
>
<TextView
android:id="@+id/createLabelTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:background="@drawable/circle_background_red"
android:elevation="2dp"
android:fontFamily="sans-serif"
android:padding="5dip"
android:text="Create"
android:textColor="@android:color/white"
android:typeface="normal" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/createFab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:onClick="@{FabHandler::onCreateFabClick}"
android:tint="@android:color/white"
app:fabSize="mini"
app:srcCompat="@android:drawable/btn_star_big_on" />
</LinearLayout>
</RelativeLayout>
<!-- This FrameLayout insets its children based on system windows using
android:fitsSystemWindows. -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<RelativeLayout
android:id="@+id/fullscreen_content_controls"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:orientation="horizontal"
tools:ignore="UselessParent">
</RelativeLayout>
</FrameLayout>
</FrameLayout>
activity_fullscreen.xml을 게시 할 수 있습니까? 그리고 'com.android.tools.build : gradle : 1.5.0'이상을 사용한다면'classpath "com.android.databinding : dataBinder : 1.0-rc4"'를 추가 할 필요가 없습니다. – nshmura