Revision control
Copy as Markdown
<?xml version="1.0" encoding="utf-8"?>
<data>
<variable
name="isAccountsUIEnabled"
type="boolean" />
<variable
name="isEmpty"
type="boolean" />
<variable
name="isSignedIn"
type="boolean" />
<variable
name="isSyncEnabled"
type="boolean" />
<variable
name="lastSync"
type="long" />
<variable
name="isSyncing"
type="boolean" />
<variable
name="isNarrow"
type="boolean" />
<variable
name="callback"
type="org.mozilla.vrbrowser.ui.callbacks.BookmarksCallback" />
</data>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:visibleGone="@{!isNarrow && !isEmpty}">
<FrameLayout
android:id="@+id/buttons_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
visibleGone="@{isAccountsUIEnabled}">
<Button
android:id="@+id/syncButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:background="@drawable/content_panel_button_background"
android:drawableStart="@{isSyncing ? null : @drawable/ic_icon_settings_sign_in}"
android:drawablePadding="5dp"
android:drawableTint="@color/library_panel_button_text_color"
android:enabled="@{isSyncEnabled && !isSyncing}"
android:fontFamily="sans-serif"
android:gravity="center"
android:onClick="@{(view) -> callback != null ? callback.onSyncBookmarks(view) : void}"
android:padding="5dp"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:text="@{isSyncing ? @string/fxa_syncing : @string/fxa_sync}"
android:textColor="@color/library_panel_button_text_color"
android:textSize="18sp"
android:textStyle="bold"
app:visibleGone="@{isSignedIn && isSyncEnabled}" />
<Button
android:id="@+id/loginButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:background="@drawable/content_panel_button_background"
android:drawableStart="@drawable/ic_icon_settings_sign_in"
android:drawablePadding="5dp"
android:drawableTint="@color/library_panel_button_text_color"
android:fontFamily="sans-serif"
android:gravity="center"
android:onClick="@{(view) -> callback != null ? callback.onFxALogin(view) : void}"
android:padding="5dp"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:text="@string/fxa_account_sing_to_sync"
android:textColor="@color/library_panel_button_text_color"
android:textSize="18sp"
android:textStyle="bold"
app:visibleGone="@{!isSignedIn}" />
<Button
android:id="@+id/syncSettingsButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:background="@drawable/content_panel_button_background"
android:drawableStart="@drawable/ic_icon_settings_sign_in"
android:drawablePadding="5dp"
android:drawableTint="@color/library_panel_button_text_color"
android:fontFamily="sans-serif"
android:gravity="center"
android:onClick="@{(view) -> callback != null ? callback.onFxASynSettings(view) : void}"
android:padding="5dp"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:text="@string/fxa_account_sync_settings"
android:textColor="@color/library_panel_button_text_color"
android:textSize="18sp"
android:textStyle="bold"
app:visibleGone="@{isSignedIn && !isSyncEnabled}" />
</FrameLayout>
<TextView
android:id="@+id/syncDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toStartOf="@+id/buttons_layout"
android:gravity="center_vertical"
android:paddingStart="15dp"
android:paddingEnd="15dp"
android:text="@{!isSyncEnabled ? @string/fxa_account_syncing_off : null}"
android:textColor="@color/rhino"
android:textSize="@dimen/text_medium_size"
android:textStyle="italic"
app:lastSync="@{lastSync}"
app:visibleGone="@{isAccountsUIEnabled && isSignedIn && isSyncEnabled && !isSyncing}" />
</RelativeLayout>
</layout>