Revision control

Copy as Markdown

<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
<data>
<import type="android.view.View"/>
<variable
name="bookmarksViewModel"
type="org.mozilla.vrbrowser.ui.viewmodel.BookmarksViewModel" />
<variable
name="isAccountsUIEnabled"
type="boolean" />
<variable
name="isSignedIn"
type="boolean" />
<variable
name="isSyncEnabled"
type="boolean" />
<variable
name="lastSync"
type="long" />
<variable
name="isSyncing"
type="boolean" />
<variable
name="callback"
type="org.mozilla.vrbrowser.ui.callbacks.BookmarksCallback" />
</data>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:gravity="center_vertical|center_horizontal"
android:orientation="vertical"
app:visibleGone="@{!bookmarksViewModel.isLoading &amp;&amp; bookmarksViewModel.isEmpty}">
<ImageView
android:layout_width="@{bookmarksViewModel.isNarrow ? @dimen/library_icon_size_narrow : @dimen/library_icon_size_wide, default=wrap_content}"
android:layout_height="@{bookmarksViewModel.isNarrow ? @dimen/library_icon_size_narrow : @dimen/library_icon_size_wide, default=wrap_content}"
android:src="@drawable/ic_icon_bookmarks"
android:tint="@color/concrete"
app:srcCompat="@drawable/ic_icon_bookmarks" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="35dp"
android:fontFamily="sans-serif"
android:text="@string/bookmarks_empty"
android:textAlignment="center"
android:textAllCaps="false"
android:textColor="@color/fog"
android:textSize="@dimen/text_biggest_size"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="35dp"
android:fontFamily="sans-serif"
android:textAlignment="center"
android:textAllCaps="false"
android:textColor="@color/concrete"
android:textSize="@dimen/text_medium_big_size"
android:textStyle="normal"
android:maxWidth="360dp"
app:textDrawable="@{@drawable/ic_icon_bookmarked}"
app:textString="@{@string/bookmarks_description}"
tools:text="@string/bookmarks_description" />
</LinearLayout>
<TextView
android:id="@+id/loading_tv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/bookmarks_loading"
android:layout_centerInParent="true"
android:gravity="center_vertical|center_horizontal"
android:text="@string/bookmarks_loading"
android:textAlignment="center"
android:textColor="@color/fog"
android:visibility="gone"
app:visibleGone="@{bookmarksViewModel.isLoading}" />
<org.mozilla.vrbrowser.ui.views.CustomRecyclerView
android:id="@+id/bookmarks_list"
style="@style/customRecyclerViewStyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_above="@+id/header"
android:contentDescription="Bookmarks feed"
android:fadingEdgeLength="60dp"
android:requiresFadingEdge="vertical"
app:layoutManager="org.mozilla.vrbrowser.ui.adapters.CustomLinearLayoutManager"
app:visibleGone="@{!bookmarksViewModel.isLoading &amp;&amp; !bookmarksViewModel.isEmpty}" />
<FrameLayout
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_alignParentBottom="true">
<include android:id="@+id/bookmarks_narrow"
layout="@layout/bookmarks_narrow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:isAccountsUIEnabled="@{isAccountsUIEnabled}"
app:isEmpty="@{bookmarksViewModel.isEmpty}"
app:isSignedIn="@{isSignedIn}"
app:isSyncEnabled="@{isSyncEnabled}"
app:lastSync="@{lastSync}"
app:isSyncing="@{isSyncing}"
app:isNarrow="@{bookmarksViewModel.isNarrow}"
app:callback="@{callback}"/>
<include android:id="@+id/bookmarks_wide"
layout="@layout/bookmarks_wide"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:isAccountsUIEnabled="@{isAccountsUIEnabled}"
app:isEmpty="@{bookmarksViewModel.isEmpty}"
app:isSignedIn="@{isSignedIn}"
app:isSyncEnabled="@{isSyncEnabled}"
app:lastSync="@{lastSync}"
app:isSyncing="@{isSyncing}"
app:isNarrow="@{bookmarksViewModel.isNarrow}"
app:callback="@{callback}"/>
</FrameLayout>
</RelativeLayout>
</layout>